Jump to content
Sign in to follow this  
Spiff59

Battle Checkers

Recommended Posts

Spiff59

In the spirit of the old C-Robots program, I put together a checkers program where the AI is a separate module that can be easily plugged in. You select what AI scripts to run from the main parent program, it performs a little handshaking (launching the child process, telling them what player number they are, and trading handles) then it's off to the races. The child process is passed an array representing the state of the current playfield and returns a simple string indicating the desired move. There are adequate details in the "Dummy" AI script to tell one how to write their own.

It all seems to work pretty well at this point but I plan on improving the setup GUI, improving end-of-game processing, etc. Presently, I'm putting together an AI that ought to be tough to beat. The included AI example "Dummy" is not terribly smart.

Am thinking on trying an actual C-Robots clone, where your AI script will control little tanks runing around an arena trying to blow someone elses AI tank to smithereens. Or maybe a Battle Poker?

Credits to WeaponX for the idea of using the wingdings font to display game pieces. The WM_COPYDATA routines were adapted from forum examples.

As far as submitting AI versions to do battle, I assume we might want to obfuscate them to conceal any "trade secrets" but I'm not sure if it would be prudent to be running already-compiled executables someone submitted as there is potential for malice?

Edit: I fixed the main program to handle not having any compiled AI modules present.

bc_Dummy.au3

BattleCheckers.au3

Edited by Spiff59

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×