15-150: Principles of Functional Programming
Lecture 21: Implementing Game Playing
Today we implemented game players as functors that take particular
games as arguments. We implemented depth-bounded minimax search, human
players (code sketched in previous lecture), and a referee loop to
supervise two players playing the same game.
Finally, we gave an overview of alpha-beta pruning.
Key Concepts
- MiniMax
- Alpha-Beta Pruning
- Sharing constraints (*)
- Mutual recursion
- I/O effects
(*) You don't need to know how sharing constraints work. We merely
needed such constraints today, in order to ensure that both players
are playing the same game.