Eelco de Groot wrote:Build 24 again crashed on position 167! But I do not see what can be wrong with the position. Maybe somebody else can try this? I got a little bit better result but testpositions are not such a good indication for efficiency of Ancalagon's new search I think. Still, 55 positions out of only 166 tested is not that bad, with maximum 5 second long searches!
Ancalagon 1.1 Beta 1 Build 24 128Mb hash, Athlon 2009 MHz
Code: Select all
Right until now: 55 of 166 ; 10:28m
Illegal piece!
Illegal position!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
-------------------------------------------------------------------------------------
0 | - - - - 3 4 - - 0 - 0 3 - - 0 - - 0 - 0
20 | - - - - - 2 - - 0 0 - - 1 - 1 0 0 - - 0
40 | - - - 0 - 0 0 - - - - - - - - - 0 - - 0
60 | - - - - - - - - 0 4 - - 0 0 - - - 0 0 -
80 | 0 - 3 0 - 0 - - - - - - - 0 - 0 - - - 0
100 | - 2 - - - 0 0 3 - 3 0 - - - 4 - - - 0 -
120 | - 0 - 0 - - 1 2 - - - 0 - - - - - 0 - 1
140 | - - - - - 3 - - 0 - - - - - - - - - - 0
160 | - 0 - - 0 4
1 sec -> 38/166
2 sec -> 42/166
3 sec -> 45/166
4 sec -> 51/166
5 sec -> 55/166
n/s: 401.949
TotTime: 14:08m SolTime: 10:28m
Eelco
With the revised 27-09-2008 update I get just over 60 positions solved in 5 seconds per position.
Ancalagon 1.1 Beta 1 Build 32 128Mb hash, Athlon 2009 MHz
Code: Select all
Right until now: 63 of 200 ; 12:40m
I/O Fault!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
-------------------------------------------------------------------------------------
0 | 0 - - - 4 1 - - 0 0 - - - - - - - 0 - 0
20 | - 2 - - 0 2 - - 0 - - - 0 - - - - - - -
40 | - 1 - 0 - 2 1 - - - - - - - 0 - 0 - - 0
60 | - - - - - 0 1 - 0 4 - - - - - - - 1 0 -
80 | 1 - 0 - 2 - - - - - 0 - - 0 - - - - - 0
100 | - 1 - - - - 0 2 - 1 2 - - - - 1 1 - 0 0
120 | - 0 0 0 - - 1 1 - - - 0 - - - 0 - 0 - -
140 | - - - - - 1 - - 0 - - - - - 0 1 - 0 - -
160 | - 0 0 - - 3 - 0 - - - - - - - - - 1 - -
180 | 2 - - - 1 0 - - - - 0 - - - - - - 0 - -
1 sec -> 37/200
2 sec -> 53/200
3 sec -> 60/200
4 sec -> 61/200
5 sec -> 63/200
n/s: 399.502
TotTime: 17:02m SolTime: 12:40m
With the EOLs that are not Windows compatible it now crashed on position 168 but I just loaded the .epd in Windows Wordpad and saved it again, that takes care of the EOLs.
There are still numerous positions in the revised set where I get high to very high scores for nonsolution moves. Part of these may have to do with the faulty passed pawn evals in Ancalagon, that is not yet solved, and I only ran 5 second searches so longer searches would take care of of some of these. Maybe when the engine is improved a little I will run longer searches for validation. I prefer for this kind of test just to do shallow searches and then to do more positions, so the positions don't have to be very difficult and it does not matter much if there are multiple solutions especially for the really difficult ones, most are not found anyway.
Some notes about small changes in Ancalagon's search since Build 24:
For position 2 with the latest build 32 I do not get the high scores reported with build 24 but that probably is to do with some changes in passed pawn scoring, as said that is still not right.
Now with build 32 it does not seem certain Kb4 is winning:
8/r4p2/4qp2/kp6/3b4/1P2pQ2/2R4P/1R5K b - -
Engine: Ancalagon 1.1 Beta 1b Build 32 (128 MB)
by Tord Romstad, Eelco de Groot
8.01 0:01 -1.94 1...b4 2.Rc4 Qd7 3.Rd1 e2 4.Qxe2 Qd5+
5.Qg2 Qxc4 6.bxc4 Kb6 (378.818) 323
9.01 0:04 -1.50 1...b4 2.Rc4 Qe5 3.Qc6 Qb5 4.Qxb5+ Kxb5
5.Rxd4 e2 6.Rc1 Re7 7.Rd5+ Kb6
8.Rd6+ Kb7 9.h4 e1Q+ 10.Rxe1 Rxe1+
11.Kg2 (1.358.228) 329
10.01 0:04 -1.50 1...b4 2.Rc4 Qe5 3.Qc6 Qb5 4.Qxb5+ Kxb5
5.Rxd4 e2 6.Rc1 Re7 7.Rd5+ Kb6
8.Rd6+ Kb7 9.h4 e1Q+ 10.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.Rd1 Ra1 4.Rxa1 Bxa1
5.Kg2 Bd4 6.h5 Qf6 7.Re2 Qg5+ 8.Kf1 f6
9.Rg2 Qh4 10.Re2 Kxb3 11.h6 Kb4
12.Rxe3 Qxh6 (1.240.177.717) 330
best move: Ka5-b4 time: 64:44.281 min n/s: 330.361 nodes: 1.283.190.000
Only just above zero

