Dec 23, 2008

[Other] The new Board class

I finished with the new Board class. The biggest difference is the way the piece lists are handled. In the old version I had a class called Piecelist with some very dodgy methods. This is now replaced with a two-dimensional array (12x10) where all the pieces are stored.

I'm running a new tournament to try it out at the moment. It seems it is doing quite well with a slightly faster move generation.

However the biggest bonus is the much clearer code in the Board class.

I don't think this change merits a new release on it's own so I will wait with releasing it until I've made some progress in other areas as well. However if you're interested the changes are commited to the repository on Sourceforge.

Dec 17, 2008

[Other] Little update

I'm currently working on rewriting the Board-class. It was a complete mess but is starting to shape up. The speed gain for the new Board-class is currently at a grand total of 0, but atleast the code is much better looking. :)

Hopefully the gains will come further down the chain, e.g. in evaluation.

Dec 15, 2008

[Bug] Only perfomance.bin working as opening book

I forgot to change a line in the Mediocre-class which handles what book is used. "perfomance.bin" was hard coded to be loaded, instead of taking the path from mediocre.ini.

This will of course be fixed in the next release, but for now you can just change the name of whatever polyglot opening book you're using to "perfomance.bin" and Mediocre will be able to use it.

Dec 12, 2008

[Other] Jim Ablett windows executable

Jim Ablett has compiled an Excelsior Jet executable of Mediocre v0.334.

This time I uploaded it separately to the release at Sourceforge, I will probably do it like that in the future as well.

[New Version] v0.334 - Polyglot opening books

  • Mediocre now supports Polyglot opening books
  • It is now possible to give the path to a polyglot opening book in the ini-file
  • Some more code cleaning was made
Note: I decided to "fix" the broken old opening book by implementing Polyglot opening books in Mediocre, it turned out nicely. I bundled it with Marc Lacrosse' perfomance.bin (Polyglot opening book) for now. Released without a native compilation, just the jar-file this time.

I'd appreciate any reports on bugs with the opening books.

(also a big thanks to Yves Catineau whose Book-class was used in Mediocre for the last two years)

Download here

Dec 11, 2008

[Other] Wrong link on homepage

I apparently misspelled Sourceforge on the homepage to Sourceforget, the second name is quite nice too but obviously wrong. ;)

This is fixed now. Thanks to Claudio for pointing it out.

[Other] Another test tournament

I ran another tournament with the same conditions. This time with the plain Java-version of Mediocre (no fancy Excelsior compilation :) ). These were the results:

Engine Score Me
01: Mediocre 200,5/400 ····················
02: NanoSzachy 18,0/20 11111==1111011111111
03: Hamsters 17,5/20 11111111=11011111110
04: Diablo 17,0/20 11101101111011111111
05: Hermann 16,5/20 1111111101100111111=
06: LittleThought 15,5/20 1=100111111111111001
06: Gaia 15,5/20 11110110=11011111011
08: Counter 13,5/20 1=111==1001=10=10111
09: AliUCI 13,0/20 11110000111101110110
10: Bison 11,0/20 0=010=10111001100111
11: Feuerstein 10,0/20 =01101010011=0101=0=
12: Amundsen 9,0/20 11=001000010100101=1
12: GreKo 9,0/20 10100110001001111000
14: Gibbon 8,5/20 01010001=01011010010
14: Clarabit 8,5/20 000111000=111001=00=
16: BBChess 4,5/20 001010=0011000000000
17: Bikjump 4,0/20 11000000001000000010
18: Lime 3,0/20 10000000=01000000=00
19: FluxII 2,0/20 00000100001000000000
19: Roce 2,0/20 00000000001000000010
21: Vicki 1,5/20 0000000000100000=000

I calculated the estimated ratings for this with the bayesian elo tool and the difference came to 48 rating points. Which of course is quite huge.

Anyway I am going to assume that strength difference is linear so that an improvement in one will result in an equal improvement in the other, that way I don't have to recompile all the time. :)

Dec 10, 2008

[Other] Finally a working executable thanks to Jim Ablett

I updated the release of Mediocre v0.333 again. It now contains Jim Abletts compilation (with Excelsior Jet).

Thanks Jim!

Dec 9, 2008

[Other] Test tournament

I've constructed a test set for Mediocre (again). It consists of 20 engines of various strength, and the 10 Nunn-positions played from both sides. The games are 1 minute for all moves for each side. Ponder off, books off.

