Changes

Jump to: navigation, search

JS Schach

3,955 bytes added, 18:29, 21 October 2020
Created page with "'''Home * Engines * JS Schach''' '''JS Schach''', (Schachspiel)<br/> a didactic open source chess program by Jürgen Schlottke..."
'''[[Main Page|Home]] * [[Engines]] * JS Schach'''

'''JS Schach''', (Schachspiel)<br/>
a didactic [[:Category:Open Source|open source chess program]] by [[Jürgen Schlottke]], written in [[Pascal#TurboPascal|Turbo Pascal]] and published as [https://en.wikipedia.org/wiki/Freeware freeware] in 1993.
[[Roland Chastain|Roland Chastain]] is hosting the original source code, along with his [[UCI]] adaptation [[Moustique]] based on JS Schach
<ref>[https://github.com/rchastain/moustique GitHub - rchastain/moustique: UCI chess engine derived from a didactic program by Jürgen Schlottke]</ref>.

=Features=
JS Schach features a [[10x12 Board]], and an interesting but suboptimal [[Search|search]] routine.

==Search==
JS Schach's [[Alpha-Beta]] approximation doesn't use [[Negamax|negamax]] nor indirect [[Recursion|recursion]] with [[Alpha-Beta#MaxversusMin|distinct routines]] for alternating max- and min-player,
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 condition is delegated inside the move loop combined with a 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>
int bestEval (int beta, int depth, bool maxplayer) {
int alpha = maxplayer ? -32000 : +32000;
// generate moves ..
while (move = getMove() ) {
// copy-make move
if ((depth >= requestedDepth && !move.isCapture() ) || depth >= maxDepth)
score = eval(...);
else
score = bestEval(alpha, depth+1, !maxplayer);
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;
}
}
return alpha;
}
</pre>
with the initial call
<pre>
bestEval (32000, 1, true);
</pre>
==[[Evaluation]]==
The evaluation considers only the [[Incremental Updates|incremental updated]] [[Material#Balance|material balance]] from the the maximizing player's point of view.
For the minimizing side, the returned value is negated.

=See also=
* [[Moustique]]

=Forum Posts=
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75478 JS Schach's alpha-beta approximation] by [[Gerd Isenberg]], [[CCC]], Cotober 21, 2020

=External Links=
* [http://computer-chess.org/doku.php?id=computer_chess:wiki:lists:native_engine_list Native Engine List] from [[Ron Murawski|Ron Murawski's]] [http://computer-chess.org/doku.php?id=home Computer-Chess Wiki]
* [https://github.com/rchastain/moustique/blob/master/original/schach.txt schach.txt] from [https://github.com/rchastain/moustique GitHub - rchastain/moustique: UCI chess engine derived from a didactic program by Jürgen Schlottke] hosted by [[Roland Chastain]]

=References=
<references />
'''[[Engines|Up one level]]'''
[[Category:Open Source]]
[[Category:Pascal]]
[[Category:Didactic]]
[[Category:DosEngine]]

Navigation menu