unserializable / monchester

Monchester, chess engine for CECP interfaces and console
GNU General Public License v3.0
4 stars 1 forks source link

Engine promotions blocking check or removing checker happened to be bishop-only #8

Closed unserializable closed 3 years ago

unserializable commented 3 years ago

E.g. for 8/8/8/7r/8/1K6/3p4/2k1R3 b - - 0 115:

image

only two bishop promotions are given as valid moves.

115. .. dxe1=B 
        ( 115. dxe1=B Kc4 2. Bg3 Kd4 { 33.65/4 })
        ( 115. d1=B+ Kb4 2. Rh4+ Kc3 { 7.57/4 })

and also:

$ ./monchester --bench 1 "8/8/8/7r/8/1K6/3p4/2k1R3 b - - 0 115"
1:0.000:2:52:1.0-25-gabd4acf:8/8/8/7r/8/1K6/3p4/2k1R3 b - - 0 115

This is due to underpromotion encoding added for 1.0 comparing target squares with promotion encoding to check-blocking checker-removal squares without decoding in mvs_a. Change that comparison to use decoded form.

unserializable commented 3 years ago

Done.

$ ./monchester --bench 1 "8/8/8/7r/8/1K6/3p4/2k1R3 b - - 0 115" 
1:0.000:8:190:1.0.1-8-g934223a:8/8/8/7r/8/1K6/3p4/2k1R3 b - - 0 115