Changes

Jump to: navigation, search

JS Schach

41 bytes added, 18:57, 21 October 2020
no edit summary
but direct recursion with conditional statements for the maximizing and minimizing side. The routine isn't used inside an [[Iterative Deepening|iterative deepening]] loop,
but is called with a fixed [[Depth|depth]] of usually 3 [[Ply|plies]] plus [[Captures|captures]] until a maximum depth of 5.
Since there is no explicit [[Quiescence Search|quiescence search]] - therefore , the [[Horizon Node|horizon ]] condition is delegated inside the move loop combined with a [[Make Move|made move ]] was capture condition.
Passing [[Beta|beta]] as parameter while [[Alpha|alpha]] always starts with its extreme initial value, misses [[Beta-Cutoff#Shallow or Deep|deep cutoffs]] - which is not a big deal for the intended depth, but a serious slowdown for deeper searches, as demonstrated by [[Rasmus Althoff]] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75478&start=11 Re: JS Schach's alpha-beta approximation] [[Rasmus Althoff]], [[CCC]], October 21, 2020</ref>.
Further the cutoff conditions are too weak. The following C-like pseudo code is based on JS Schach's function ''maxwertung '' <ref>[https://github.com/rchastain/moustique/blob/master/original/schach.txt#L551 moustique/schach.txt at master · rchastain/moustique · GitHub | maxwertung]</ref>,
but has alpha and beta flipped for the more conventional semantic.
<pre>
if (maxplayer) {
if (score > alpha)
alpha = score;
if (alpha > beta) // should be >=
break;
} else { // minplayer
if (score < alpha)
alpha = score;
if (alpha < beta) // should be <=
break;
}
}

Navigation menu