Unbeatable noughts and crosses
Tap a square to play. Three in a row wins. The computer has looked at every possible game, so it never loses: the best you can get is a draw. Play a few games first. Then tick show the value of each square. Each empty square now says what happens if you move there and both sides play perfectly from then on: win, draw or lose.
What's going on
Picture every possible game as a tree. The empty board is at the top. Below it hang the 9 boards you can reach in one move, below each of those hang 8 more, and so on down to the finished games. There are 255,168 different games in the tree, but only 5,478 different boards, which is small enough to check them all.
Score the endings. A finished game is a draw, or a loss for the player whose turn it would be, because the other player has just made three in a row. That part is easy.
Work backwards. Take a board one move from the end. If the player to move has any move that wins, the board is a win for them, because they will choose it. If every move loses, the board is a loss. Otherwise the best they can reach is a draw. Now every board one move from the end has a value, so do the same for boards two moves from the end, and keep going up to the empty board. This is called minimax: you pick the move that is best for you, knowing your opponent will then pick the move that is worst for you.
Carry it all the way up and the empty board comes out as a draw. All nine first moves are draws. Neither side can force a win, and that is why two careful players always draw.
Against the computer the hints never say win, because the computer never leaves you a winning square. One careless move, though, and some squares turn to lose. To see winning squares, choose a friend, play both sides yourself, and make a bad move on purpose. The hints then show the values for whoever moves next.
Chess and Go have game trees too, but theirs are far too big to search to the bottom. Nobody knows the value of the empty chess board.