[ProgClub list] ai-checkers in jj5-test

John Elliot jj5 at progclub.org
Sun Oct 16 06:26:02 AEDT 2011

I've added a new project at ProgClub called 'jj5-test'. I haven't 
created the project page on the wiki yet, but I will eventually. At the 
moment the project is only in svn:


The first 'test' project that I've started was inspired by a lecture 
from the AI class:


Essentially a checkers board is shown, and I was curious as to whether 
red (x) or white (o) could win (depending on who moves first). So I 
intend to enumerate all possible games and see what the story is.

I have no idea if my approach is computationally feasible or not, and 
I'm only about 20% of the way into a solution, but my code is in C and 
available here if you're interested:


I accidentally started on this and have now been working on it all 
night. I think that was a pretty big mistake given the homework for both 
of the classes I'm enrolled in is due Monday morning, and I'm nowhere 
near finished. Whoops. :P

Now that the project is in svn I'll stop working on it, and pick it up 
again later on when I have some spare time. If you're interested in 
working on it for me, please be my guest. To do this you would just need 
to use your ProgClub member login to checkout from the read-write 
repository and then checkin your edits. The URL to checkout for the 
project is:


There are 'compile' and 'test' scripts in the project folder which show 
how to compile and test the application.

One thing that I learned about C while coding up my simulation is how 
you use 'arg lists' or a variable number of parameters to a function. 
Essentially you use the va_start, va_arg and va_end macros. If you're 
interested you can see this in use in the test_calc_next_board function 
starting (at time of writing) on line 215.

More information about the list mailing list