Ways to avoid "Draw Death" in Computer Chess

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Isaac
Posts: 265
Joined: Sat Feb 22, 2014 8:37 pm

Re: Ways to avoid "Draw Death" in Computer Chess

Post by Isaac »

jwes wrote:The random mover cannot easily beat anything. I can only suggest you download a random mover and try to lose to it.
A random mover checkmates another random mover over 15% of times, based on many million simulation games.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Ways to avoid "Draw Death" in Computer Chess

Post by Sven »

hgm wrote:
Lyudmil Tsvetkov wrote:I understand the worst-mover is the engine that always picks the move with worst eval(-1200cps or so).
This will not work very well. Scores are bad when the opponent has a single line of play that makes them bad. But against an opponent that cannot recognize this line, the chances that they will end up as bad as you thought they were are very slim.

To quickly beat a random mover you should not minimize the score of his best move, but the average score of all his moves. Minimax would be no good.

And when the opponent is not a random mover, but actively tries to lose as well, playing the move that would give you the lowest score against an opponent that is trying to win would probably be fatal. That opponent will never do the moves you counted on when obtaining the score on the basis of which you selected your move. The worst-mover would only worry about the opponent's best moves. Which will be avoided like the plague. So that basically the worst-mover is totally blind for everything that can happen.

I probably would not have a problem at all to make a worst-mover score 100% against me. Uri already pointed out the strategy.
Wouldn't the right strategy for a worst-mover be to always assume the opponent is a worst-mover as well, and apply "negamin" as search algorithm? If the opponent is in fact a random-mover or even a standard maximizing player then it should be a lot easier to lose than against a worst-mover. Being prepared for the worst case that the opponent avoids to win or draw might sometimes automatically lead to forcing the opponent into capturing your pieces and eventually mating you.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Ways to avoid "Draw Death" in Computer Chess

Post by Lyudmil Tsvetkov »

Guenther wrote:
Uri Blass wrote:
Lyudmil Tsvetkov wrote:
hgm wrote:
Lyudmil Tsvetkov wrote:- the real deal will be a worst-mover, that would pick only the very worst moves

how stronger would be a random-mover next to the worst-mover?
'Worst move' is an ill-defined concept. It depends on your opponent. Normally putting a Queen on a square attacked by a Pawn would be one of the worst things you can do. Against an opponent that knows Queens are valuable, and that capturing valuable pieces is good. But it will not force him to capture the Queen, and the chances a random mover would do it are only slim. Forcing him to capture your Queen through checks would be a much more certain way to get rid of it. But against a knowledgeable opponent it would just waste time.

What would probably help against a wide range of opponents would be to never capture anything, unless you have to.
I understand the worst-mover is the engine that always picks the move with worst eval(-1200cps or so).

of course, it will be easily beaten by the random-mover.

so, I guess the random-mover is at least 1000 elo stronger than the worst-mover.

PS. gosh, who started that thread, or who perverted it, never read such meaningless stuff...
I do not think that it always is going to lose against the random mover if this is the definition and the random mover may draw by stalemate or by the 50 move rule or by repetition.

If you want to lose against the random mover the best strategy is to force the random mover to mate you and it is better to have material advantage so you can force the opponent to win against you.

In other words use normal evaluation except evaluating positions when the opponent has only king as a draw and checkmate as a loss instead of a win.
He simply cannot read nor grasp what we talk about here.
I posted already twice that the worst mover had a score between
11-13% against random movers in my test in 200 games.
certainly not big, is it?

where did I claim worst-mover will not score draws?
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Ways to avoid "Draw Death" in Computer Chess

Post by Lyudmil Tsvetkov »

btw., you tried possibly with the wrong engine.

the best worst-mover ever(I like that phrase) is certainly latest development SF with code modified to return the worst evaluated move as the best instead.

due to its deep search, Sf will convincingly find all the best losing moves much better than other good worst-moving engines.

pfew, what a thread.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Ways to avoid "Draw Death" in Computer Chess

Post by Lyudmil Tsvetkov »

hgm wrote:
Lyudmil Tsvetkov wrote:I understand the worst-mover is the engine that always picks the move with worst eval(-1200cps or so).
This will not work very well. Scores are bad when the opponent has a single line of play that makes them bad. But against an opponent that cannot recognize this line, the chances that they will end up as bad as you thought they were are very slim.

To quickly beat a random mover you should not minimize the score of his best move, but the average score of all his moves. Minimax would be no good.

And when the opponent is not a random mover, but actively tries to lose as well, playing the move that would give you the lowest score against an opponent that is trying to win would probably be fatal. That opponent will never do the moves you counted on when obtaining the score on the basis of which you selected your move. The worst-mover would only worry about the opponent's best moves. Which will be avoided like the plague. So that basically the worst-mover is totally blind for everything that can happen.

I probably would not have a problem at all to make a worst-mover score 100% against me. Uri already pointed out the strategy.
chances that a random-mover will pick some wins from better positions are of course much greater than chances it will pick wins from worse positions.

so, naturally, a worst-mover is simply the engine that picks all the worst moves, while the best-mover the perfect engine, picking all the best moves.

I don't see how any different strategy from choosing the lowest eval score could lead to better results.

of course, SF with such conditions is the best worst-mover, as it will reach big depths, modifying a weaker engine like that would not be very useful.
Uri Blass
Posts: 10267
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Ways to avoid "Draw Death" in Computer Chess

Post by Uri Blass »

Lyudmil Tsvetkov wrote:
hgm wrote:
Lyudmil Tsvetkov wrote:I understand the worst-mover is the engine that always picks the move with worst eval(-1200cps or so).
This will not work very well. Scores are bad when the opponent has a single line of play that makes them bad. But against an opponent that cannot recognize this line, the chances that they will end up as bad as you thought they were are very slim.

