only 1 move in ply 1

Discussion of chess software programming and technical issues.

Moderator: Ras

AndrewShort

only 1 move in ply 1

Post by AndrewShort »

if the engine finds itself with just 1 legal move in ply 1, should the engine simply do that move immediately without any search? Seems like it obviously should, though I wonder if anyone has found any net benefit to having the engine use its allocated time to think anyway, filling the hash table, so that future moves benefit from the time spent filling the hash table. Or perhaps there is some other benefit I haven't thought of...
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: only 1 move in ply 1

Post by wgarvin »

AndrewShort wrote:if the engine finds itself with just 1 legal move in ply 1, should the engine simply do that move immediately without any search? Seems like it obviously should, though I wonder if anyone has found any net benefit to having the engine use its allocated time to think anyway, filling the hash table, so that future moves benefit from the time spent filling the hash table. Or perhaps there is some other benefit I haven't thought of...
In that situation, shouldn't you just move immediately, and then you can ponder on the opponent's time? Pondering will fill the hash table just as well as searching would have.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: only 1 move in ply 1

Post by bob »

AndrewShort wrote:if the engine finds itself with just 1 legal move in ply 1, should the engine simply do that move immediately without any search? Seems like it obviously should, though I wonder if anyone has found any net benefit to having the engine use its allocated time to think anyway, filling the hash table, so that future moves benefit from the time spent filling the hash table. Or perhaps there is some other benefit I haven't thought of...
Only problem with no search is you get no PV, so unless you have an alternative way to choose a move to ponder, doing a short search is a solution. In Crafty, I can find a move to ponder no matter what so I don't have to deal with this...