Sunday, April 7, 2013

Checkers = solved

I've finally got my checkers game working correctly with game tree logic. In the end I used a 2d array and checked the validity of the moves depending on their start and end spaces. There was also a bit of hard-coding. I feel like I could have probably done it in a more systematic way but I couldn't figure it out and I figured since this was not the problem I'm actually trying to solve it's fine if I just lay down the rules manually.

The evaluation function I ended up using takes into account how many pieces of each color there are on the board, how far each non-king is away from the edge and how many kings there are. The function that gives a number value to a board evaluates the boards "statically" so that it can decide how good or bad of a board it is based only on it's current state.


No comments:

Post a Comment