As probably the only active developer of Toga II, here are my comments:
1. You have introduced a penalty for a knight attacked or attackable by a pawn. This is something which dan be improved and in the latest version, soon to be released, I do not score outposts attacked by a pawn.
About the latter, if a knight can be attacked by an enemy pawn it can't be called an outpost. YMMV. When there is a white knight on d5 and there is a black pawn on c6/c7 | e6/e7 I don't reward an outpost bonus.
Hi Ed,
that seems the usual definition as implemented in computer chess, but see Nimzowitsch's classical definition of the Outpost, provoking to weaken an opponent pawn on a half-open file no longer "Biting on Granite".
The regular WIKI - An outpost is a square which is protected by a pawn and which cannot be attacked by an opponent's pawn.
The logic of "Biting on Granite" is understood but the kind of strategic knowledge impossible (I think) to grasp for a chess engine. Nevertheless it would be interesting to try it. I made a note.
I don't even check for the pawn protection. Search will go after that knight anyway and trade when possible. So typical for implementing knowledge, keep it simple and the bonus not too high, search will do the rest in most cases.
I wonder whether you could also test afterwards not giving a bonus at all to an attacked knight outpost? From my (~2100 elo) chess knowledge this would seem most logical. To do that just set KOM_multi = 0 if attacker > 0.
Also, could you test the current Toga II 1.9e knight outpost code against yours:
// outpost
mob = 0;
if (me == White && (board->square[from+17] != BP && board->square[from+15] != BP)){// not attacked: idea from William H. Mowery
if (board->square[from-17] == WP)
mob += KnightOutpostMatrix[me][SquareTo64[from]];
if (board->square[from-15] == WP)
mob += KnightOutpostMatrix[me][SquareTo64[from]];
}
else if (me == Black && (board->square[from-17] != WP && board->square[from-15] != WP)){
if (board->square[from+17] == BP)
mob += KnightOutpostMatrix[me][SquareTo64[from]];
if (board->square[from+15] == BP)
mob += KnightOutpostMatrix[me][SquareTo64[from]];
}
op[me] += mob;
The current code still doubles the bonus for a twice defended outpost. I also feel that the value in the table KnightOutpostMatrix are rather small - also on my TODO list!
Whichever code is best will be used in the forthcoming release of Toga II 2.0, currently about 30-50 elo stronger than 1.4 beta 5c. Your contribution will of course be noted
Thanks a lot,
Jerry
I'm trying this part of code in new test. I also mix this with mine as this :
if (me == White && (board->square[from+17] != BP && board->square[from+15] != BP)){// not attacked: idea from William H. Mowery
if (board->square[from-17] == WP)
defender+=1;
if (board->square[from-15] == WP)
defender+=1;
if ((board->square[from+33] == BP) && (board->square[from+17] != WP)) attacker+=1;
if ((board->square[from+31] == BP) && (board->square[from+15] != WP)) attacker+=1;
}
else if (me == Black && (board->square[from-17] != WP && board->square[from-15] != WP)){
if (board->square[from+17] == BP)
defender+=1;
if (board->square[from+15] == BP)
defender+=1;
if ((board->square[from-33] == WP) && (board->square[from-17] != BP)) attacker+=1;
if ((board->square[from-31] == WP) && (board->square[from-15] != BP)) attacker+=1;
}
if (defender==1) KOM_multi+= 6; // protected 1 and not directly attacked
else if (defender==2) KOM_multi+= 10; // protected 2 and not directly attacked
if (attacker == 1) KOM_multi-= 2; // could be attacked 1
else if (attacker == 2) KOM_multi-= 3; // could be attacked 2
mob+= KnightOutpostMatrix[me][SquareTo64[from]]*KOM_multi/4;