Page 1 of 2

Accurate eval function

Posted: Wed Mar 18, 2009 12:46 pm
by Kempelen
Assuming a "standard" implementation of common search techniques, does an accurate eval function help to reduce the search tree? I mean, as more accurate eval func more the tree is reduced?

Re: Accurate eval function

Posted: Wed Mar 18, 2009 12:59 pm
by Matthias Gemuh
Kempelen wrote:Assuming a "standard" implementation of common search techniques, does an accurate eval function help to reduce the search tree? I mean, as more accurate eval func more the tree is reduced?
Here we are not programmers.
Please ask your question in the programmers' subforum.

Matthias.

Re: Accurate eval function

Posted: Wed Mar 18, 2009 1:29 pm
by Eelco de Groot
Kempelen wrote:Assuming a "standard" implementation of common search techniques, does an accurate eval function help to reduce the search tree? I mean, as more accurate eval func more the tree is reduced?
I think the answer is yes, there was a thread in the programming subforum, over a year ago where it was described by Alessandro Scotti how Glaurung managed to search much deeper than Hamsters, he thought a main factor was null-move, and François Karr had done a similar experiment from which he concluded that better search depths in Glaurung compared to BugChess2 were for the most part due to a better evaluation!

I found back the original "Going crazy over Glaurung" thread.

There also is a Glaurung version made by Tord with experimental "standard" evaluation function for these kind of experiments, there was a tournament in Polen I believe where programs competed all with the same evaluation function. You would have to ask others for the details about it. But conclusion seems to be that search depth is effectively increased with a better eval function. I suppose this is about the synergy between eval and search.

Regards,

Eelco

Re: Accurate eval function

Posted: Wed Mar 18, 2009 1:40 pm
by BBauer
Absolutly!
Assume you have a accurate evaluation at depth 1.
Now there is now need to search deeper.
You are done!

kind regards
Bernhard

Re: Accurate eval function

Posted: Wed Mar 18, 2009 2:13 pm
by Matthias Gemuh
BBauer wrote:Absolutly!
Assume you have a accurate evaluation at depth 1.
Now there is now need to search deeper.
You are done!

kind regards
Bernhard

Terms used in this thread should be defined early, I think.
What does "accurate" mean ?
If I evaluate only material and king position, giving a bonus for hiding the king behind pawns throughout the game, that is not accurate.
I could change this by taking away that bonus in endgames, granting a bonus for centralizing king or letting it accompany passed pawn in endgames. That is what I call "accurate".
Now there is no need to search deeper ?

Matthias.

Re: Accurate eval function

Posted: Wed Mar 18, 2009 2:32 pm
by BBauer
Accurate means that the difference between true evaluation and program evaluation is zero.
I guess that your program evaluation is usually not accurate.
You know that, therefor you try to get a better evaluation by search.
kind regards
Bernhard

Re: Accurate eval function

Posted: Wed Mar 18, 2009 2:51 pm
by PK
I think that the gain in nodes per depth does not necessarily come from accuracy. This is rather about seeing the big difference between various positions. Back when I learned C by modifying TSCP I noticed that adding terms that cause more score jumps (like strongly preferring B over N, penalizing an uncastled King trapping a Rook etc) tended to lead to better nodes per depth ratio, sine more positions were dismissed by search as not good enough. adding evaluation terms that change slowly (like mobility) didn't have quite the same effect.

Re: Accurate eval function

Posted: Wed Mar 18, 2009 2:56 pm
by Matthias Gemuh
BBauer wrote:Accurate means that the difference between true evaluation and program evaluation is zero.
I guess that your program evaluation is usually not accurate.
You know that, therefor you try to get a better evaluation by search.
kind regards
Bernhard

You seem to mean not just "accurate" but "accurate and complete" , i.e "perfect".
The question is: which of these two is the starter of this thread referring to ?

Matthias.

Re: Accurate eval function

Posted: Wed Mar 18, 2009 3:13 pm
by BBauer
Here is something from the dictionary in german.

genau
exakt
richtig
akkurat
korrekt
präzise
zielgenau
zutreffend
fehlerfrei
pünktlich
sorgfältig

So accurate and perfect is pretty much the same.
Kind regards
Bernhard

Re: Accurate eval function

Posted: Wed Mar 18, 2009 3:24 pm
by Tord Romstad
Eelco de Groot wrote:
Kempelen wrote:Assuming a "standard" implementation of common search techniques, does an accurate eval function help to reduce the search tree? I mean, as more accurate eval func more the tree is reduced?
I think the answer is yes, there was a thread in the programming subforum, over a year ago where it was described by Alessandro Scotti how Glaurung managed to search much deeper than Hamsters, he thought a main factor was null-move, and François Karr had done a similar experiment from which he concluded that better search depths in Glaurung compared to BugChess2 were for the most part due to a better evaluation!

I found back the original "Going crazy over Glaurung" thread.
That discussion was about the speed of search in a single, very special position (the opening position), and the point being made was actually that Glaurung searched this position fast because of its (at the time) very bad evaluation function, which allowed it to "refute" strong first moves like 1. c4 with a null move.

About the question asked in this thread: One of the characteristics of a good evaluation function is that it is "continuous", in the sense that in a quiescent position, the static evaluation should be approximately equal to the static evaluation after the strongest available move in the position. Continuity in this sense does improve the efficiency of the search, because the best move and PV won't change as much from one iteration to the next.

However, continuity is not a sufficient condition for a good evaluation function. It is possible to write an evaluation function which is very bad, but still has good continuity, and therefore makes the search efficient. As a trivial example, consider an evaluation function which always returns 0, regardless of the position. The evaluation function is perfectly continuous and gives a blazingly fast and efficient search, but it certainly wouldn't be good. :)

Tord