replace the evaluation by playing against yourself

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Uri Blass
Posts: 8774
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

replace the evaluation by playing against yourself

I wonder if somebody try it.

The idea is simple and can cause a program to evaluate fortresses correctly as a draw and also to see mate scores in positions with big material advantage even if the mate is not correct.

You start with chess engine A and do what you like with the search algorithm.

When you come to the evaluation part then you simply tell stockfish to play against itself at small depth like depth 6 and return a number based on the result of the game(if the game is drawn you return 0.00 and otherwise you return mate in X for the side that won).

The program may be weak but it will probably show 0.00 for fortress positions that it has no special knowledge about them.

For example it may show draw score for the following position I guess that stockfish draw against itself at depth 6 from almost every leaf position of a tree.

[D]2k5/1pP5/pP6/P7/3K4/8/8/6B1 w - - 1 1

It may also show mate score for a position like the following simply because I guess playing of stockfish against itself at depth 6 is going to lead to mate score from almost every leaf position.

[D]rnb1kbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 1 1

Now suppose a programmer start with simple alpha-beta when the evaluation is stockfish against itself at depth 6 and simply try to improve the search when the evaluation is static.

What is the elo that the programmer is going to get?

Can the programmer improve playing strength by replacing evaluation 0 for draw by static evaluation of stockfish with the idea that static evaluation of stockfish of +6 pawns is still not mate and people should understand that if the program does not show mate score it is probably a draw even if the number is very high?

I think that it may be interesting to have a program that play like that even if it is weaker because we have some estimate mate in how many moves you have in winning positions and we have detection of fortress that normal chess programs do not have.

The depth of the search for stockfish that the program use in the leaf nodes does not have to be static and can be a parameter that the user may change.

zullil
Posts: 6388
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA
Full name: Louis Zulli

Re: replace the evaluation by playing against yourself

Uri Blass wrote:I wonder if somebody try it.

You start with chess engine A and do what you like with the search algorithm.

When you come to the evaluation part then you simply tell stockfish to play against itself at small depth like depth 6 and return a number based on the result of the game(if the game is drawn you return 0.00 and otherwise you return mate in X for the side that won).
So every leaf is evaluated by a SF vs. SF game? Seems rather impractical, to say the least.

Uri Blass
Posts: 8774
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: replace the evaluation by playing against yourself

zullil wrote:
Uri Blass wrote:I wonder if somebody try it.

You start with chess engine A and do what you like with the search algorithm.

When you come to the evaluation part then you simply tell stockfish to play against itself at small depth like depth 6 and return a number based on the result of the game(if the game is drawn you return 0.00 and otherwise you return mate in X for the side that won).
So every leaf is evaluated by a SF vs. SF game? Seems rather impractical, to say the least.
I do not see the problem.
The program may be weaker and may get smaller depths but still may see some ideas that normal stockfish does not see.

Dann Corbit
Posts: 11262
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: replace the evaluation by playing against yourself

Uri Blass wrote:
zullil wrote:
Uri Blass wrote:I wonder if somebody try it.

You start with chess engine A and do what you like with the search algorithm.

When you come to the evaluation part then you simply tell stockfish to play against itself at small depth like depth 6 and return a number based on the result of the game(if the game is drawn you return 0.00 and otherwise you return mate in X for the side that won).
So every leaf is evaluated by a SF vs. SF game? Seems rather impractical, to say the least.
I do not see the problem.
The program may be weaker and may get smaller depths but still may see some ideas that normal stockfish does not see.
I think if searching for a draw, a simpler approach is to simply recognize failure to make progress.

E.g. a score of 1000 seems great, but if you get it ten plies in a row, it is almost certainly a draw (or the current plan is a draw at best).
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

hgm
Posts: 24662
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: replace the evaluation by playing against yourself

I think that s completely wrong. There are many situations that require more than 10 ply to make any progress. Why do you think we have a 50-move rule, and not a 5-move rule?

Besides, even if what you propose is true, you could not use it in search. Because a modern search doesn't even try to make progress. It just tries to stay above beta, preferrably by doing nothing at all (i.e. null move). So of course it won't make progress. Scoring the leave as 0.0 then would kill null-move pruning, and take an enormous toll on playing strength.

