If you're familiar with formal game theory, then you know that there is an entire branch of mathematics devoted to understanding and analyzing games. In the computer science world, we can analyze a game by simplifying it into a decision tree structure called a game tree. Game trees are a way of mapping out possible moves and states within a board game. Let's take the simple example of a game tree for Tic Tac Toe, as follows:
This tree gives us all of the possible combinations and outcomes for the game based on a certain starting point. Moving from one node to another represents a move in the game, and moves continue ...