Jan 21, 2009

[Other] Evaluation "problem"

One of the (many) bugs I've discovered while working with Mediocre the last month was that it uses the wrong piece square tables for the most part of the games.

Mediocre has two kinds of tables, for opening/middle game and for endings.

The bug was that Mediocre changed to ending tables after the opening phase. That is awarding moving the king and queen into the center etc. in the middle game...

The weird part is that this greatly improves the performance of Mediocre. "Fixing" the bug in v0.334 and running a match against a non-fixed version results in a clear victory for the latter.

I assume this has to do with the mobility/piece square features not being scaled as they should.

I will have to take a long look at the evaluation again since this is clearly a bad thing. :)

Jan 16, 2009

[Other] Two games from ICC

Having left Mediocre on ICC for the evening I got back and noticed two quite exciting games. Not so much the games but who had played. :) (Jaan Ehlvest played a match against Rybka in 2007 which makes him a particulary fun opponent to meet)





Jan 15, 2009

[Other] Some progress

I finally have a version of Mediocre that seems better than v0.334, a few more things to fix and it's ready for release.

The rewritten Board-class is both a blessing and a pain, I have found quite a few bugs due to it, simply because it doesn't accept faulty positions and moves at all. It immediately crashes the program. :)

This is a good thing of course since tricky bugs are much easier to find.

However to my disappointment it seems it actually turns out to be slightly slower than the old Board-class. Not when running the perft-tests, but rather when the engine is actually up and running (searching moves). I'm guessing it is due to the increased number of method calls, especially in the evaluation (things like board.getWBishops()[0].getPosIndex()).

At one point I was thinking about throwing it away, but it is just so much better coded now that I just can't. I will have to try to find some optimizations later on instead.

-

I'm currently working on adding some endgame knowledge. I was thinking about adding support for tablebases, however I will put that off for some time. Instead I'm adding basic endgame positions (like KPvK etc.) manually. More fun and less work that way. :)

As a measure I'm using the eet.epd endgame test suite. Mediocre v0.334 scored 15/100 at 5 seconds per position. I want the next version to get around 30/100.

Jan 11, 2009

[Other] Bugs bugs bugs

The new Board-class of course had a bunch of more or less obvious bugs.

The last was a bug showed itself deep in the search trees (14 ply searches or more usually) and caused Mediocre to crash.

After 6 hours of bug-hunting I narrowed it down to pawn endings where one side had a pawn that still could move two steps.

Once found it was very obvious (and quite severe)... the zobrist key was updated according to where the en-passant-capturing pawn moved, and not to where the captured pawn actually was.

This caused faulty moves to be used in the search (from the hash move). Of course this didn't show up in the perft-checks since the zobrist was updated "correctly", just that the key was actually wrong.

Also it didn't show up until late in the trees (and usually in pawn endings) since the transposition table had to be quite full in order to moves actually existing in the faulty key-places.

-

Anyway, after some testing this new Board-class seems to offer a slight improvement in strenght. On to more interesting things.

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

Changes:
  • 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.