First time you will recognize the no-progress-for-N-moves will be when the fortress is present in the root, and iterative deepening doesn't increase the score. And then all you can say is: "Oh, too bad. My last move must have been a blunder, because I was at +4, and now it is an unavoidable draw!"...

Evert
Posts: 2929
Joined: Fri Jan 21, 2011 11:42 pm
Location: NL
Contact:

Re: replace the evaluation by playing against yourself

Dann Corbit wrote: I think if searching for a draw, a simpler approach is to simply recognize failure to make progress.

E.g. a score of 1000 seems great, but if you get it ten plies in a row, it is almost certainly a draw (or the current plan is a draw at best).
Indeed. Recognising that the currently selected move from the root position leads to a (fortress) draw is not so hard. Doing something with that information (test an alternative plan, or even better: steer the game to or away from such plans) is another matter.

zullil
Posts: 6388
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA
Full name: Louis Zulli

Re: replace the evaluation by playing against yourself

Uri Blass wrote:
zullil wrote:
Uri Blass wrote:I wonder if somebody try it.

You start with chess engine A and do what you like with the search algorithm.

When you come to the evaluation part then you simply tell stockfish to play against itself at small depth like depth 6 and return a number based on the result of the game(if the game is drawn you return 0.00 and otherwise you return mate in X for the side that won).
So every leaf is evaluated by a SF vs. SF game? Seems rather impractical, to say the least.
I do not see the problem.
The program may be weaker and may get smaller depths but still may see some ideas that normal stockfish does not see.
Perhaps I'm simply misunderstanding. Static evaluation of leaves is already expensive in terms of time. Wouldn't this approach be prohibitively expensive?

Dann Corbit
Posts: 11262
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: replace the evaluation by playing against yourself

Set the evaluation to a temp variable using the new data
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

Uri Blass
Posts: 8774
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: replace the evaluation by playing against yourself

zullil wrote:
Uri Blass wrote:
zullil wrote:
Uri Blass wrote:I wonder if somebody try it.

You start with chess engine A and do what you like with the search algorithm.

When you come to the evaluation part then you simply tell stockfish to play against itself at small depth like depth 6 and return a number based on the result of the game(if the game is drawn you return 0.00 and otherwise you return mate in X for the side that won).
So every leaf is evaluated by a SF vs. SF game? Seems rather impractical, to say the least.
I do not see the problem.
The program may be weaker and may get smaller depths but still may see some ideas that normal stockfish does not see.
Perhaps I'm simply misunderstanding. Static evaluation of leaves is already expensive in terms of time. Wouldn't this approach be prohibitively expensive?
Of course it is going to be expensive but even if the program evaluate by this way only 100 nodes per second then it is still enough to prefer avoiding fortress in some cases.

For example the following position that happened in human game.

[D]2k5/2p5/1q1p4/pPpPp1pp/N1P1Pp2/P4PbP/KQ4P1/8 w - -

White did a mistake by capturing the queen when after
46.Nxb6+ cxb6 47.h4 gxh4 48.Qd2 h3 49.gxh3 h4 it is a draw

46.Qc1 is considered to be a better move when the idea is to put the king at a4 and win the pawn a5.

See
https://en.wikipedia.org/wiki/Fortress_(chess)

Hopefully play against yourself at small fixed depth after 49...h4 may be enough tp see the draw when normal evaluation cannot do it.

Note that I am not sure that 46.Qc1 is winning and maybe black can draw even after losing a5 but even if it does not win it is possible to change the position so white wins.

Maybe the following position for example

[D]2k5/2pn4/1r1p4/pPpPp1pp/N1P1Pp2/P4PbP/KQ4P1/8 w - - 1 1

Ovyron
Posts: 4373
Joined: Tue Jul 03, 2007 2:30 am

Re: replace the evaluation by playing against yourself

What about reducing the cost by only playing games against yourself in one of the cores, while the rest search normally? For MultiCore engines, for cores>1.