Python Sample Code
For the Python code, it works best to put it all into the same directory. There are some imports between them. For example, game rules and search algorithms are imported by code which tests or runs them.
Some of the code may be marked as CMPUT 655 or 455 since it was originally developed for those courses.
Contents
Boolean Minimax and Negamax
Alphabeta
Alphabeta Enhancements
Clobber - Rules and Solver
-
clobber_1d.py
Rules of Clobber on a one-dimensional (1 x n) board
-
test_clobber_1d.py
A few unit tests for clobber_1d.py (incomplete but functional)
-
boolean_minimax_test_clobber_1d.py
Examples showing how to solve Clobber positions with boolean_negamax.
This code requires game_basics.py, boolean_negamax.py and clobber_1d.py (see above).
-
clob_tt.py
Solve Clobber positions with simple transposition table.
proof number search