So a total of 400 games which takes about 12 or so hours to go through. Here are the first results with Mediocre v0.333 (compiled with Excelsior Jet).

Engine Score Me
01: Mediocre 225,5/400 ····················
02: Hamsters 18,0/20 111111==111011111111
03: Hermann 16,0/20 10111111111010111011
04: Diablo 15,0/20 01111101111011111010
04: NanoSzachy 15,0/20 1=1101=1011001111111
06: Gaia 13,5/20 1=110001=1101110111=
06: Counter 13,5/20 ==1100===01=1=111111
08: Ali 11,5/20 111110=1001001101010
09: LittleThought 10,5/20 10110=00111001010011
10: Lime 9,5/20 1000111010101010001=
11: GreKo 9,0/20 0=1010010110111=0000
12: Clarabit 7,5/20 10=10=001111000=0000
12: Amundsen 7,5/20 1000100=0010010=10=1
14: Feuerstein 6,0/20 00100=010011=0100000
15: Gibbon 5,0/20 01000000001001010100
16: Bikjump 4,5/20 =0000010001100000010
17: Bison 4,0/20 00000000101001100000
18: BBChess 3,5/20 000010000=1000001000
19: FluxII 2,0/20 00000001001000000000
19: Vicki 2,0/20 00010000001000000000
21: Roce036 1,0/20 00000000001000000000
I've not included the version numbers for the engines for the sake of space here. After all I'll be using these exact same engines for some time so it their individual strength doesn't matter.

If someone is interested in what version I used of a particular engine just drop me a note.

[Plan] So what now

There are a few points that need attention before I go on with tampering with the actual engine.
  • Code cleanup - I've already started this by creating packages for the files. It's time to get rid of the static TranspositionTables and other silly stuff.
  • Opening book - I have been using Yves Catineau's opening book parser since two years. It is time I look into this. Polyglot might be an option?
On the horizon:
  • Recreate the Board-class - The Board-class is a mess, and probably a lot slower than it needs to be. I'll see what I can do with it.
  • Transposition tables - Even more mess here. I had no clue when I did this, and I have a feeling there are some serious gains to be made here.
And even further on the horizon is looking into the search again, and eventually the evaluation.

[Other] Excelsior Jet evaluation

I was hoping I could use Excelsior Jet to compile Mediocre. It greatly optimizes the performance and makes Mediocre stronger. However the evaluation version of Excelsior Jet has a 30 days trial, that is in effect in the compiled programs as well (making compiled Mediocre expire in 30 days).

I will have to consider getting a student version of Excelsior Jet (costs $100), or simply use another compiler. I'll probably go for the second option.

Anyway we'll see how it works out.

[New Version] v0.333 - New release setup

  • Mediocre now comes in a jar-executable and a Windows executable compiled with Excelsior Jet (which should be fast)
  • The perft-class has a main-method that can be used to run a standard perft testing procedure
  • The readme was revised
Note: Except for the Excelsior Jet compilation this should not effect the performance of Mediocre at all. It is simply a cleaner release preparing Mediocre for the "future". :)

Download here

[Other] Mediocre download changes

