As part of my quest to learn how to program in Python I’ve decided to implement a simple Minimax algorithm.
The algorithm is simple and relies on a elementary principle – each turn you will choose the best move and your opponent will choose the worst move for you. By building a search tree with a limited depth we can then choose each time either the maximum result possible or the minimum result according to the player’s turn.
You can read more about Minimax algorithm in Wikipedia – or continue reading and learn it from my implementation.
Saturday, July 18, 2009
Dror Helper continues his series on getting started with IronPython programming. He has been creating an example game and after his last entry on unit testing he moves onto adding some simple AI logic: