Sunday, 22 July 2007

Final standings...

The tournament was very exciting and Vicki actually won one game and drew another. For an engine that's missing serious components, I am quite surprised. However, I can't wait for the next tournament to start so that I can amaze a few people... grrr... :-)

Mediocre (blog here) did particularly well - the name really does not suit it well. It is far from being Mediocre and to think it is all written in Java! Well done to Jonatan Peterson. He's a real inspiration!

Just for fun, here is the game that Vicki won (my little engine was playing black). I hope to have many of these soon!!

Saturday, 21 July 2007

Official tournament!

Hi all...

I haver entered Vicki into the "The 2007 Second Annual ACCA President's Tournament & 2007 World Computer Rapid Chess Championships". So far, 40 engines have entered and I fear them all! Although this will be a good exposure for Vicki.

I am having difficulties with the transposition table and it seems that Vicki may be the only engine participating without a transposition table at all. At least the improved move ordering is allowing fairly deep tree searches. Also the evaluation function has been improved somewhat and bug fixes have been made. I'll add this version of Vicki to the website soon.

I know Vicki will be obliterated in this tournament - but if I can only get one draw, I'll be very happy :-)

Hold thumbs!

Tuesday, 03 July 2007

Hello? Someone there?

Not a single post in June does not mean that I have not been busy! I have the new version of Vicki almost ready. Only a few more tweaks before release. My focus has been on the static evaluation code which was rather poor up till now. I separated the evaluation function into 3 sets, depending on opening, middle or endgame.

The transposition table is working... but I did expect a bit more... at least it is working. A few nasty bugs are still lurking in the code during draws which I still need to resolve.

I am also implementing better time control and rewriting the winboard section so that Vicki claims draws and end the game after losing/winning.

I'm also running tournaments to measure the development of the engine. This can be viewed at http://www.vicki.co.za/test.html and is updated real-time.

If only I had more time!

Friday, 25 May 2007

Transposition tables and tidying up.

I realised this morning that it has been quite a while since my last posting. I am currently working on a number of things in Vicki and my guess is that release 0.04a would be significantly stronger than the previous versions. I am somewhat reluctant to drop the alpha qualifier, but perhaps I will in the next release (version 0.05beta).

I currently have a structure called CHESSENGINE that I pass around (or the pointer to it) between functions. I realised that this parameter-passing may actually degrade performance, cause problems because of its size (I’m not completely sure, but isn’t there a limit of 64k on a "struct"s – even on modern operating systems?) and waste quite a few clock cycles to find the data element within this structure. Regardless, all I gain from this is the ability to have multiple engines in the same process as its state is completely described by this one chunk of data. I’m moving away from this and dumping everything as global variables and structures in a header file. Who wants multiple engines (of the same kind and strength) in the same process anyway?

I am also implementing an elementary transposition table and cleaning up the code as I go. At the moment I am having problems getting it to work, but I’m sure it is just a case of a silly bug lurking somewhere. Once this are done, Vicki will not be such a pushover anymore! ;-)

I’ll keep you all posted...

Tuesday, 15 May 2007

Testing 1, 2, 3,..., 99282111917764

I am currently experimenting with killer-moves, splitting of the evaluation function (opening, middle and end-game), aspiration windows and all kinds of small tricks. For now, I'm leaving transposition tables for later. The idea is to optimise this part of the engine so that the impact of transposition tables will be maximum.

I'm running tournaments on my computer and I wrote a little Java application to upload the file to my FTP account every now and again. The current tourney is between 9 engines, 15 minutes a side and 2 rounds. For up-to-date, semi-real time updates, visit the test page.

Tuesday, 08 May 2007

Re-engineering...

OK, I realised that this early exit strategy (in SEE) of mine is actually pretty dumb. I replaced it with a very elementary minimax search to evaluate the entire capture sequence for both sides. The results were rather good. I search on average a ply deeper with only SEE in quiescence search (no ordering in the alpha-beta). By adding the improved move ordering in alpha-beta as well I get another ply deeper with longer time controls.

Although Vicki is no push-over any more, a significant amount of work still lies ahead. In order of implementation this is:
  1. A long, hard look at the evaluation function of end-games. Vicki struggles with KQ vs. K (never mind KR vs. K).
  2. Move ordering within alpha-beta can still be improved.
  3. Killer-moves, history heuristics and null moves (I may implement transposition tables before null moves though).
  4. Transposition tables.
  5. Hash tables (evaluation, pawns, etc.).
  6. Opening books (adaptive?) and perhaps even end-game databases.
  7. Pondering.
  8. Learning.
  9. Factor X.
Factor X is basically that element in Vicki that makes it unique. I don't think I'll be happy with "just-another-chess-engine.". What is factor X? I don't have any idea...(yet!)

Version 0.031alpha an now be downloaded at Vicki's home.

Wednesday, 02 May 2007

Move ordering

If there is one thing in chess programming that cannot be overstressed then it is coffee. Without coffee all is lost... No really, the difference move ordering can have to an engine cannot be overstated. After resolving a few nasty bugs, Vicki now boasts the following move ordering:

  1. The previous PV of iterative deepening is feed back into the search. This is been implemented for a while, but I fixed a bug here which caused the engine to hang. A slight difference is that the entire PV line is used, even if a better line is found the previous line is still investigated first. I was quite amazed by the speedup gained from this.
  2. Quiescence search now uses a Static Exchange Evaluation (SEE), which turned out far easier than I thought and to my surprise, caused a fair amount of speedup. The SEE I use also uses an early exit technique. Say for example, I have a pawn and queen attacking a bishop, while my opponent has two pawns protecting the bishop. The full SEE evaluation will result in a negative value: 3-1+1-9+1=-5 (I gain a bishop and a pawn for a queen and a pawn). With early exit I only realize that I can stop after capturing the knight, resulting in +2. A great move!
Vicki is playing a good game of chess already and I find it difficult to beat the engine with tight time controls (3 mins/less), but still beat the engine 80% of the time if I allow myself ample wetware processing time! ;)

I am now concentrating my efforts on the ordering of normals moves as part of alpha-beta (in conjunction with the PV-value). So far the results are very promising, but it still needs some work before being released.