Board Games AI
The classical area of AI application is the board game. This chapter introduces the two most prominent AI approaches used in developing board game agents—the MinMax algorithm and machine learning—and explains their usage in playing games like Tic-Tac-Toe, Checkers, Othello, Chess, Go, etc. against human opponents. The game tree is essentially a directed graph, where the nodes represent the positions in the game and the edges the moves. Even a simple board game like Tic-Tac Toe (naughts and crosses) has as many as 255,168 leaf nodes in the game tree. Traversing the complete game tree becomes an NP-hard problem. Alpha-beta pruning is used to estimate the short-cuts through the game tree. The board game strategy depends on the evaluation function, which is a heuristic indicating how good the player's current move is in winning the game. Machine learning algorithms try to evolve or learn the agent's game playing strategy based on the evaluation function.