19 November 2009

Is it improving?

Checking the game to see if the computer player improved Switched back to human vs computer mode and played a game. I was pleased that it actually won a game. I wasn't trying hard to win, but this is progress.

So far the approach seems to have worked well. The moves it makes are occasionally sensible ones that I would make myself.

Sometimes it makes moves that I wouldn't.

17 November 2009

XNA game. Evolving a better player

I've changed the code so the computer can play against itself. I gave each of the two computer players different weights for the evaluation. This is like having two human players with different playing styles.

Changed the game loop so that they play matches of twenty games against each other using their current weightings. The loser of a match changes their weightings by some small random amount. Then they play another match to see who wins.

I left it to play 5,000 matches to see if it improves. Over time, it ought to evolve into a better player.

16 November 2009

XNA game development

Trying to improve the computer's game:
I gave the software a way of evaluating a position. So some moves will result in a position that achieves a high score, such as capturing pieces, and some a low score, such as having pieces taken or leaving them exposed.

I am working out what to evaluate by noticing what I think is a good position when I am playing.

I gave random weights to each of the methods of evaluating the position, since I can't really say what priority I actually give to the things I consider.

The approach is to sum the results from each of the weighted methods for each possible position and use those to pick the best move.

The computer still loses every time.