A computer doesn't 'see' a good move. It imagines every move, every reply and every reply to that, then works backwards, assuming you'll play your best too. Play against that idea at different strengths and watch it think.
Play tic-tac-toe against The Oracle. You can't beat it, but can you always draw? Now try Careful Cleo: make two threats at once (a fork) and she can only block one. Turn on The Oracle's verdict to see which squares lose before you play them.
Look at the game tree beside the board. From the empty board there are 549,946 positions and 255,168 possible games. Plain minimax visits every one. Alpha–beta pruning gets the same answer after looking at about 1 in 70.
Then try checkers against the Deep Thinker and watch its table: each extra move of look-ahead multiplies the work. That's why real game programs need a good guess at who's ahead when they stop looking.
In 1928 John von Neumann proved the minimax theorem: in a two-player game where one side's gain is the other's loss, each player has a best cautious strategy. In 1950 Claude Shannon published "Programming a Computer for Playing Chess", which set out the plan still used today: search a tree of moves, then score the positions at the edge.
In the 1950s Arthur Samuel at IBM wrote a checkers program that improved by playing itself, and in 1959 he used the phrase "machine learning" for it. Decades later Jonathan Schaeffer's program Chinook won a world title against human players, in 1994, and in 2007 his team proved that checkers played perfectly by both sides is a draw.
In 1997 IBM's Deep Blue beat world chess champion Garry Kasparov in a six-game match, using minimax search with alpha–beta. In 2016 DeepMind's AlphaGo beat Lee Sedol at Go, a game with far too many moves to search this way: it used neural networks to guess which moves were worth looking at.