Spoiler Thread: Avengers Infinity War

My theory is that Dr. Strange has a plan and that everything that happened in the end of this movie is part of the lone winning scenario he saw when he looked into the future. Which is why he said that giving up the Time Stone was the only way.

Or maybe he just considers what happened a "win" compared to the other outcomes he saw. Who knows.

Either way, I think we can all agree that Thanos is the real hero in the movie.