31 Jul 2001 mstarch   » (Journeyer)

Finished the first of 3 books in a historical novel about Alexander the Great. Now I have to go and find the other 2 somewhere, but I fear they won't be in the bookstores (grumble).

Actually did some weekend coding (the first in a long while), trying to make a decent freecell ai player. I havent made it complete its first game yet, but it seems to be doing fairly well up to the point where it gets confused by long sequences of sorted cards. I guess I'll have to make some special support to detect situations where it's advantageous to move an entire part-column of cards onto another column.

I found good use of the "design patterns" methodology, recognizing the benefits of the command pattern in representing the different permutations of the game state for the decision tree. I have a game state that contains the state of a game at a specific moment. The ai subsequently tries to play a predefined number of moves, where it for each move adds all possible moves from that situation into a list. Each move is assigned a weight depending on how much is gained by performing the move, and this is weighted together with an overall combination of the weight of the obtained game state. Weights are calculated for all attempted moves, and the list is sorted by weight. The next iteration subsequently considers follow- up's to the N best states obtained in the previous iteration. I really am not sure if this will be sufficient to produce a working ai, and I really don't care about the performance. It's just "a bit of fun". I will work a bit more on the ai tonight, tweaking the weights and adding some special moves coded as sequences of basic commands.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!