Home

LaMoSca v0.10

Quiescence

Objective

In this version of the program the search depth in the tree of moves becomes variable, so that the analysis stops in stable positions and the horizon effect is removed.

The code

Searching for the best variation in the tree of moves with a fixed search depth is exposed to the "horizon effect": a position is misjudged because the moves immediately after those examined have not been considered. This is especially true when a sequence of captures is cut short. In that case the evaluation of the position is distorted by the temporary material imbalance between the two sides, which lasts until the whole sequence of captures is completed. After analysing the tree to the desired depth, therefore, the search should continue along the branches corresponding to captures until all the captures are over (quiescence) or until a second maximum search depth is reached.

One way to implement this "reduced" search is to change move generation so that only the moves corresponding to captures are saved on the stack (possibly together with promotions, escapes from check, ...), and then to continue the search with the usual algorithms.

Running the program

The log file for the program's opening shows the following moves ("Livelli" means levels, "Risultato" result):

LaMoSca v0.10 Log File - Livelli=4

L=1, A=-2147483647, B=2147483647:
L=2, A=-2147483647, B=2147483647:
L=3, A=-2147483647, B=2147483647:
L=4, A=-2147483647, B=2147483647: L4a8b8=1 L4g8f6=9 L4g8h6=4 L4b7b6=3
L=5, A=-2147483647, B=-9: L5a4b5=103 //Cut Risultato L5: T=1, A=-2147483647, B=-9
L4b7b5=9 L4c7c6=4 L4c7c5=7 L4d7d6=9 L4d7d5=13 L4e7e6=9 L4e7e5=13 L4f7f6=4 L4f7f5=7 L4g7g6=3 L4g7g5=5 L4h7h6=2 L4h7h5=3 L4a6b8=-2 L4a6c5=6 L4a6b4=1
Risultato L4: T=1, A=13, B=2147483647

You can see that, when there is a capture, the analysis continues to deeper levels.

Download

LaMoSca10.zip (9.06 k)

To be completed

  • generation of castling, promotions and en passant captures;
  • detection of drawn positions;

To do

  • time management;
  • efficiency.

Links


Back Index Next