An open-source AI checkers game written in Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea Changed VCS from mercurial to git. Apr 15, 2015
images Removed black bullet in favor of green Jan 28, 2011
training Initial add Feb 3, 2015
README.md Updated image Mar 22, 2018
XcPri.jpg Added screenshot Mar 22, 2018
aboutbox.py New training files from Richard Pask's SOIC. Jan 15, 2011
alphabetacontroller.py Fixed some formation goal logic. Apr 26, 2015
autoscrollbar.py Changes to scrollbar take into account a container, row & col and sti… Jan 27, 2011
boardview.py Reverted back to using CSPs for goal evaluators due to performance is… Mar 7, 2015
centeredwindow.py New training files from Richard Pask's SOIC. Jan 15, 2011
checkers.kpf Improvements to annotation GUI and serialization. More to come before… Feb 18, 2011
checkers.py Changed primary move vs. secondary move scoring May 28, 2015
command.py New training files from Richard Pask's SOIC. Jan 15, 2011
composite.py Trying to fix how long subgoals are active. May 20, 2015
controller.py New training files from Richard Pask's SOIC. Jan 15, 2011
creoleparser.py New training files from Richard Pask's SOIC. Jan 15, 2011
crossboard.py Initial add Apr 8, 2015
csp.py Updated csp.py to latest version off AIMA website Apr 8, 2015
document.py New training files from Richard Pask's SOIC. Jan 15, 2011
evaluators.py Changed formation desirability to 0.9 May 23, 2015
formation.py Reconfigured BLACK_MAP and WHITE_MAP to have lists as values instead … Apr 8, 2015
gamemanager.py renamed KEY_MAP Apr 8, 2015
gamepersist.py Tried to fix parsing error with ';' character, but I'm going to have … Feb 1, 2015
games.py Correct 'abstract' keyword to use ABC metaclass Feb 16, 2015
globalconst.py Changed multipliers for center & edge evaluation May 23, 2015
goal.py Formation goals now make moves on board. Apr 25, 2015
goalcrossboard.py First stab at achieving formation goals. Mar 4, 2015
goalevaluator.py Made GoalThink part of AlphaBetaController Feb 27, 2015
goalformation.py Changed primary move vs. secondary move scoring May 23, 2015
goalthink.py Fixed some more formation goal logic. Apr 27, 2015
hyperlinkmgr.py New hyperlink manager to handle opening .rcf files Jan 18, 2011
mainframe.py Reverted back to using CSPs for goal evaluators due to performance is… Mar 7, 2015
move.py Slight change to store annotation info. Jan 18, 2011
observer.py New training files from Richard Pask's SOIC. Jan 15, 2011
onek_eval.py Fixed to PEP8 Feb 16, 2015
onekingattack.py Fixed to PEP8 Feb 16, 2015
onekingflee.py Initial add Feb 16, 2015
player.py New training files from Richard Pask's SOIC. Jan 15, 2011
playercontroller.py First stab at achieving formation goals. Mar 4, 2015
prefdlg.py New training files from Richard Pask's SOIC. Jan 15, 2011
rules.py New training files from Richard Pask's SOIC. Jan 15, 2011
search.py Got latest code off AIMA website Feb 22, 2015
setupboard.py Added option to reset undo & redo lists from the current board config… Mar 12, 2011
test_onek_eval.py Initial add Feb 16, 2015
testcb.py Changes to unit tests to reflect new Move objects. Feb 24, 2011
testcsp.py Changed VCS from mercurial to git. Apr 15, 2015
testthink.py Formation goals now make moves on board. Apr 25, 2015
textserialize.py End of dump() method now rstrips the creole string to avoid problems … Mar 31, 2011
tooltip.py New tooltip module #576688 from Python Cookbook Jan 20, 2011
utils.py Added argmin_score to report back the score of the best item chosen Apr 8, 2015

README.md

Raven Checkers

Project description

Raven is a checkers game program, for one or two players. While there are examples of excellent & free checkers programs out on the net (such as Martin Fierz's Checkerboard), Raven has a few differences.

  • Open-source code. Raven uses existing open source code as a basis (Martin Fierz's Simple Checkers evaluation function and Peter Norvig's search code from the AIMA project) for its AI engine.
  • Cross-platform. Raven is written using Python 2.7 using its standard libraries. It has been tested on Windows, OS X Yosemite, and Linux Mint (Cassandra).
  • Great for checkers study. Raven allows you to quickly set up board configurations using standard checkerboard notation. You can also describe your moves in the annotation window, and you can save and load games for later study. This is great for working through checkers books and learning techniques and tactics.

Future plans

Most checkers or chess programs go the route of deep search combined with perfect opening and endgame databases. These techniques are well-explored and not really all that interesting to me. I plan on making a big change in future versions of Raven by relying more on planning than brute-force search.

Here's what I'm thinking:

  • Implement a planning AI. These plans will be based on tactics and strategies from Richard Pask's books Starting Out in Checkers and Play Better Checkers & Draughts, which I use in my own checkers study.
  • Parse training files in order to inform the AI about best moves and positions, whether for openings or endgames. As the user adds more training information, the AI should automatically get better. I will be switching the file format to XML to make it easier for Raven to parse the information.
  • Represent potential formations (short dyke, long dyke, phalanx, pyramid, echelon) as constraint satisfaction problems (CSPs) and use a quick search to evaluate whether each formation can still be achieved (after each turn) as part of the planning process. The WHITE_MAP and BLACK_MAP dictionaries can be used to populate the domain for the CSP variables (each checker used in a formation). CSP search can be long if the problems are too constrained, but this should be a representation with fairly loose constraints and few conflicts.
  • Make the undo and redo work completely correct with the background AI processing.
  • Begin documenting my design choices with UML. I've been doing a fair amount of exploratory programming up to this point, but I need to illustrate my design if anyone has a hope of understanding it now.
  • Release a new version that contains the planner code. Probably will use PyInstaller. Would like to make an OS X release as well as a Windows release this time around. Have to try to dig up a Linux machine now that my PC went up.