Today we will have a look on some mathematical games. In all the games today, there are two players, who make moves alternately. There is a certain goal in each of these games, common for both players. The player who achieves it, wins, and the game will end at some point, draws are not allowed. It turns out in such games one of the players has a winning strategy - no matter what the other one does, the player following the strategy will always win. Today we can look into finding who has the winning strategy and what it might be.
One important tool we have to investigate these games are winning and losing positions. If you playing the game can win in one go starting from a certain state of the board, number of tokens on the table, set of cards etc, or whatever describes the current state of the game, it is said you are in a winning position. However, if all the moves you can make give the winning position to your opponent, it is said you are in a losing position. You must do a move that will guarantee you opponent to win - or at least give them a certain opportunity if they are smart enough to take it.
We can go further and say that a winning position is such a position that you can always make a move that will change the state of the game to the losing position for your opponent. Whereas a losing position is such a position that you must make a move that handles the winning position to the other player.
In some simple games the strategy can be guessed without going into details about winning or losing positions. But often you can start from the last stages of the game, find out what positions are immediately winning, then find all the losing positions that lead only there. In this way, working your way from the end of the game towards its beginning, one can characterize all the possible positions as winning or losing. The player that starts the game in a winning position has a winning strategy - if they start the game in a losing position, the strategy belongs to their opponent.