It seems that Deep Fritz understands this position better than any other engine.beachknight wrote:Analysis after 1...Rb4:
1562: 2b5/1r6/2kBp1p1/p2pP1P1/2pP4/1
2b5/8/2kBp1p1/p2pP1P1/1rpP4/1pP3K1/1R3P2/8 w - - 0 1
Analysis by Deep Fritz 11:
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q
-+ (-1.90) Depth: 28/50 00:00:30 260mN
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q
-/+ (-1.21) Depth: 29/54 00:00:55 478mN
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4
-/+ (-1.01) Depth: 30/57 00:01:34 807mN, tb=12
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4 c2
-/+ (-0.99) Depth: 31/58 00:02:44 1420mN, tb=68
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4 c2
-/+ (-1.24) Depth: 32/53 00:05:30 2888mN, tb=149
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4 c2 13.Qc6 Qh7+ 14.Kg4 Qe4+
-/+ (-0.86) Depth: 33/62 00:09:01 4734mN, tb=674
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4 c2 13.Qc6 Qh7+ 14.Kg4 Qe4+
-/+ (-0.98) Depth: 34/65 00:16:26 8692mN, tb=1892
(, chessengines20 13.07.2009)
WAC.230 revisited yet again
Moderators: hgm, Rebel, chrisw
-
- Posts: 12542
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: WAC.230 revisited yet again
-
- Posts: 3533
- Joined: Tue Jan 09, 2007 8:33 pm
- Location: Antalya, Turkey
Re: WAC.230 revisited yet again
I agree. A difficult position for engines ?! Perhaps more longer runs needed.Dann Corbit wrote:It seems that Deep Fritz understands this position better than any other engine.beachknight wrote:Analysis after 1...Rb4:
1562: 2b5/1r6/2kBp1p1/p2pP1P1/2pP4/1
2b5/8/2kBp1p1/p2pP1P1/1rpP4/1pP3K1/1R3P2/8 w - - 0 1
Analysis by Deep Fritz 11:
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q
-+ (-1.90) Depth: 28/50 00:00:30 260mN
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q
-/+ (-1.21) Depth: 29/54 00:00:55 478mN
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4
-/+ (-1.01) Depth: 30/57 00:01:34 807mN, tb=12
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4 c2
-/+ (-0.99) Depth: 31/58 00:02:44 1420mN, tb=68
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4 c2
-/+ (-1.24) Depth: 32/53 00:05:30 2888mN, tb=149
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4 c2 13.Qc6 Qh7+ 14.Kg4 Qe4+
-/+ (-0.86) Depth: 33/62 00:09:01 4734mN, tb=674
2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2 9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+ 12.Kh4 c2 13.Qc6 Qh7+ 14.Kg4 Qe4+
-/+ (-0.98) Depth: 34/65 00:16:26 8692mN, tb=1892
(, chessengines20 13.07.2009)
Best,
hi, merhaba, hallo HT
-
- Posts: 4567
- Joined: Sun Mar 12, 2006 2:40 am
- Full name:
Re: WAC.230 revisited yet again
Thanks Dann! Actually I did continue the analysis but there was a crash of the engine after about 1144 minutes I have no idea what happened and running the engine in debug mode would probably take about a week to reach the same point? I hope it was "merely" an extension explosion as that is a part which will change anyway. If it is a really obscure bug I don't think I have much chance in finding it...Dann Corbit wrote:{snip}Actually, after only 68 minutes, the eval is falling quite nicely. This is a promising result.Eelco de Groot wrote: 20.01 68:18 +2.84 1...Rb4 2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3
5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2
9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+
12.Kg4 c2 13.Qf8 d4 14.Bc1 Kd1 (4.154.951.935) 1013 [/color]
Eelco
20.01 68:18 +2.84 1...Rb4 2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3
5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2
9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+
12.Kg4 c2 13.Qf8 d4 14.Bc1 Kd1 (4.154.951.935) 1013
21.01 215:46 +2.33 1...Rb4 2.cxb4 (12.149.450.974) 938
21.02 240:55 +2.33 1...Rh7 (13.624.632.955) 942
22.01 624:11 +2.17 1...Rh7 2.Rb1 Kb5 3.Ba3 Bd7 4.f4 a4
5.Kg2 Rh4 6.Kg3 Rh8 7.Kg2 Kc6 8.Rh1 Rb8
9.Bb2 Kb5 10.Kf3 Bc6 11.Ke3 Ka5
12.Kd2 (35.338.216.807) 943
The engine was here thinking about 1... Rb4 again but after 1144 minutes caused a failure that had Windows XP close it down.
Build 186 is changed from the version that I used for the Jon Dart's Likavsky - Huzman position analysis, it is an experimental engine with a new definition of Board Control, but here I think it proves unstable and the score for 1... Rb4 is rising again when it should be decreasing. I think it is partly because hash is only 256 MB which should mean that later PVs for 1.Rb4 have to be build for a large part from the ground up because much of the information for 1. Rb4 in the transposition tables is by then overwritten, and then analysis goes off, also because Board Control computes too much difference in scores for board control depending which side has the move and this causes an unstable new PV. It is maybe not off by much, but here that is critical.
I'll post the code used for Board Control in build 186 later, but I think the following analysis, after a promising start, went wrong in the final ply, I did not continue analysis with this build long enough to see if the score for Rb4 would eventually go down again:
W.A.C. 230
2b5/1r6/2kBp1p1/p2pP1P1/2pP4/1pP3K1/1R3P2/8 b - -
Engine: Ancalagon 1.3 Weak Squares 180 Board Control middle game 50 - endgame 50 Build 186 (256 MB)
by Romstad, Costalba, Kiiski, de Groot
10.01 0:03 +2.66 1...Rf7 2.Rb1 Rh7 3.Ba3 Kb5 4.Bc5 Rh8
5.Kg4 Rh2 6.Kg3 (3.265.261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3 Rh5
5.Kg4 Rh2 6.Kg3 Rh7 7.Bc5 Bb7 8.Kf4 Rh3
9.f3 Rh2 10.Ba3 Bc8 (2.520.883.902) 1013
20.01 66:21 +2.68 1...a4 2.Ba3 Rh7 3.Rb1 Rh5 4.f4 Bd7
5.Kg2 Rh4 6.Kg3 Rh7 7.Bc5 Kb5 8.Ba3 Ka5
9.Bc5 Bc8 10.Bb4+ Kb6 11.Bc5+ Kb5
12.Kf2 Rh3 (4.006.124.874) 1006
21.01 133:51 +2.31 1...a4 2.Ba3 Rh7 3.Rb1 Rh5 4.f4 Bd7
5.Kg2 Rh4 6.Kg3 Rh7 7.Kg2 Be8 8.Rh1 Rb7
9.Bb2 Kb5 10.Kf3 Ka5 11.Ke3 Bc6
12.Rh8 (7.730.392.313) 962
21.02 268:54 +3.01 {?! Evaluation too high, maybe inaccurate or possibly simply unstable} 1...Rb4 2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3
5.Re2 Kc4 6.f4 Kxd4 7.f5 Kd3 8.fxg6 Kxe2
9.g7 b2 10.g8Q b1Q 11.Qxc8 Qd3+
12.Kg4 c2 13.Qc6 Qf5+ 14.Kh4 Qe4+ (14.503.732.009) 898
best move: Rb7-b4 time: 486:34.109 min n/s: 851.779 nodes: 24.866.880.142
The last version of Ancalagon, build 187, did however not crash so far and it is now still running on the same W.A.C. 230 to test for some better stability, in both senses, compared with the two previous builds.
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
-
- Posts: 4567
- Joined: Sun Mar 12, 2006 2:40 am
- Full name:
Re: WAC.230 revisited yet again
Follow-up: I'm afraid I'm going to have to abort the analysis with build 187, even though it is not very satisfactory to stop now. I would have liked to complete analysis of the move 1. Rb4 once more to see if the move would come on top again, but we are now at 6450 minutes in the search and there is no sign yet that this second move at ply 24 is going to be resolved soon. Positive is maybe that the final evaluation is less than + 3.00 this time but it does not seem to decrease any further. 1. Kb5 is chosen by this build where another build opted for 1. a4, so that choice of secondary move, if Rb4 falls, is not fixed either. Continuing testing just one position will not do much good, there are no crashes, that is certainly a positive thing and I'm happy that 1. Rb4 was found quickly, so I do consider build 187 as better than build 186.
Code for Board Control was in build 186 changed to do some experiments after I discovered that a Bitboard with pinned pieces is calculated in Stockfish, it is even ready available in the position data structure so the overhead should be minimal to use this bitboard. But the function seems used only at one place in the evaluation routine. I suspect that Tord build this function but I must admit I am running behind a bit in Glaurung code knowledge after Glaurung 2.1, so I have not checked if it was in Glaurung 2.2. But anyway, it is impressive that this function already exists, a big thanks to the programmer from me and I hope the bitboard can be used more than it is now, only in the mate threat detection from Queen contact checks
Maybe a bit ad hoc to use it in evaluate_board_control() but anyway it still has to be tested if I can use it here, I don't know at the moment for sure if pos.pinned already has all the data it needs at this point in the code, because it needs input from all the piece evals, as far as I could see.
evaluate_bord_control build 186
This is more for reference of what has changed in this build because the code was already changed again a little in the following build; using a sente (side to move is the opponent) 1:5 ratio was I think too much. I decreased it to 1:3 and was surprised that just this ratio seemed to have this much impact on the eval of W.A.C. 230
evaluate_board_control build 187
Output for W.A.C. 230
[D]2b5/1r6/2kBp1p1/p2pP1P1/2pP4/1pP3K1/1R3P2/8 b - -
Engine: Ancalagon 1.3 Weak Squares 180 Board Control middlegame 50 - endgame 50 Build 187 (Athlon 2009, 256 MB)
by Romstad, Costalba, Kiiski, de Groot
9.01 0:02 +2.52 1...Rf7 2.Rb1 (2.450.570) 927
9.02 0:02 +2.53 1...Rd7 (2.584.772) 939
9.03 0:03 +2.66 1...Rh7 2.Rb1 Kb5 3.Bc5 Rh5 4.Kg4 a4
5.Kf4 Bd7 6.Ke3 Rxg5 (3.628.499) 1031
10.01 0:04 +2.62 1...Rh7 2.Rb1 Kb5 3.Bc5 a4 4.Kf4 Rh3
5.f3 Rh4+ 6.Ke3 Rh5 7.Rg1 (5.097.541) 1091
10.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 Kc6 3.Rb2 Rb4 4.cxb4 a4
5.b5+ Kxb5 6.Ba3 c3 7.Re2 Kc4 8.f4 Kxd4
9.f5 exf5 10.e6 Kc4 11.e7 Bd7 12.Kf4 d4
13.e8Q Bxe8 14.Rxe8 Kd3 (154.133.183.745) 829
Longest analysis of the position so far maybe? At least for Ancalagon it is a record, counter now at 6530 minutes. But not with very strong hardware of course.
Eelco
Code for Board Control was in build 186 changed to do some experiments after I discovered that a Bitboard with pinned pieces is calculated in Stockfish, it is even ready available in the position data structure so the overhead should be minimal to use this bitboard. But the function seems used only at one place in the evaluation routine. I suspect that Tord build this function but I must admit I am running behind a bit in Glaurung code knowledge after Glaurung 2.1, so I have not checked if it was in Glaurung 2.2. But anyway, it is impressive that this function already exists, a big thanks to the programmer from me and I hope the bitboard can be used more than it is now, only in the mate threat detection from Queen contact checks
Maybe a bit ad hoc to use it in evaluate_board_control() but anyway it still has to be tested if I can use it here, I don't know at the moment for sure if pos.pinned already has all the data it needs at this point in the code, because it needs input from all the piece evals, as far as I could see.
evaluate_bord_control build 186
Code: Select all
void evaluate_board_control(const Position &pos, Color us, EvalInfo &ei) {
Color them = opposite_color(us);
// Is it the attackers turn to move?
bool sente = (them == pos.side_to_move());
// A square is declared under our control if it is attacked by an own
// pawn, but not by an enemy pawn, or if it is defended by us
// and not attacked by an enemy piece.
Bitboard controlledSquares = ei.attacked_by(us, PAWN)
& ~ei.attacked_by(them, PAWN)
|(ei.attacked_by(us) & ~ei.attacked_by(them));
int boardControl = count_1s_max_15(controlledSquares);
Bitboard controlledSquaresBonusBB = controlledSquares & ei.inFrontofPawns[us];
boardControl += count_1s_max_15(controlledSquaresBonusBB);
controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(us);
boardControl += count_1s_max_15(controlledSquaresBonusBB);
controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(them);
boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 5);
boardControl -= count_1s_max_15(pos.pinned_pieces(us)) * (sente ? 3 : 1);
controlledSquaresBonusBB = controlledSquares & pos.pinned_pieces(them);
boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 5);
ei.mgValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlMidgame);
ei.egValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlEndgame);
}
evaluate_board_control build 187
Code: Select all
void evaluate_board_control(const Position &pos, Color us, EvalInfo &ei) {
Color them = opposite_color(us);
// Is it the attackers turn to move?
bool sente = (them == pos.side_to_move());
// A square is declared under our control if it is attacked by an own
// pawn, but not by an enemy pawn, or if it is defended by us
// and not attacked by an enemy piece.
Bitboard controlledSquares = ei.attacked_by(us, PAWN)
& ~ei.attacked_by(them, PAWN)
|(ei.attacked_by(us) & ~ei.attacked_by(them));
int boardControl = count_1s_max_15(controlledSquares);
Bitboard controlledSquaresBonusBB = controlledSquares & ei.inFrontofPawns[us];
boardControl += count_1s_max_15(controlledSquaresBonusBB);
controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(us);
boardControl += count_1s_max_15(controlledSquaresBonusBB);
controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(them);
boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 3);
boardControl -= count_1s_max_15(pos.pinned_pieces(us)) * (sente ? 2 : 1);
controlledSquaresBonusBB = controlledSquares & pos.pinned_pieces(them);
boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 3);
ei.mgValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlMidgame);
ei.egValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlEndgame);
}
[D]2b5/1r6/2kBp1p1/p2pP1P1/2pP4/1pP3K1/1R3P2/8 b - -
Engine: Ancalagon 1.3 Weak Squares 180 Board Control middlegame 50 - endgame 50 Build 187 (Athlon 2009, 256 MB)
by Romstad, Costalba, Kiiski, de Groot
9.01 0:02 +2.52 1...Rf7 2.Rb1 (2.450.570) 927
9.02 0:02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6
12.Kf3 Be8 (33.380.613.119) 817
23.01 1106:41+2.56 1...Kb5 2.Rb1 Ka6 3.Rb2 a4 4.Ba3 Rh7
5.Rb1 Bb7 6.Kg2 Rh5 7.f4 Rh4 8.Rf1 Kb5
9.Kg3 Rh7 10.Kg2 Rf7 11.Kf3 Bc6
12.Rb1 Rc7 (55.001.173.442) 828
24.01 3095:49+2.86 1...Kb5 2.Rb1 Kc6 3.Rb2 Rb4 4.cxb4 a4
5.b5+ Kxb5 6.Ba3 c3 7.Re2 Kc4 8.f4 Kxd4
9.f5 exf5 10.e6 Kc4 11.e7 Bd7 12.Kf4 d4
13.e8Q Bxe8 14.Rxe8 Kd3 (154.133.183.745) 829
Longest analysis of the position so far maybe? At least for Ancalagon it is a record, counter now at 6530 minutes. But not with very strong hardware of course.
Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
-
- Posts: 12542
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: WAC.230 revisited yet again
This position is interesting because it diverges at 6. ..Kd3 verses 6. ..Kxd4Eelco de Groot wrote:Follow-up: I'm afraid I'm going to have to abort the analysis with build 187, even though it is not very satisfactory to stop now. I would have liked to complete analysis of the move 1. Rb4 once more to see if the move would come on top again, but we are now at 6450 minutes in the search and there is no sign yet that this second move at ply 24 is going to be resolved soon. Positive is maybe that the final evaluation is less than + 3.00 this time but it does not seem to decrease any further. 1. Kb5 is chosen by this build where another build opted for 1. a4, so that choice of secondary move, if Rb4 falls, is not fixed either. Continuing testing just one position will not do much good, there are no crashes, that is certainly a positive thing and I'm happy that 1. Rb4 was found quickly, so I do consider build 187 as better than build 186.
Code for Board Control was in build 186 changed to do some experiments after I discovered that a Bitboard with pinned pieces is calculated in Stockfish, it is even ready available in the position data structure so the overhead should be minimal to use this bitboard. But the function seems used only at one place in the evaluation routine. I suspect that Tord build this function but I must admit I am running behind a bit in Glaurung code knowledge after Glaurung 2.1, so I have not checked if it was in Glaurung 2.2. But anyway, it is impressive that this function already exists, a big thanks to the programmer from me and I hope the bitboard can be used more than it is now, only in the mate threat detection from Queen contact checks
Maybe a bit ad hoc to use it in evaluate_board_control() but anyway it still has to be tested if I can use it here, I don't know at the moment for sure if pos.pinned already has all the data it needs at this point in the code, because it needs input from all the piece evals, as far as I could see.
evaluate_bord_control build 186This is more for reference of what has changed in this build because the code was already changed again a little in the following build; using a sente (side to move is the opponent) 1:5 ratio was I think too much. I decreased it to 1:3 and was surprised that just this ratio seemed to have this much impact on the eval of W.A.C. 230Code: Select all
void evaluate_board_control(const Position &pos, Color us, EvalInfo &ei) { Color them = opposite_color(us); // Is it the attackers turn to move? bool sente = (them == pos.side_to_move()); // A square is declared under our control if it is attacked by an own // pawn, but not by an enemy pawn, or if it is defended by us // and not attacked by an enemy piece. Bitboard controlledSquares = ei.attacked_by(us, PAWN) & ~ei.attacked_by(them, PAWN) |(ei.attacked_by(us) & ~ei.attacked_by(them)); int boardControl = count_1s_max_15(controlledSquares); Bitboard controlledSquaresBonusBB = controlledSquares & ei.inFrontofPawns[us]; boardControl += count_1s_max_15(controlledSquaresBonusBB); controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(us); boardControl += count_1s_max_15(controlledSquaresBonusBB); controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(them); boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 5); boardControl -= count_1s_max_15(pos.pinned_pieces(us)) * (sente ? 3 : 1); controlledSquaresBonusBB = controlledSquares & pos.pinned_pieces(them); boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 5); ei.mgValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlMidgame); ei.egValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlEndgame); }
evaluate_board_control build 187Output for W.A.C. 230Code: Select all
void evaluate_board_control(const Position &pos, Color us, EvalInfo &ei) { Color them = opposite_color(us); // Is it the attackers turn to move? bool sente = (them == pos.side_to_move()); // A square is declared under our control if it is attacked by an own // pawn, but not by an enemy pawn, or if it is defended by us // and not attacked by an enemy piece. Bitboard controlledSquares = ei.attacked_by(us, PAWN) & ~ei.attacked_by(them, PAWN) |(ei.attacked_by(us) & ~ei.attacked_by(them)); int boardControl = count_1s_max_15(controlledSquares); Bitboard controlledSquaresBonusBB = controlledSquares & ei.inFrontofPawns[us]; boardControl += count_1s_max_15(controlledSquaresBonusBB); controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(us); boardControl += count_1s_max_15(controlledSquaresBonusBB); controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(them); boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 3); boardControl -= count_1s_max_15(pos.pinned_pieces(us)) * (sente ? 2 : 1); controlledSquaresBonusBB = controlledSquares & pos.pinned_pieces(them); boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 3); ei.mgValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlMidgame); ei.egValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlEndgame); }
[D]2b5/1r6/2kBp1p1/p2pP1P1/2pP4/1pP3K1/1R3P2/8 b - -
Engine: Ancalagon 1.3 Weak Squares 180 Board Control middlegame 50 - endgame 50 Build 187 (Athlon 2009, 256 MB)
by Romstad, Costalba, Kiiski, de Groot
9.01 0:02 +2.52 1...Rf7 2.Rb1 (2.450.570) 927
9.02 0:02 +2.53 1...Rd7 (2.584.772) 939
9.03 0:03 +2.66 1...Rh7 2.Rb1 Kb5 3.Bc5 Rh5 4.Kg4 a4
5.Kf4 Bd7 6.Ke3 Rxg5 (3.628.499) 1031
10.01 0:04 +2.62 1...Rh7 2.Rb1 Kb5 3.Bc5 a4 4.Kf4 Rh3
5.f3 Rh4+ 6.Ke3 Rh5 7.Rg1 (5.097.541) 1091
10.02 0:05 +2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 Kc4 6.Kf3 Kxd4 7.Ke2 Ba6+
8.Kd1 c2+ 9.Kc1 cxb1B 10.Kxb1 Kxe5
11.Kb2 d4 12.Bb4 Ke4 13.Bc5 e5 (418.790.082) 1274
18.01 12:00 +2.80 1...Rb4 2.cxb4 (816.968.720) 1134
19.01 41:43 +2.54 1...Rb4 2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3
5.Re2 Kc4 6.f4 Kxd4 7.f5 exf5 8.e6 Kd3
9.e7 Bd7 10.Rh2 d4 11.Kf4 Bc6 12.Ke5 Kc4
13.Rh8 b2 14.Rb8 Kd3 (2.503.653.894) 999
20.01 318:17 +2.41 1...Rb4 2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3
5.Re2 Kc4 6.f4 Kd3 7.Kf3 Kxd4 8.f5 exf5
9.e6 Kd3 10.e7 Bd7 11.Re3+ Kc2
12.Re2+ Kb1 13.Ke3 c2 14.Kd3 Bb5+ (16.925.679.851) 886
The alternative is under Black's control.
Code: Select all
Ancalagon:
20.01 318:17 +2.41 1...Rb4 2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kd3 7.Kf3 Kxd4 8.f5 exf5 9.e6 Kd3 10.e7 Bd7 11.Re3+ Kc2 12.Re2+ Kb1 13.Ke3 c2 14.Kd3 Bb5+ (16.925.679.851) 886
Szabo:
Rb4 2.cxb4 a4 3.b5+ Kxb5 4.Ba3 c3 5.Re2 Kc4 6.f4 Kxd4 7.f5 exf5 8.e6 Kd3 9.e7 Bd7 10.Kf3 d4 11.Rh2 Kc4 12.Rh8 b2 13.Rb8 d3
[code]
[quote]
[b][color=red]20.02 321:18 +2.54 1...Kb5 2.Rb1 Rh7 3.Re1 Rh5 4.f4 a4
5.Ra1 Rh7 6.Ba3 Bd7 7.Kg2 Rh4 8.Kg3 Rh8
9.Kg2 Kb6 10.Rh1 Rg8 11.Kf3 (17.106.416.774) 887
21.01 482:56 +2.74 1...Kb5 (25.939.084.487) 895
22.01 680:33 +2.68 1...Kb5 2.Rb1 Ka6 3.Rb2 a4 4.Ba3 Rh7
5.Rb1 Bb7 6.f4 Kb5 7.Rd1 Bc6 8.Kg2 Rh4
9.Bc1 Rh8 10.Rh1 Ra8 11.Ba3 Ra6
12.Kf3 Be8 (33.380.613.119) 817
23.01 1106:41+2.56 1...Kb5 2.Rb1 Ka6 3.Rb2 a4 4.Ba3 Rh7
5.Rb1 Bb7 6.Kg2 Rh5 7.f4 Rh4 8.Rf1 Kb5
9.Kg3 Rh7 10.Kg2 Rf7 11.Kf3 Bc6
12.Rb1 Rc7 (55.001.173.442) 828
24.01 3095:49+2.86 1...Kb5 2.Rb1 Kc6 3.Rb2 Rb4 4.cxb4 a4
5.b5+ Kxb5 6.Ba3 c3 7.Re2 Kc4 8.f4 Kxd4
9.f5 exf5 10.e6 Kc4 11.e7 Bd7 12.Kf4 d4
13.e8Q Bxe8 14.Rxe8 Kd3 (154.133.183.745) 829
[/b][/color]
Longest analysis of the position so far maybe? At least for Ancalagon it is a record, counter now at 6530 minutes. But not with very strong hardware of course.
Eelco[/quote]
This new line is especially interesting. I always thought that you could close the gate if Rb4 was not made immediately, but I do not think I have examined this line. I will give it a look soon.
-
- Posts: 3533
- Joined: Tue Jan 09, 2007 8:33 pm
- Location: Antalya, Turkey
Re: WAC.230 revisited yet again
This new line is especially interesting. I always thought that you could close the gate if Rb4 was not made immediately, but I do not think I have examined this line. I will give it a look soon.
Perhaps the winning combi is Kb5 - Ka4 - Rb4?
Best,
hi, merhaba, hallo HT
-
- Posts: 10314
- Joined: Thu Mar 09, 2006 12:37 am
- Location: Tel-Aviv Israel
Re: WAC.230 revisited yet again
Dann Corbit wrote:This position is interesting because it diverges at 6. ..Kd3 verses 6. ..Kxd4Eelco de Groot wrote:Follow-up: I'm afraid I'm going to have to abort the analysis with build 187, even though it is not very satisfactory to stop now. I would have liked to complete analysis of the move 1. Rb4 once more to see if the move would come on top again, but we are now at 6450 minutes in the search and there is no sign yet that this second move at ply 24 is going to be resolved soon. Positive is maybe that the final evaluation is less than + 3.00 this time but it does not seem to decrease any further. 1. Kb5 is chosen by this build where another build opted for 1. a4, so that choice of secondary move, if Rb4 falls, is not fixed either. Continuing testing just one position will not do much good, there are no crashes, that is certainly a positive thing and I'm happy that 1. Rb4 was found quickly, so I do consider build 187 as better than build 186.
Code for Board Control was in build 186 changed to do some experiments after I discovered that a Bitboard with pinned pieces is calculated in Stockfish, it is even ready available in the position data structure so the overhead should be minimal to use this bitboard. But the function seems used only at one place in the evaluation routine. I suspect that Tord build this function but I must admit I am running behind a bit in Glaurung code knowledge after Glaurung 2.1, so I have not checked if it was in Glaurung 2.2. But anyway, it is impressive that this function already exists, a big thanks to the programmer from me and I hope the bitboard can be used more than it is now, only in the mate threat detection from Queen contact checks
Maybe a bit ad hoc to use it in evaluate_board_control() but anyway it still has to be tested if I can use it here, I don't know at the moment for sure if pos.pinned already has all the data it needs at this point in the code, because it needs input from all the piece evals, as far as I could see.
evaluate_bord_control build 186This is more for reference of what has changed in this build because the code was already changed again a little in the following build; using a sente (side to move is the opponent) 1:5 ratio was I think too much. I decreased it to 1:3 and was surprised that just this ratio seemed to have this much impact on the eval of W.A.C. 230Code: Select all
void evaluate_board_control(const Position &pos, Color us, EvalInfo &ei) { Color them = opposite_color(us); // Is it the attackers turn to move? bool sente = (them == pos.side_to_move()); // A square is declared under our control if it is attacked by an own // pawn, but not by an enemy pawn, or if it is defended by us // and not attacked by an enemy piece. Bitboard controlledSquares = ei.attacked_by(us, PAWN) & ~ei.attacked_by(them, PAWN) |(ei.attacked_by(us) & ~ei.attacked_by(them)); int boardControl = count_1s_max_15(controlledSquares); Bitboard controlledSquaresBonusBB = controlledSquares & ei.inFrontofPawns[us]; boardControl += count_1s_max_15(controlledSquaresBonusBB); controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(us); boardControl += count_1s_max_15(controlledSquaresBonusBB); controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(them); boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 5); boardControl -= count_1s_max_15(pos.pinned_pieces(us)) * (sente ? 3 : 1); controlledSquaresBonusBB = controlledSquares & pos.pinned_pieces(them); boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 5); ei.mgValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlMidgame); ei.egValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlEndgame); }
evaluate_board_control build 187Output for W.A.C. 230Code: Select all
void evaluate_board_control(const Position &pos, Color us, EvalInfo &ei) { Color them = opposite_color(us); // Is it the attackers turn to move? bool sente = (them == pos.side_to_move()); // A square is declared under our control if it is attacked by an own // pawn, but not by an enemy pawn, or if it is defended by us // and not attacked by an enemy piece. Bitboard controlledSquares = ei.attacked_by(us, PAWN) & ~ei.attacked_by(them, PAWN) |(ei.attacked_by(us) & ~ei.attacked_by(them)); int boardControl = count_1s_max_15(controlledSquares); Bitboard controlledSquaresBonusBB = controlledSquares & ei.inFrontofPawns[us]; boardControl += count_1s_max_15(controlledSquaresBonusBB); controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(us); boardControl += count_1s_max_15(controlledSquaresBonusBB); controlledSquaresBonusBB = controlledSquares & pos.pieces_of_color(them); boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 3); boardControl -= count_1s_max_15(pos.pinned_pieces(us)) * (sente ? 2 : 1); controlledSquaresBonusBB = controlledSquares & pos.pinned_pieces(them); boardControl += count_1s_max_15(controlledSquaresBonusBB) * (sente ? 1 : 3); ei.mgValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlMidgame); ei.egValue += Sign[us] * apply_weight(Value(boardControl), WeightBoardControlEndgame); }
[D]2b5/1r6/2kBp1p1/p2pP1P1/2pP4/1pP3K1/1R3P2/8 b - -
Engine: Ancalagon 1.3 Weak Squares 180 Board Control middlegame 50 - endgame 50 Build 187 (Athlon 2009, 256 MB)
by Romstad, Costalba, Kiiski, de Groot
9.01 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 exf5 8.e6 Kd3 9.e7 Bd7 10.Kf3 d4 11.Rh2 Kc4 12.Rh8 b2 13.Rb8 d3 [code] [quote] [b][color=red]20.02 321:18 +2.54 1...Kb5 2.Rb1 Rh7 3.Re1 Rh5 4.f4 a4 5.Ra1 Rh7 6.Ba3 Bd7 7.Kg2 Rh4 8.Kg3 Rh8 9.Kg2 Kb6 10.Rh1 Rg8 11.Kf3 (17.106.416.774) 887 21.01 482:56 +2.74 1...Kb5 (25.939.084.487) 895 22.01 680:33 +2.68 1...Kb5 2.Rb1 Ka6 3.Rb2 a4 4.Ba3 Rh7 5.Rb1 Bb7 6.f4 Kb5 7.Rd1 Bc6 8.Kg2 Rh4 9.Bc1 Rh8 10.Rh1 Ra8 11.Ba3 Ra6 12.Kf3 Be8 (33.380.613.119) 817 23.01 1106:41+2.56 1...Kb5 2.Rb1 Ka6 3.Rb2 a4 4.Ba3 Rh7 5.Rb1 Bb7 6.Kg2 Rh5 7.f4 Rh4 8.Rf1 Kb5 9.Kg3 Rh7 10.Kg2 Rf7 11.Kf3 Bc6 12.Rb1 Rc7 (55.001.173.442) 828 24.01 3095:49+2.86 1...Kb5 2.Rb1 Kc6 3.Rb2 Rb4 4.cxb4 a4 5.b5+ Kxb5 6.Ba3 c3 7.Re2 Kc4 8.f4 Kxd4 9.f5 exf5 10.e6 Kc4 11.e7 Bd7 12.Kf4 d4 13.e8Q Bxe8 14.Rxe8 Kd3 (154.133.183.745) 829 [/b][/color] Longest analysis of the position so far maybe? At least for Ancalagon it is a record, counter now at 6530 minutes. But not with very strong hardware of course. Eelco[/quote] This new line is especially interesting. I always thought that you could close the gate if Rb4 was not made immediately, but I do not think I have examined this line. I will give it a look soon.[/quote] This line simply repeat the root position 1...Kc6-b5 2.Rb2-b1 Kb5-c6 3.Rb1-b2 The fact that Ancalagon shows this line as the pv without draw evaluation suggests that this engine suffers from some bug. Uri