From now on downloading Mediocre will get you a zip-archive containing:
  • mediocre_vX.jar (jar-file used to start Mediocre with java)
  • mediocre_vX.exe (Windows executable, compiled with Excelsior Jet, should be faster then running through Java, and is probably the easiest way to use Mediocre, unless you are on some other platform then Windows)
  • readme.txt (as usual)
  • (Mediocre's own opening book)
  • Mediocre.bat (used to start Mediocre with Java)
  • mediocre.ini (settings file where transposition table size etc. can be set)
The source is available in the CVS-repository from Mediocre's page on Sourceforge.

[Other] New logo

Since I'm picking up work again I thought a new logo (created by myself this time) was in place. Now I just need to get it out there, might be easier said than done. :)

[Other] Webpage updated

The archive webpage has been updated. A bunch of small fixes were made, like guides having the correct formatting, some links corrected or removed etc.

Also only version up to Mediocre v0.332 will be available from there. From now on all releases will be made available on Sourceforge instead.

Take a look!

Dec 8, 2008

[Other] Sourceforge

I'm working on setting up a Sourceforge account. It's a bit of a jungle getting all the bits and pieces together on that page.

The archive webpage is up there now atleast, and I'll start releasing new versions of Mediocre there eventually.

The Mediocre source code will be available through the CVS repository, and I'll see what else fun might be available.

New address to the archives is

Nov 29, 2008

[Programming] Dependency on the static Mediocre-class

While going through the code I noticed many of the classes uses the static variables located in the Mediocre-class. It is not a good idea to use them directly like that, for the sake of encapsulation.

Examples of this is the Evaluation-class which uses evalHash and pawnHash that are located in the Mediocre-class.

So basically every class and method will get an extra argument where the used structure is passed instead.

[Programming] Interface finals

Somewhere in the very beginning of Mediocre I decided to make an interface called "Definitions" which would hold commonly used constants (like EN_PASSANT, W_KING etc.).

The use of an interface for this was something I thought was the "correct" thing to do at the time. However I have learned a lot about Java-programming since then and now I actually understand the real use for interfaces in Java (which in short is a kind of very basic blueprint for a class, which makes sure certain methods etc. exist).

However it seems I got a bit lucky while doing this. The interface is not "intended" to be used like this but it works very well.

The reason for this is that even though a real class with the same function could be created we would have to either use Definitions.W_KING to access the constants or extend the class, creating a subclass, which is not a good idea in the long wrong (a class can only extend one other class).

But since an interface is used it can be implemented instead, eliminating the need for the "Defintions."-part, while still making room for extending other classes if needed (and a class can implement many interfaces).

A problem would of course would be duplicate names (which can be avoided altogether with clever naming, but anyway) since a whole list of variable names gets taken in the Defintions-interface. However if this occurs, all that is needed is to use e.g. Defintions.W_KING again, defining which W_KING is meant.

In short, the definitions-solution I've used for two years now turned out to be a very good way to handle the constants. And I will stick to it.

[Other] Makeover and perhaps results eventually

I started to go through the code of Mediocre again and the first step is to get the (extremely) messy Board-class a bit more readable (and hopefully faster).

To achieve this I migrated the needed classes to a new project, the classes are Board, Move, Definitions, See and Zobrist. All used in some way when generating and making moves on the board. (although See is only used in one line of the Board-class, which i totally forgot what it did, I'll have to look into that)

Also I am extending the Perft-class to become a bit more functional when it comes to testing the moves on the board. Adding a main-method and support for automatically checking for correct values, as well as timing the operations.

A first step towards a total makeover of Mediocre, let's hope it lands somewhere good.

Nov 28, 2008

[Other] Links down (and up again)

So basically I let the blog die without notice, sorry about that. :) And apparently my hosting for the source and executables have also died sometime in the last couple of months.

I will get around to working on Mediocre soon enough. I just have to figure out what I want to do. I have been looking for online solutions where people can play against Mediocre and others using a simple applet, maybe that is something to start working with.

Anyways in the mean time I have put up the site on my University webspace with the not so beautiful address:

(thank you George for making me aware of the dead links)

Mar 18, 2008

[Tournament] Ridderkerk and new tag

While I am at it I can sadly report that Mediocre just missed the promotion to division 4 in WBEC Ridderkerk. A very poor performance in the final unfortunately.

From now on I am going to use the [Tournament] tag for posts about various tournaments Mediocre participate in. Lately that is just about the only thing I have been posting so it deserves its own tag. :)

[Other] Latest executable on own server

Uploaded Jim Ablett's latest executable of Mediocre to my server on so now the link should not break for a while. :)

[Other] Link fixed again

Jim keeps changing his download link for the executables of Mediocre. :) I fixed the link yet again so it should work.

I will shortly take the time to download his executables to my webspace so they stay updated.

As for updates of Mediocre they will probably be some time off still. I recently started on a new job while still studying full time so not much time for any fun. :)

Jan 26, 2008

[Other] Sob and whine

I simply could not get Mediocre to work on Ubuntu through either Xboard or Winboard (using Wine). I had some trouble with it yesterday but thought I could fix it quickly today, I couldn't. :)

Well I will be more prepared before the next tournament. Sorry to CCT for the inconvenience.

[Other] Trouble with links

So one hour to CCT10 starts and I'm struggling to get Xboard and Mediocre to run on my new Ubuntu system. I guess Winboard through Wine will do it. :)

But I noticed Jim Ablett has moved his downloads (which I link directly to) so the executable downloads of Mediocre currently does not work, I will fix this as soon as I can.