No plan survives first contact with the enemy
Villains always seem to have nefarious plans, carefully crafted. Heros always seem to have well intentioned plans, carefully crafted. What is the common thread? They always go awry.
A plan rarely accounts for everything. There is always a certain amount of adaptation required. This is almost tautological -- we tend to plan for things complicated enough that planning was necessary in the first place. Everyone who plans knows that the subsequent adaptation is essential. It is also where the nature of the villain starts to become visible. They must necessarily inject themselves into the system and, potentially, gum up the works.
It is here that the crafty hero can show their mettle. They don't defeat the plan, they defeat the implementation of the plan as implemented by the villain. The crafty hero understands the phrase "know thy enemy," and seeks to understand how the villain is bobbing and weaving and adapting to keep the plan on its wheels. Then they can turn things towards a blind spot.
Perhaps the epitome of this can be seen on a chess board in the play of two grandmasters. When grandmasters play, they typically plan... and plan... and plan. They pour over their opponent's past games, studying how their opponent moves and thinks. They'll formulate opening plans trying to drive their opponent into paths they think they are good at and the opponent is bad.
And then it all starts with a single pawn move, and the press of a clock. The game is on. The enemy is in sight. Now, practically speaking, their plans work for a while. They're no fools at this planning game. They're going to go down one of the paths they studied before the match. Both sides know it. They're just sort of agreeing on which one to go down.
And yet, often they take their time. Some of that is weighing the mind of the human sitting before them. How are they feeling today? Do they look like they're in the mood for a kingside attack or a queenside attack? Grandmasters often talk as if they aren't playing the board at all -- they're playing the mind of their opponent from the first move. Their job is to navigate an opponent into a blindspot.
This can be done by skill, but never underestimate dumb luck. One of the most famous moves in Chess history is 36. axb5!, played by Deep Blue in the rematch of Kasparov v. Deep Blue. This was the match which officially put computers in the driving seat as the true masters of Chess. Humans were left behind. Kasparov, oft considered one of the most brilliant chess minds of all time, had won the first match in 1996 4 games to 2. Deep blue would win the rematch in 1997 3.5 to 2.5 and sunder the human chess community.
Typically we like to view this from Kasparov's perspective, as the human, and make Deep Blue the enemy. Thinking from the perspective of a computer is not all that enjoyable, but for purposes of this narrative, let's treat Kasparov as the enemy. Deep Blue is the plucky hero, with its racks and racks of specialized hardware.
Move 36, taking one pawn with another, is not all that impressive on its own. Especially if you don't play chess. However, it had alternatives. In particular, 36. Qb6 would have won two pawns "free and clear." But Kasparov is no fool. It was a trap. In trade for those "free and clear" pawns, Kasparov would lay the groundworks for a very powerful attack. Kasparov is known for his attacking play. This is where he wants to be. This is his plan. And Kasparov knows his enemy. Computers generally prefer material advantages, such as two free pawns, and undervalue subtle things like attacks.
But that's not what deep blue played. Deep blue played 36 axb5!, which turns out to be a very subtle and nuanced move with profound impacts. It's the kind of thing you'd expect a human grandmaster to play. And it rocked Kasparov's plans. It got under his skin. He truly did not believe a computer could make such a play. And in one move, our hero uprooted the villainous Kasparov's plans.
This was just the start, of course. Deep blue still had to play out the game. And it had to play 4 more games after that. But a chink in Kasparov's armor was exposed, and Deep Blue circled around it. Kasparov claimed the Deep Blue team must be cheating, for no computer could ever see that move, but with the help of a mere intermediate player with a button saying "stop looking at this line" could have found it alongside Deep Blue. Surely the team had cheated, feeding Deep Blue a tiny hint!
His calm resolve was shook, and Deep Blue took advantage of it. Brick by brick, Deep Blue dismantled Kasparov's mind. In a later game in the match, it was commented that Kasparov had lost the game before he even played the first move, he was so shook up.
Sure, 36 axb5 came due to the skill of the computer. It is currently believed by most people that Deep Blue did not cheat. It was programmed to weigh these sort of situations (specifically because Kasparov is so known for his attacking game). It was a skillful move. But it was luck that it was so darn effective. And Deep Blue capitalized on it, never flinching. That is how it took down Kasparov's plans.