Author: Stuart Cracraft
Date: 10:24:53 07/14/04
Go up one level in this thread
On July 12, 2004 at 18:40:24, Dieter Buerssner wrote:
>On July 11, 2004 at 23:15:03, Stuart Cracraft wrote:
>
>>Regarding 26 ply in Fine 70, my problem is simply that my code with
>>my hardware can't get there in a reasonable period of time. 4 1/2
>>seconds for 21 ply won't give an answer for 26 ply for quite a long
>>time in my case. (22 ply = 55 seconds), 23 = 100 seconds, 24 = 123 seconds,
>>25 ply = 297 seconds, 26 ply = 780 seconds. And it sees the two pawns
>>there as you predicted. But later at the 30th ply it sees only one
>>pawn advantage.
>>
>>So my code must be non-optimal or the hardware is too slow or a combination.
>
>I would fear, it is the code. Many engines will solve this in a fraction of a
>second on modest hardware. I would suspect a (serious) problem with hashing,
>when seeing the times you give. There are so few pieces on the board, and much
>is blocked. You must get very many transpositions, and because there are few
>moves possible anyway (for a long time - until one pawn queens), typically
>engines reach depth 30 or more here extremely fast.
>
>Regards,
>Dieter
Hi Dieter,
Please see if you see anything obvious with my basic search.
Any comment you make is welcome.
search(depth,alpha,beta)
if draw-rules-met return draw
if extensions-met depth+=1
if depth <= 0 return quiesce()
try to retrieve hash position of current position
if length retrieved >= depth then
if flag is VALID, return score from hash table for position
if flag is LOWERBOUND, set alpha to MAX(score-from-table,alpha)
if flag is UPPERBOUND, set beta to MIN(score-from-table,beta)
if alpha>=beta return score
set flag meaning hashed
endif
if null-move-ok, do it (not endgame, not incheck, not 2 in a row already)
if hashed flag above is set, add a value to make hashed move be searched 1st
generate moves
if hashed flag was set add value to make hashed move 1st
make & search 1st move with best = search(depth-1,-beta,-alpha)
unmake
while (best < beta)
if best > alpha
alpha = best
set best move to current move if top of tree
:
endif
if search timed out, return(best)
if end of move list, break from while-loop
make next move
value = -search(depth-1,-alpha-1,-alpha)
if (value > alpha && value < beta)
best = -search(depth-1,-beta,-value)
else if (value > best)
best = value
set best move to current move if top of tree
unmake
end
if no legal moves found
if incheck
best = -MATE+depth
else
best = STALEMATE
endif
flag = VALID
if (best <= alpha) flag = UBOUND
if (best >= beta) flag = LBOUND
if (length <= depth and there is a best move to store)
store(depth, best, flag, move)
endif
return(best)
Greetings,
Stuart
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.