Feb 25, 2007

[Other] Adjustments to evaluation

I rewrote the greater part of the evaluation for some better nodes per second performance.

For example I only calculate king attacks if the queens are still on the board. There are different opinions about this. I think most attacks without queen are pretty harmless, and the occassional dangerous position without queens is either handled by the search or had a queen in the attack up to a point so we already should have 'seen it coming'.

Anyway this rewrite regained the end game playing strength. I think the king attack code occassionally interfered with the general play (not only with worse nodes per second), especially in the endgame.

Here is a test tournament versus the old version of Mediocre. Mediocre v0.23b has piece lists, new evaluation and check extension.
1: Mediocre v0.23b uci 64,5/100 
2: Mediocre v0.22b uci 35,5/100
So Mediocre has gotten a bit stronger.

There are still a few things to work out (connected passed pawns are handled wrong at the moment, and backwards pawns are not handled at all), and also some adjustments need to be made so we can avoid what happened in the following game:


On move 30 Mediocre v0.23b played 30. ... Re7 and evaluates the position to slightly worse. It sees the following moves where it loses the bishop, but considers the passed h-pawn to be enough compensation.

After a few weird moves it completely misses the 35. f5.

These kinds of errors are quite common for some reason, but usually the new evaluation is put to good use like here:


Both king safety, pawn evaluation and rook positioning helped winning this game.

I also need to take another look at the development in the openings, the new version is quite fond of leaving pieces undeveloped even though it gets a penalty for leaving them on the first rank. Perhaps some special code is needed here.

No comments: