View Single Post
Old 03-19-2011, 05:17 AM   #189
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 527
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Draughts

Hi everyone,

Here's an initial 2-player implementation of Draughts. I ended up doing this essentially from scratch, since that was easier than adapting something pre-existing. However, I haven't started working on the 1-player mode AI yet. That might take a lot longer! (Note that there is an Auto ON/OFF toggle, but it doesn't do anything yet...)

This game only allows valid moves, and recognises both types of win (outright victory by taking all your opponent's pieces AND your opponent has no valid moves). It has an undo with depth 10.

I've tested it on my 600, and it works. Next step, AI...

Sincerely,
BenChen.

UPDATE 1: I have added an initial AI routine. The AI code is based on a Draughts game by Kurt Grigg (http://www.hypergurl.com/games/draughts.html) But I have adapted it and refined it, adding a couple of extra steps, which has improved the difficulty a little.

UPDATE 2: I noticed that occasionally the AI would hang, so I tracked that bug down.

NOTE: Latest version of zip file is not located in post #193.

Last edited by BenChen; 03-20-2011 at 11:20 AM. Reason: Latest version in different post now
BenChen is offline   Reply With Quote