So I thought maybe I’d post my thought process trying to solve Glee’s puzzle, so those who don’t play can see the way a real human, not a Hollywood scriptwriter’s creation, would approach this. Not sure if this is of interest, but if not…move along, I guess? 
I see there are two pairs of pawns, and they’re frozen. Any move of a pawn would result in a loss, by either side. If an h pawn falls, the defending king will have to do double duty and defend both wings, an impossible feat. That’s pretty basic, something a 1300 player could do.
So then I try to win the h pawn, so I can create that double-threat I need. That’s about 1500-level skill. I try to use the “three square rule,” which says if I can get parallel to the pawn on the 5th rank by three squares or fewer, I can win it. So I try Kf3 and Kf4 first. I know Black knows this plan, so he’ll defend those three squares with Kg7, Kf6. And this is the key to “seeing ahead.” I know what I’m trying to do, but I also know my opponent knows it, so I know that he’ll try to stop me in the only way possible. It’s not some sort of crazy ability to move pieces in my head, it’s knowledge of endgame patterns that lead me to what can - what MUST - be played to keep the game even. If Black plays anything else, he loses. Sure, he’s legally entitled to play “Kf3, Kg7, Kf4, b6” and lose immediately, but no human actually thinks way because that’s an instantly losing position and is trivial. When Glee says he calculated 15 moves ahead, I bet he didn’t even bother with b6 in his moves, nor did he count the 20 moves to an easy mate thereafter. b6 is such a bad, suicidal move, that Glee not only doesn’t bother to consider it, but doesn’t give himself credit for it either. That’s why when a Hollywood writer says “Mate in 15,” it’s meaningless. Nobody really thinks that way. Nobody bothers to count the number of moves of a trivial sideline that nobody would actually play!
So anyway, that doesn’t work because after Kf6, I’m blocked by King Opposition, a technique very junior players learn in their earliest lessons. So I try Outflanking instead. From the start, Kf3 Kg7, Ke4 and now Kf6 is answered by Kf4, winning the opposition and making Black cede control of the e5 or f5 or g5 square. But then I realize he can give me e5 and it won’t actually matter. It superficially looks like I’m winning, but no, he’s faster to my g pawn via g5-g4-g3 than I am to his h pawn.
So now I abandon the hope of winning the h pawn by force. I have to out-race him to the b pawn and give up my g pawn. I first try the same route I just took. I say in my head “Kf4 for white, Kf6 for black, white to play.” And I count. 5 moves til I walk to the b pawn, and I’m clear to queen with my pawn across the halfway mark (the 5th rank). 3 moves for Black, so his pawn can move up two more squares- that makes 5 moves for Black - and it’s still White to play. His pawn is on g3 and I’m on a5 with a king on b7.
So instantly I see Searching for Bobby Fischer in my head, the famous scene at the end where they queen on opposite sides of the board, but it’s a skewer on the long diagonal and Josh wins the championship. It’s a common motif. I count again. I queen in 3, he queens in 2 (from g3, recall), so Black wins the pawn race and I’m about to queen but there are stalemate tricks, so it’s a draw. This is something I think, if they could get this far, a 1500 player would know about. It’s just a memorized endgame situation, so I’d just threaten Ka8 stalemates until it’s an official draw.
So I see if I can win a tempo somewhere, speed up by one move. I do that because I just saw that I’m one move short. Can I get that b pawn faster? Yes I can. I just walk the diagonal to b6 and go in from the front. Ke3-d4-c5-b6-b7. 5 moves, but this time Black is farther from my pawn. Let’s count again. Black is on the 8th rank, my g pawn on the 3rd rank, 8-3 = 5. 5 moves away. I’m farther to the queenside, so there’s no way he can “shoulder” me off my diagonal path, that’s easy enough to check, so this plan is unstoppable.
And this is where I pause to point out, dear reader, I’ve reached the key word - unstoppable - that means this’ll likely be the main variation. Through all that calculation and visualization, with all that endgame knowledge and study, I’ve forced a continuation that MUST be followed exactly, or else one side wins easily. I know I can win the b pawn in 5 moves and Black’s only hope is to win my g pawn in turn. I’ve already ruled out winning the h pawn myself, so there’s no other try left for either side. Ergo, this plan MUST be the main continuation.
So then it’s 1. Ke3 Kg7 2. Kd4 Kf6 3. Kc5 Kg5 4. Kb6 Kg4 5. Kxb7 Kxg3 6. a6 h4 7. a7 h3 8. a8=Q. The fun thing is now I know from my endgame study that all I must do as white is control the h1 square for one move, park a queen there, and it’s game over. It’s mate in maybe 15, maybe 20…heck, maybe 30, but no chess player counts the moves. We just know “Queen on h1, Black resigns.” As my five-year old would say, “it’s a bong-gonk,” which is the sound effect on popular chess site lichess.org when your opponent resigns.
But Black is going to stop me, remember? I know the plan, so therefore so does Black, so he’ll try to prevent that. If 9. h2, Kc7! and two things happen: the h1 square is controlled by the queen AND the black king is cut off from the g2 square, where he could otherwise go to prevent the Qh1 idea!
This, dear reader, is what people mean when they say chess is beautiful. Look at the simple arrangement of pieces, how the queen is just perfectly situated, as are the black pieces, just to make this kind of “gotcha” moment possible. The white king is in just the right place to “discover” the queens attack onto two critical squares at the same time, at just the last second, to win the game. It’s gorgeous. It’s perfect. It’s art.
Alas! Black has another resource! And this is where chess skill really shines. The weaker player would see the above line, rush to push that h pawn, and say “Oh wow, beautiful win!” A stronger player tries harder for his opponent, refuses to take the loss, and figures out that Kg2! ruins that plan. Notice that Glee, like I do, gives it an “exclam[ation]”…a brilliant move. It truly is a brilliant defense, because it allows Black to cross the Rubicon and control that all-important h1 square w/ the king, right before the laser fence of the queen’s diagonal ray is put up.
How to defeat it? This is where I deviate from Glee. I just played. Kc7, knowing that if I can get my king within 2 tempi of g3, it’s a win. I won’t bore you with the details, just trust me that it’s yet another “I studied this idea” thing.
Kc7+ (Glee palyed Kb6, not sure it matters), K must control h1 so either h2 or g1, doesn’t matter. Either way, I’m checking along the ranks and/or threatening Qh1 on every move. I see the simple “wiggle pattern” Qa2, Qb1 (or Qb3), and I go along diagonals, checking the king, who must stay in contact with h1 or close by.
I’m not really thinking in terms of exact squares, just ranks. “Check second rank, check first rank, check second rank again,” while the queen moves diagonally closer. Finally, it’s on the e-file, and I can bring the coup de grace. Qe2+ eventually. Now no king position works. Kg1, Kg4+, forking king and pawn. Kh2 holds temporarily, but I “zugzwang him off” with any king move. I win. Kh1 Qf3, same thing next move. Kg3, which is what Stockfish played against me when I tried it out, and my favorite, Qg4! The very same idea as before, way back when the Queen was on a8! I control the long diagonal at a time when the king can’t scurry back to h1! Win, but this time in beautiful fashion!
And game. I don’t know if that was all clear or not, but my main point is this: I relied a lot on pre-trained knowledge. I reached a point where I could clearly see that if anything at all was winning, that THIS particular line was winning. I then just counted squares, and that’s an instant 8 moves of calculation. I found the Kg2 trick by deduction, which made the job harder than it first seemed, but again, prior training told me it must be winning, even if I didn’t know how yet.
Finally, I didn’t calculate exact moves after the first 8, I just calculated “a series of checks wiggles me to any square on the second rank I want. Hey, whaddayaknow, e2 works well. Even if it doesn’t, I can always reset and try something else.”
So it took me 8 moves to queen a pawn and 9 moves to get Qh1, winning. That’s 17 moves. While Glee calculated 15 moves, I calculated 17… but that’s not better, that’s worse! Glee’s solution is much better, much cleaner than mine, but as a former world champion used to say (Tartakower?), you can only win once per game, so in the end, the number of moves don’t even matter!