This is one of the issues I wanted to deal for a long time. Since I saw this post, I've worked on the static evaluation of passed pawns in 6th/7th versus rook. The main goal was to experiment how to tackled complex static evaluation. I guess that I just succeeded, but it was a humongous pain the the rear end.Uri Blass wrote:It is not going to see it by search if the remaining depth is too smallmetax wrote:No, because it will see by search that the two connected passers get lost.Uri Blass wrote:The rule is simply wrong and the program that solve WAC.002 by evaluation will also play Rxb2 in the following position after search of 3 plies Rxb2 Rxb2 c3 because 2 connected passers on the 6th beat a rook.metax wrote:A common chess endgame rule says "two connected passers on the sixth beat a rook". Is there any program that happens to solve WAC.002 by eval?
[d]8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - -
[d]8/7p/5k2/5p2/p1p2P2/Pr1p1KP1/1P1R3P/8 b - - 0 1
Uri
and if you do not care about cases when the remaining depth is too small then I do not see why do you need to see it by evaluation.
Uri
Gaviota sees Rxb2 in 3 plies, instantaneously, and sticks with it. In the position that Uri posted, Gaviota never considers it. That's good.
Cost: about 500 lines of source code
I am not sure it is bug free either. It was a great challenge...
Since I have done it and it is kind of cool, I may leave it in if I see there are no bugs. But, in terms of efficiency (work/ELO)... oh boy...
Miguel
Code: Select all
setboard 8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - -
d
+-----------------+
| . . . . . . . . | [Black]
| . . . . . . . p |
| . . . . . k . . |
| . . . . . p . . | Castling:
| p . p . . P . . | ep: -
| P r . p P K . . |
| . P . R . . . P |
| . . . . . . . . |
+-----------------+
analyze
********* Starts iterative deepening, thread = 0
set timer to infinite
36 1: 0.0 +1.18 Rb8
179 2: 0.0 +1.15 c3 2.bxc3 Rxc3
587 3 0.0 :-) Rxb2
668 3 0.0 :-) Rxb2
884 3: 0.0 +3.26 Rxb2 2.Rxb2 c3 3.Rb7
2013 4: 0.0 +3.31 Rxb2 2.Rxb2 c3 3.Rb6+ Kf7 4.Rb7+ Kg6
3021 5 0.0 :-(
4082 5 0.0 :-(
6910 5: 0.0 +3.12 Rxb2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Q 8.Rc5
Qd2+ 9.Kf3
3956699 10: 9.5 +5.04 Rxb2 2.Rxb2 c3 3.Rb6+ Ke7 4.Rc6 c2
5.Kf2 Kd7 6.Rc4 d2 7.Rxc2 d1=Q 8.Rc5
Qd2+ 9.Kf3
8924341 11 21.2 +5.20 Rxb2 2.Rxb2 c3 3.Rb6+ Ke7 4.Rc6 c2
5.Kg3 h5 6.h3 Kd7 7.Rc4 d2 8.Rxc2 d1=Q
9242213 11: 22.0 +5.20 Rxb2 2.Rxb2 c3 3.Rb6+ Ke7 4.Rc6 c2
5.Kg3 h5 6.h3 Kd7 7.Rc4 d2 8.Rxc2 d1=Q
setboard 8/7p/5k2/5p2/p1p2P2/Pr1p1KP1/1P1R3P/8 b - - 0 1
d
+-----------------+
| . . . . . . . . | [Black]
| . . . . . . . p |
| . . . . . k . . |
| . . . . . p . . | Castling:
| p . p . . P . . | ep: -
| P r . p . K P . |
| . P . R . . . P |
| . . . . . . . . |
+-----------------+
analyze
********* Starts iterative deepening, thread = 0
set timer to infinite
42 1: 0.0 +0.99 Rb8
198 2: 0.0 +1.02 c3 2.bxc3 Rxc3
793 3: 0.0 +0.96 Rb8 2.Ke3 Re8+ 3.Kd4
1752 4: 0.0 +0.95 Rb8 2.Ke3 Re8+ 3.Kd4 Re4+ 4.Kc3
5100 5: 0.0 +0.95 Rb8 2.Ke3 Re8+ 3.Kd4 Re4+ 4.Kc3 h5
9746 6 0.0 +1.12 Rb8 2.h3 Re8 3.g4 Re4 4.Rd1
12983 6: 0.0 +1.12 Rb8 2.h3 Re8 3.g4 Re4 4.Rd1
27341 7 0.1 +1.08 Rb8 2.h3 Rg8 3.Rd1 Re8
35855 7: 0.1 +1.08 Rb8 2.h3 Rg8 3.Rd1 Re8
89035 8 0.2 +0.96 Rb8 2.h3 h5 3.Rh2 Re8 4.g4 hxg4+ 5.hxg4
Re4 6.gxf5 Kxf5
151478 8 0.4 +1.07 Rb7 2.h3 Rd7 3.Ke3 Re7+ 4.Kd4 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