Question for Stefan about his EAS tool
Moderators: hgm, Rebel, chrisw
-
- Posts: 7141
- Joined: Thu Aug 18, 2011 12:04 pm
- Full name: Ed Schröder
Re: Question for Stefan about his EAS tool
I think moving to 2 pawns is a simple and nice improvement as it solves most the typical endgame exceptions I posted. Consider to keep it.
90% of coding is debugging, the other 10% is writing bugs.
-
- Posts: 373
- Joined: Thu Jan 22, 2015 3:21 pm
- Location: Zurich, Switzerland
- Full name: Jonathan Rosenthal
Re: Question for Stefan about his EAS tool
I am not entirely sure what the bad draws concept is trying to conceptualize in terms of "aggressiveness". Succeeding or failing to convert a material advantage does not really correspond to aggresiveness, imo. Using Patricia as an example is dubious, as it was designed in order to maximize your metric, so of course it does well in that submetric as well.
My concern is that it may actually result in less aggressive engines. For example, since Patricia is being engineered around maximizing the EAS metric, it might end up putting too large an emphasis on endgame play, to avoid getting penalized by that portion of the metric. This may come at the cost of optimizing other portions of the metric less.
Generally it is not clear to me what you want to see in draws, other than a lower frequency in general. Eg penalizing long draws might make the engine seek early repetitions. Penalizing short draws might make it avoid sacrifices where there is a chance it has to bail out with a perpetual.
None of this is to say your metric is "wrong", just that I am not certain what kind of play that portion of the metric actually incentivizes.
My concern is that it may actually result in less aggressive engines. For example, since Patricia is being engineered around maximizing the EAS metric, it might end up putting too large an emphasis on endgame play, to avoid getting penalized by that portion of the metric. This may come at the cost of optimizing other portions of the metric less.
Generally it is not clear to me what you want to see in draws, other than a lower frequency in general. Eg penalizing long draws might make the engine seek early repetitions. Penalizing short draws might make it avoid sacrifices where there is a chance it has to bail out with a perpetual.
None of this is to say your metric is "wrong", just that I am not certain what kind of play that portion of the metric actually incentivizes.
-Jonathan
-
- Posts: 2570
- Joined: Sat Sep 03, 2011 7:25 am
- Location: Berlin, Germany
- Full name: Stefan Pohl
Re: Question for Stefan about his EAS tool
The main idea of the bad draw is, to punish agreeing to (early) draws on a before-endgame-board (depending on the number of pieces on the board, not move-numbers). Because making draws on a full board is definitly not aggressive play, so avoiding such draws should get rewarded. Then the additionally idea was, that making draws with a material disadvantage should be rewarded, too, because it would be wrong and unfair to punish an engine for drawing on a full board, when the engine has a material disadvantage. Logical. And at this point, I mentioned the opposite case: Having a material advantage should lead to a win, not a draw and so, a draw, having a material advantage is a bad draw, too. So, I added this formula. Of course, Ed Schroeder is right, that in endgames, there are some cases, when a material advantage leads not to a win. Here, this formul fails. But, IMHO, these fails are not really a fail at all times, because, in a lot of these cases, the engine had the material advantage before the endgame and had (perhaps) the opportunity to avoid some exchanges and the drawish endgame and that could lead to the opportunity to gain another pawn and win. The problem for me here was, that pgn-extract does not allow to recognize (fast), if a material advantage already happened on a full board. So, I could not make a difference here. So, the solution in the EAS-tool is the best way, I could do it...jorose wrote: ↑Thu Aug 01, 2024 7:52 pm I am not entirely sure what the bad draws concept is trying to conceptualize in terms of "aggressiveness". Succeeding or failing to convert a material advantage does not really correspond to aggresiveness, imo. Using Patricia as an example is dubious, as it was designed in order to maximize your metric, so of course it does well in that submetric as well.
My concern is that it may actually result in less aggressive engines. For example, since Patricia is being engineered around maximizing the EAS metric, it might end up putting too large an emphasis on endgame play, to avoid getting penalized by that portion of the metric. This may come at the cost of optimizing other portions of the metric less.
Generally it is not clear to me what you want to see in draws, other than a lower frequency in general. Eg penalizing long draws might make the engine seek early repetitions. Penalizing short draws might make it avoid sacrifices where there is a chance it has to bail out with a perpetual.
None of this is to say your metric is "wrong", just that I am not certain what kind of play that portion of the metric actually incentivizes.
But if anybody does not like the rule of 1 pawn material advantage leads to a bad draw, if the game is drawn, you can easily change the code in the EAS-tool:
In the EAS-tool code, you find these 3 lines:
REM *** Find all draws, were engine had material advantage (=bad draw)
pgn-extract --quiet -Tw%engine% -y1_pawnsac_black enginedraws.pgn -abad_draws2.pgn >NUL
pgn-extract --quiet -Tb%engine% -y1_pawnsac_white enginedraws.pgn -abad_draws2.pgn >NUL
If you want to delete this bad draw rule completely, just delete these 3 lines (or write REM at the beginning of the 2 lines with pgn-extract)
If you want to change the rule to 2 pawns (a draw is a bad draw, when the engine had at least 2 pawns material advantage in a game, not 1 pawn), then change the lines to:
REM *** Find all draws, were engine had material advantage (=bad draw)
pgn-extract --quiet -Tw%engine% -y2_pawnsac_black enginedraws.pgn -abad_draws2.pgn >NUL
pgn-extract --quiet -Tb%engine% -y2_pawnsac_white enginedraws.pgn -abad_draws2.pgn >NUL
(Only 2 numbers changed: Both "1" in the 2 lines were changed to a "2" (in "-y1_pawnsac_black" and "-y1_pawnsac_white")
Thats it!
Very easy. And because, the EAS-tool is programmed in the Windows-Batch language, no compiler or development-environment or so has to be installed. Its an interpreter-language, so just open the .bat-file with any text-editor, change something, save and run and have fun.