Sunday, May 29, 2005

The 7-piece suicide checkers database

Last week, I computed the 7-piece suicide checkers database. First, I changed my database generator so that it can now also compute databases with more than 4 pieces per side. For suicide checkers this is necessary, since positions with e.g. 6-1 pieces are not clear at all, they might be either a win or a loss (no draws, I think). The 7-piece database took 2 days to generate, and in compressed form it is 2GB large. That is much larger than the regular 7-piece database. I probably won't build the 8-piece suicide database, it will be huge in compressed form and practically unusable. I have restarted my suicide book generator again from scratch, with the larger database the book it generates should be much improved.

Sunday, May 22, 2005

More old code

I built a 6-piece suicide checkers endgame database (up to 4 vs 2 pieces, no 5 vs 1) a couple of months ago, and generated a suicide checkers opening book with Suicidal Cake. One of the problems in suicide checkers is that endgames which are materially lopsided are not clear at all. Imagine a situation where one side has one piece remaining, and the other side has N, with N being a large number, e.g. 4. Sometimes the position is such that the side with one piece manages to lose his last piece, sometimes not. If he can't do that more or less immediately, he will usually lose; like in normal checkers, it is good to have more material in suicide checkers. There are many exceptions though, and for these Suicidal Cake should have a larger database, especially also lopsided databases like the 5 vs 1 which I didn't generate. I didn't generate it because my old database generator was limited to 4 pieces per side. This weekend, I cleaned up my old db generator (it hurt!), and removed this 4-piece limitation. I plan to build at least the 7-piece suicide database including all lopsided databases with the new generator.

Saturday, May 21, 2005

The new book, finally

This week I released a new install package for CB - with the latest versions of CB, Cake, and the opening book. The new book has 93'000-something moves, just like the old one, but it should be quite a bit better. The last result of the matches against KingsRow with the final book was

  • mailplay:
    +0 -4 = 20
  • lost:
    +16 -18 =2
  • normal:
    +4 -13 =271

In fact, this is a worse result than I got at 74'000 moves; however this is most likely just because of KingsRow's random opening choice. With the original book, the result is

  • mailplay:
    +0 -7 =17
  • lost:
    +8 -18 =10
  • normal:
    +4 -15 =269

which is clearly worse, although the improvements are mainly in mailplay+lost openings. This is mostly because of the new book generator which looks at unbalanced ballots deeper than the old book generator.
I also wrote a book merge tool with which I have replaced the old database entries in the opening database with their new counterparts. Since quite a lot of play has changed in the opening stages, it will now take a long time for the book generator to expand these new lines to the same level as the old lines, so don't expect a new big book any time soon.

Wednesday, May 18, 2005


This post seems quite unrelated to checkers programming (but it's not), but I can't help it - I just have to digress! Across the street from our house, a mobile phone company is planning to build a base station. Concerned citizens in the neighbourhood have already formed an anti-antenna interest group and are trying to prevent it. My neighbour, a 50-ish woman, asked me what I thought about it, and also told me that she had heard (at a meeting of this anti-antenna-group) that such an antenna was especially dangerous within a 46-meter radius. Because we live within this radius the woman was concerned.

I am constantly amazed at how little the general public understands about the basics of physics, or science as a whole. Our society is dominated more and more by ever-improving technology, but nobody understands it. You can claim ridiculous stuff - like that an antenna is dangerous within a certain radius, but not any more if you take one step further away from it, and people don't understand that this kind of reasoning is hogwash. If I had tried to explain to her that there was such a thing as ionizing and non-ionizing radiation, and what the difference is in terms of health hazards, I would have failed completely (If you really want to know about health issues and mobile phones, see the FAQ of John E. Moulder). This phenomenon I just observed is called innumeracy and is the much-overlooked but much more common cousin of illiteracy. I don't know if there is also such an in/il-term for not knowing any science. If there was, it would explain why people hold magnets in their hands for hours in the belief that this will cure them from some kind of disease; and also people would stop asking for proofs that something is safe. You can only prove that something (mobile phones, genetically engineered food, smoking etc) is not safe, never that it is safe.

You will ask: what has all of this got to do with checkers programming? It's quite simple: programming is sometimes called computer science, and when you write a checkers program and want to make it better, you have to make use of scientific methods. You need to devise methods to test your program, so that you can measure progress. You need to apply changes and either reject them or accept them on the basis of your test method. If you don't have the tools to test your program, and if you don't regularly test your changes, your program will not improve. I guess my neighbour will never write a good checkers program!

Sunday, May 15, 2005

GUI checkers 0.99

Jon Kreuzer has released a new version - 0.99 - of his GUI checkers. You can download it on his checkers page. It is much better than simple checkers, but (still) weaker than KingsRow or Cake. It also comes with complete source code!

Tuesday, May 10, 2005


To develop a good game playing program, you probably have to be a bit of a nerd. I just tested my nerdiness and achieved the following:

I am nerdier than 70% of all people. Are you nerdier? Click here to find out!

How about you?

Sunday, May 08, 2005

The Big Ball of Mud

After writing that I didn't want CheckerBoard to become bloatware like so many other programs, I wondered whether there was a formal definition of bloatware. Wikipedia is a fantastic online encyclopedia, free for all to use (and to improve!) - and indeed there was a chapter on bloatware in Wikipedia. Reading through the article and following some links I can now improve on my old code posting: Wikipedia has a comprehensive list of bad programming practices, and I found a lot of things I was guilty of! The top problem of CheckerBoard is that it is a big ball of mud. Related problems are lava flow, procedural code, action at a distance and accumulate and fire. Read the articles and have a good laugh imagining me wading in my big ball of mud :-)

Another book update

Back from my chess tournament, I tested the latest version of the new book - it is now at 74'000 positions. It has improved further and got the following results in the 2s-per-move match against KingsRow 1.14p (with its massive 800'000 move book):
  • mailplay:
    +1 =19 -4
  • lost:
    +14 =4 -18
  • normal:
    +4 =274 -10
I'll keep the generator running for another week, when the new book will be about the same size as the old book that was published on the web - then I will publish a whole new installation package for CB; it's high time I did that anyway - the last versions of CB were all only available as zip-files. One of the reasons for computing a new small book was that I wanted to both have a stronger book for the installation package and not turn CB into bloatware (software which uses more diskspace on every new release), like most other programs out there. It looks like my ideas about the new book were quite right - it is already better than the old book!

Wednesday, May 04, 2005

Old Code

When I added a few features to CheckerBoard a few days ago, I once again was confronted with my programming past. CheckerBoard is such an ugly program, it makes me want to throw it all away, and start over, or rewrite everything seriously. Unfortunately, that would take a lot of time so I never do it. I cleaned up a bit of code that was particularly awful, but there is still lots I would like to fix some time. What do you do with your old code?

Sunday, May 01, 2005

CheckerBoard 1.63

I posted CheckerBoard 1.63 as a zipfile on my website. Download it now and unzip the contents into your CheckerBoard folder. The zipfile contains CB 1.63 and an updated helpfile. What's new? I fixed a bug in the user book, and added new search features: in the search mask, you can now search with the current board position too, and results of previous searches can be accessed rapidly with new search functions.