To quickly beat a random mover you should not minimize the score of his best move, but the average score of all his moves. Minimax would be no good.

And when the opponent is not a random mover, but actively tries to lose as well, playing the move that would give you the lowest score against an opponent that is trying to win would probably be fatal. That opponent will never do the moves you counted on when obtaining the score on the basis of which you selected your move. The worst-mover would only worry about the opponent's best moves. Which will be avoided like the plague. So that basically the worst-mover is totally blind for everything that can happen.

I probably would not have a problem at all to make a worst-mover score 100% against me. Uri already pointed out the strategy.
chances that a random-mover will pick some wins from better positions are of course much greater than chances it will pick wins from worse positions.

so, naturally, a worst-mover is simply the engine that picks all the worst moves, while the best-mover the perfect engine, picking all the best moves.

I don't see how any different strategy from choosing the lowest eval score could lead to better results.

of course, SF with such conditions is the best worst-mover, as it will reach big depths, modifying a weaker engine like that would not be very useful.
If I want to lose against random mover then the best strategy is to force the random mover to win.

If I have a big material advantage it is easy to force the opponent to win.

If you change the sign of SF evaluation to make the best move the worst move then SF does not have a good evaluation for that type of game because basically winning material if you do not win too much is good to force the opponent to mate later and SF is not going to try to win material in order to get a position that it can force the opponent to mate.

Evaluation that say that winning material is good except the last 2 connected pawns is probably good when you should also evaluate the distance to the following structure of KPP vs K that allow forcing mate and if you get closer to the structure it is also good.

[D]8/8/8/8/QR6/2kp4/2p5/2K5 b - - 2 1
kbhearn
Posts: 411
Joined: Thu Dec 30, 2010 4:48 am

Re: Ways to avoid "Draw Death" in Computer Chess

Post by kbhearn »

There's certainly ways to force the other side to mate you - one target position that's reasonably achievable against a random mover where you can get a huge material advantage (not the most efficient maybe but as a proof of concept) :

[pgn]
[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "0-1"]
[FEN "5N2/8/8/8/1Q6/6p1/3B2B1/k6K w - - 0 1"]

1.Qa3+ Kb1 2.Bc3 Kc2 3.Qb2+ Kd1 4.Qb1+ Ke2 5.Bb4 Ke3 6.Qd1 Kf2 7.Qc2+ Ke3 8.Bc3 Kf4 9.Qe4+ Kg5 10.Qe6 Kh5 11.Nh7 Kh4 12.Qe5 Kg4 13.Nf6+ Kh4 14.Ne4 Kg4 15.Nd2 Kh4 16.Bd4 Kg4 17.Bc5 Kh4 18.Bg1 Kg4 19.Bh3+ Kh4 20.Nf3+ Kxh3 21.Qf4 g2# 0-1
[/pgn]
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Ways to avoid "Draw Death" in Computer Chess

Post by hgm »

Sven wrote:Wouldn't the right strategy for a worst-mover be to always assume the opponent is a worst-mover as well, and apply "negamin" as search algorithm? If the opponent is in fact a random-mover or even a standard maximizing player then it should be a lot easier to lose than against a worst-mover. Being prepared for the worst case that the opponent avoids to win or draw might sometimes automatically lead to forcing the opponent into capturing your pieces and eventually mating you.
The negamin you propose is simply achieved by just flipping the sign of the evaluation. And no, it is not a good way to lose games against an opponent that tries to lose. (Any form of poor play is of course a good way to lose from engines that try to win.)

This is well known from Losers or Suicide/Giveaway Chess. Mandatory capture there makes it easier to force your opponent into doing stuff that in ordinary Chess would be considered bad (losing material), but that is in fact just a minor difference. The main point is that giving away your material too early in that game is a losing strategy ('losing' defined according to the rules of those games, i.e. allowing the opponent to achieve his final goal). It gives your opponent control over the game, and he will then use that control to force you to do what you don't want, fulfilling his winning condition. Whether that is capturing all your material, or checkmating you is just a minor difference. E.g. this is an easy forced loss for black:
[d]kb6/3n4/8/K7/8/1q6/1P6/8 w

So initially you have to play sort of normal, trying to force material gain to get control over the game. A worst-mover would hand over such control eagerly.

[Edit] I see we all have similar ideas: leave the opponent only King plus two connected Pawns, or a single b- or g-Pawn, against an overwhelming force. Block the Pawns, force the King to assume the position needed to checkmate you, trap him there while unblocking the Pawn, and force the Pawn to march up to checkmate you. Being reduced to King and Pawns against a lot of material puts you at the mercy of the opponent; he can make you do whatever he wants. Whether it is checkmating you, being checkmated by you, getting rid of all his remaining material...
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Ways to avoid "Draw Death" in Computer Chess

Post by Michel »

This thread should be split!

The current discussion is completely OT.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
User avatar
Ozymandias
Posts: 1532
Joined: Sun Oct 25, 2009 2:30 am

Re: Ways to avoid "Draw Death" in Computer Chess

Post by Ozymandias »

Lyudmil Tsvetkov wrote:
Ozymandias wrote:
Lyudmil Tsvetkov wrote:
Evert wrote:What's to avoid? It's pretty clear that chess (FIDE rules) is a draw from the initial position with optimal play from both sides.
Unless you rig the opening by having one side play vastly suboptimal, a draw is the expected outcome. If you do unbalance the opening like that, you're not measuring a result, just confirming your input.

Or am I missing something?
1.c4 wins.
You missed the continuation, 1.c4 f6 wins for sure.
nope, I definitely mean in all lines.
I know, it was an attempt at derision.