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. In your code, you however may have negative mob if the knight is not on an outpost and can be attacked. Did you intend this?
2. Personally I don't think it matters whether one or 2 pawns attacks a knight - you have a different penalty.
3. Use "defender++" rather than "defender += 1", it is more usual.
4. Your bonuses/penalties are quite small (2 or 4), so they will not change the engines play significantly, I think you will also have a measurable slowdown from the extra code. In particular the unattacked knight bonus could probably go up to 10. A similar idea is on my TODO list.
Lastly, test your changes. I would be interested to see your results.
I agree that 2x bonus for two defenders is too much. Thinking about it, I would suggest 1.5 (*3/2) as the difference is neglible and this may be slightly faster.
That is good - it always best to compare the same compiles. Do you think you could pm me the new code - I will try it in the latest Toga version. If you would like the latest Toga please also pm me - I will send it to you.
Here is a simplified version of the code (I hope a little bit easier to read and a little bit faster); I change the values from 8/5 to 3/2 as you said.
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
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.
Nice! It would be good if there were finally some real improvements in Toga, rather than just recompiles with slightly altered settings or trivial modifications.
Although the people who did that seemed to have all moved on to the Ippo family.
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.
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".