Not sure if the f5 and f6 pawns are good enough to win. But Arasan had a lot higher scores.
Build 24 had higher values probably due to passed pawn scoring:
Passed pawn Build 24 code:
Code: Select all
Value ebonus = Value(tr * 25); // [EdG: was r * r * 25]
That is now scored much lower:
Code: Select all
Value ebonus = Value(Min(150, tr * 10)); // [EdG: was r * r * 25]
King safety Build 24 code:
Code: Select all
Value v = apply_weight((Value)(((0x300 - sign * ei.mgValue) * SafetyTable[attackUnits])/0x100), WeightKingSafety[us]);
// Value v = apply_weight(SafetyTable[attackUnits], WeightKingSafety[us]); ei.mgValue -= sign * v;
That is now, with a try to extend King safety scoring to the endgame:
Code: Select all
Value v = apply_weight((Value)(((0x300 - sign * ei.mgValue) * SafetyTable[attackUnits])/0x100), WeightKingSafety[us]);
// Value v = apply_weight(SafetyTable[attackUnits], WeightKingSafety[us]); ei.mgValue -= sign * v;
ei.egValue -= sign * 3 * v / 4;
Furthermore there was a glaring error in my root_search adaptation

Up till build 30:
Code: Select all
if ((value - oldvalue) >= Value(0x14)||(oldvalue - value) >= Value(0x14))
value = -search_pv(pos, ss, -beta, -alpha, newDepth+1, 1, 0);
oldvalue = value; // :?: Not what I intended, oldvalue = value should go before value = search, but not sure this is worse because it limits the search extension to one ply maximum.
if ((value - oldvalue) >= Value(0x14)||(oldvalue - value) >= Value(0x14))
The older Build 24 again also with slightly different Beta b1 settings, Threat Depth increased from 5 to 6:
8/r4p2/4qp2/kp6/3b4/1P2pQ2/2R4P/1R5K b - -
Engine: Ancalagon 1.1 Beta 1b Build 24 (128 MB)
by Tord Romstad, Eelco de Groot
8.00 0:00 +1.50 1...Kb6 2.Kg2 f5 3.Rbc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179.885.248) 323
16.01 19:24 +2.98 1...Kb4 2.Re2 f5 3.h4 f6 4.Rd1 Qe5
5.h5 Rg7 6.Rg1 Rh7 7.Kg2 Bc5 8.Kf1 Kxb3
9.Rd2 Qa1+ 10.Qd1+ Qxd1+ 11.Rxd1 Rxh5
12.Ke2 (379.928.474) 326
17.01 26:02 +2.92 1...Kb4 2.Re2 f5 3.h4 f6 4.Rd1 Qe5
5.h5 Rg7 6.Rg1 Rh7 7.Rge1 f4 8.Rh2 f5
9.Ra2 Qe4 10.Qxe4 Rxh5+ 11.Kg2 fxe4
12.Kf1 (510.588.612) 326
best move: Ka5-b4 time: 26:32.594 min n/s: 326.853 nodes: 520.530.000
Tord's root-search() is now changed in Ancalagon as follows:
Code: Select all
// Pick the next root move, and print the move and the move number to
// the standard output:
move = ss[0].currentMove = rml.get_move(i);
if(current_search_time() >= 1000)
std::cout << "info currmove " << move
<< " currmovenumber " << i + 1 << std::endl;
// Decide search depth for this move:
ext = extension(pos, move, true, pos.move_is_check(move), false, false, false);
newDepth = (Iteration-2)*OnePly + ext + InitialDepth;
// Make the move, and search it.
pos.do_move(move, u, dcCandidates);
if(i < MultiPV) {
alpha = Value(0x100);
value = -search(pos, ss, -alpha, newDepth-1, 1, true, 0);
if (value > alpha) {// Fail high, smaller window unless Fail low.
alpha = Value(0);
value = -search_pv(pos, ss, -beta, -alpha, newDepth-1, 1, 0);
if (value < alpha) alpha = -VALUE_INFINITE;
}
else alpha = -VALUE_INFINITE;
oldvalue = value;
value = -search_pv(pos, ss, -beta, -alpha, newDepth, 1, 0);
if((value - oldvalue) >= Value(0x20)||(oldvalue - value) >= Value(0x20)){
oldvalue = value;
value = -search_pv(pos, ss, -beta, -alpha, newDepth+1, 1, 0);
if((value - oldvalue) >= Value(0x10)||(oldvalue - value) >= Value(0x10)){
oldvalue = value;
value = -search_pv(pos, ss, -beta, -alpha, newDepth+2, 1, 0);
if((value - oldvalue) >= Value(0x10)||(oldvalue - value) >= Value(0x10)){
oldvalue = value;
value = -search_pv(pos, ss, -beta, -alpha, newDepth+3, 1, 0);
}
}
}
// If the value has dropped a lot compared to the last iteration,
// set the boolean variable Problem to true. This variable is used
// for time management: When Problem is true, we try to complete the
// current iteration before playing a move.
Problem = (Iteration >= 2 &&
value <= ValueByIteration[Iteration-1] - ProblemMargin);
if(Problem && StopOnPonderhit)
StopOnPonderhit = false;
}
else {
if(newDepth < 4*OnePly){newDepth = 4*OnePly;
}//[Introduced in Build 29 EdG]
value = -search(pos, ss, -(alpha - 0x200), newDepth - 3, 1, true, 0);
if(value > alpha - 0x200) {
// Fail high! Set the boolean variable FailHigh to true, and
// re-search the move with a big window. The variable FailHigh is
// used for time management: We try to avoid aborting the search
// prematurely during a fail high research.
FailHigh = true;
value = -search_pv(pos, ss, -beta, -alpha, newDepth - 3, 1, 0);
value = -search_pv(pos, ss, -beta, -alpha, newDepth - 2, 1, 0);
value = -search_pv(pos, ss, -beta, -alpha, newDepth - 1, 1, 0);
oldvalue = value;
value = -search_pv(pos, ss, -beta, -alpha, newDepth, 1, 0);
if((value - oldvalue) >= Value(0x20)){
oldvalue = value;
value = -search_pv(pos, ss, -beta, -alpha, newDepth+1, 1, 0);
if((value - oldvalue) >= Value(0x10)){
oldvalue = value;
value = -search_pv(pos, ss, -beta, -alpha, newDepth+2, 1, 0);
if((value - oldvalue) >= Value(0x10)){
oldvalue = value;
value = -search_pv(pos, ss, -beta, -alpha, newDepth+3, 1, 0);
}
}
}
}
}
pos.undo_move(move, u);