Skip to content

Commit

Permalink
Use quiescence search for Probcut bench 5404565
Browse files Browse the repository at this point in the history
5404567 is the official bench but 5404565 is correct since official-stockfish/Stockfish@59d1037 was skipped in asmFish. See discussion at lantonov#165 for more details.
  • Loading branch information
CounterPly committed Jun 6, 2018
1 parent f288bb5 commit 0c5e6aa
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions x86/SearchMacros.asm
Original file line number Diff line number Diff line change
Expand Up @@ -641,22 +641,29 @@ Display 2, "Search(alpha=%i1, beta=%i2, depth=%i8) called%n"
call Move_Do__ProbCut

mov edi, dword[.depth]
cmp edi, 5 * ONE_PLY
je .9do_regular
mov ecx, r13d
mov ecx, dword[.rbeta]
neg ecx
lea edx, [rcx+1]
mov r8d, ONE_PLY
xor r8, r8
movzx r9d, byte[.cutNode]
not r9d
mov byte[rbx+State.skipEarlyPruning], -1
call Search_NonPv
lea r10, [QSearch_NonPv_InCheck]
lea r11, [QSearch_NonPv_NoCheck]
cmp byte[rbx-1*sizeof.State+State.givesCheck], 0
cmovne r11, r10
call r11
neg eax
mov esi, eax
mov byte[rbx+State.skipEarlyPruning], 0
cmp eax, r13d
jl .9after_search
.9do_regular:
mov esi, eax
cmp eax, dword[.rbeta]
jge @f
mov ecx, dword[.move]
call Move_Undo
mov eax, esi
cmp esi, r13d
jl .9moveloop
@@:
mov ecx, r13d
neg ecx
lea edx, [rcx+1]
Expand All @@ -666,7 +673,6 @@ Display 2, "Search(alpha=%i1, beta=%i2, depth=%i8) called%n"
call Search_NonPv
neg eax
mov esi, eax
.9after_search:

mov ecx, dword[.move]
call Move_Undo
Expand Down

0 comments on commit 0c5e6aa

Please sign in to comment.