Feb 12, 2007

[New Version] v0.22b - New move and transposition table representation, and general optimizations

Changes:
  • Fixed a bug in the isAttacked method that made it do unnescessary checks
  • Changed the way unmake move works. The Board-class now has a history array where it keeps track of passed positions instead of using the Move-objects
  • The Board-class now keeps track of passed Zobrist keys so we do not have to 'unmake' them when unmaking a move
  • The alphaBeta() does not generate moves at leaf nodes anymore
  • Changed ordering values for hash moves and killer moves so they always come first and second (at high depths the history moves sometimes came first)
  • Fixed an issue with reporting time using the UCI protocol
  • The Board-class now keeps track of king positions so we do not need to loop through the boardArray to find them
  • Changed move generation to use arrays instead of Vectors. generateMoves() now fills a given array from a certain index and returns the number of moves that were added
  • Alpha-beta and quiescent search now uses a common big array for storing generated moves instead of creating many small local arrays
  • Moves are now represented by an integer instead of a Move-object
  • The Move-class was completely rewritten and now only contains static methods for analyzing the new move integer
  • Fixed yet another issue with en passants (hopefully they work now)
  • The transposition table now uses an integer array instead of using Hashentry objects. Many new methods for retrieving different values were added

mediocre_v0.22b

8 comments:

Anonymous said...

HAAAA a new version of Mediocre (bouncing :) ).

I will test it tomorrow to see if any improvement is noticable thrgough the "quick test" and the "LCT II test". I will let you know. (I hope so).

Anonymous said...

I made the "quick test" yesterday evening. Surprising result but in the bad sense. Even if Mediocre can compute faster, this time he was not able to find any good answer (the 2 previous versions found 1 good answer). So this version looks weaker but only for this kind of test which might not be relevant for testing engine in development... The good test I suppose it to make Mediocre plays against previous version of itself and against other engine.

Jonatan Pettersson said...

That is weird. It is beating the crap out of the earlier versions. :)

May I ask if Mediocre reaches the depth where it should see the right move, or is it still too slow?

If the final result is not a material gain in some way, Mediocre should have trouble seeing it since positional evaluation is not its forte at the moment. :)

Anonymous said...

I think the problem is that the combinations are too long in general. Moreover there is some positional move to do in some of them. But I think in some cases it computes fast enough and should see the correct move. I can check that on few positions and send you those positions.

Concerning that point, I just sent you an email with 3 games attached. In 2 of them I was able to crush Mediocre because he was not seeing that a mat was close.

Anonymous said...

This version is MUCH stronger than the previous releases because it calculates about ten times as many nodes as the previous release. It inherits very strong pruning from the old releases and reaches high search depths quickly (perhaps there should be some safety checks before nullmoving, e.g. there are positions in which M2 is not found before search depth 9).

Therefore, it is very strong in lightning (first Mediocre release to beat my engine in short time controls), and I guess the biggest problems are its deficiency in king safety and pawn structure evaluation.

As LCT II contains positionally intricate problems and many tests that check positional finetuning, I think that the drop in correct solutions is not too big a problem (however, it includes a few short mates which Mediocre should find).

Jonatan Pettersson said...

Mediocre behaves a bit oddly currently when it finds a mate. It keeps searching although every new iteration just results in the same mate. Perhaps that could be the problem.

However mate in 2 should not be a problem. If you could send me the position I could check into it.

Anonymous said...

I don't have the position with me at the moment, but my source was the epd file "ChestUCI.epd" that comes with the matesolver http://www.uciengines.de/UCI-Engines/Chest/ChestUCI_V44.zip.

It contains mate problems sorted by depth. I find them useful to check whether an engine does what one believes it should do, e.g. the first few positions help you to check whether en passant and castling are implemented in a correct way.

Anonymous said...

Hi! there seems to be a problem with this Mediocre release when it's playing as black.

Leo Dijksman from WBEC has reported some problems in his test tourneys

http://f27.parsimony.net/forum67828/messages/5271.htm
"Problems found:
Last versions of Mediocre seems not to play as black??"