Als Antwort auf:/In reply to: Re: AEGT : list of participants, with version numbers geschrieben von:/posted by: Uri Blass at 23 July 2004 16:12:24:
Hello Uri,Maybe Crafty is using superior compiler.So do I. In Gothmog, I always blamed the miserably low nodes/second countYes, speed ! I spend all my time wondering how others do it .
on my complicated evaluation function. After working for some time on Gothmog's
successor, I am no longer so sure. My board representation and data structures
look good, and the code is simple, straightforward, and with no obvious
inefficiencies which I can see. The evaluation currently consists of material
and piece square tables only, and the score is incrementally updated when moves
are made/unmade.
This sounds like a speed monster, but it isn't. On my PIV 2.4 GHz, the
nodes/second count is comparable to Crafty's. Not very impressive for a
program with only incremental eval. I wonder what I am doing wrong.
Tord
Did You try to use the same compiler that you use for gothmog for Crafty
and compare the speed of Gothmog with Crafty?
Another question is if you count nodes the same as Crafty.
As far as I know crafty includes also illegal moves as part of it's nodes.
In the case of movei I never expected to have the same speed as Crafty because my makemove update information about the attacked squares and as far as I know Crafty has not this information.
I am happy enough with the fact that movei has similiar speed to some commercial programs like Shredder or Hiarcs and I believe that no speed improvement is needed in order to be stronger then them(only better algorithm).
Latest version also does not do incremental update of piece square tables.
The problem is that there are different piece square table for opening and
endgame and I decided that it is better to lose some speed and do the code more simpler in order not to have bugs(it only costed me something like being 5% slower in nodes per second and the improvement that I did later in evaluating transition from opening to endgame based on some average between opening king table and endgame king table in similiar way to fruit is probably more than it).
Uri
I'm wrestling with this exact problem now. I'm toying with the idea of
maintaining *two* piece table variables, one for the opening/middlegame and
one for the endgame. These variables would get updated incrementally in the
make/unmake move functions and averaged in the final evaluation.
I'm not sure yet if it's worth it, since it may become too unwieldy. One
potential trouble spot is the scoring of the king's location. Djinn uses
different piece king tables in the endgame, depending on the locations of the
pawns. For example, if all the pawns (for both sides) are on the queenside
then the piece tables encourage the king to move towards the queenside, (and
of course the converse is true for the kingside).
My proposed solution for this is to hash the information about which table to
use in the pawn hash table. And while this works for this problem, there are
others that are not so easily solved.
regards,
--tom