Checkers AI Test


  • *
  • Posts: 430
I really like to test out all sorts of different game ideas, more to see if/how I can create them then to actually make a complete game. One day a long time ago, I was thinking about how I could create an AI that could play checkers, and win (that's the most important part). I got a great idea for a point-based decision making system, wrote it down and started work on a playable checkers game. I was able to get the basic controls up and running before I moved on to a more interesting project (which usually happens to me once or more a week).

Almost a year later, I've finally gotten around to finishing up this Checkers project. I fixed a bunch of bugs and improved some other things using the knowledge I've learned since I originally created it.

Play it here!

List of things to do:

- Fix some of the player-control bugs
- Get a basic AI set up
- Add in SFX and prompts
- Add ability to double- and triple-jump
- Set up Stencyl Checkers AI™ v1.0

Here's how the current AI works:

1. Check the number of black checkers on-screen.
- 1a. If there are no black checkers, end the game.
2. Choose a random checker to move.
3. Check through this list of moves, and perform the first available one:
  • Jump down-left
  • Jump down-right
  • (King) Jump up-left
  • (King) Jump up-right
  • (King) Move up-left
  • (King) Move up-right
  • Move down-right
  • Move down-left
4. If none of these moves are possible, repeat steps 2-3, up to 10 times.
5. If a move has still not been found, the AI is stuck and it becomes the player's turn.

The AI I am planning to create will check through every possible move, assigning them different point values depending on several factors (capturing pieces, losing pieces, crowning a king, etc.). It will then perform the move with the most 'points'. I'm not sure exactly how good it will be in competition, but it shouldn't be able to randomly commit suicide, as the current one does. ;)
Fontstruct - Stencyl - Website (in progress)

Proud Member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.