At a glance you may think this is a draw. White wins!

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Arpad Rusz
Posts: 273
Joined: Sat Apr 17, 2010 2:34 pm
Location: Budapest

Re: At a glance you may think this is a draw. White wins!

Post by Arpad Rusz »

duncan wrote:
when I click on set value after copying/pasting a fen I get the message

'the position already exists in the database and cannot be overwritten'

duncan
First you have to delete the previously generated tablebase in order to set some positions again from that tablebase.
duncan
Posts: 12038
Joined: Mon Jul 07, 2008 10:50 pm

Re: At a glance you may think this is a draw. White wins!

Post by duncan »

Arpad Rusz wrote:
duncan wrote:
when I click on set value after copying/pasting a fen I get the message

'the position already exists in the database and cannot be overwritten'

duncan
First you have to delete the previously generated tablebase in order to set some positions again from that tablebase.
tried as you suggested. I saw it made a folder Finalgensp with 4 files presumably with the positions in but did not get any different results

duncan
pPerez
Posts: 9
Joined: Wed Mar 21, 2012 9:45 pm

Re: At a glance you may think this is a draw. White wins!

Post by pPerez »

duncan wrote:
Arpad Rusz wrote:
duncan wrote:
when I click on set value after copying/pasting a fen I get the message

'the position already exists in the database and cannot be overwritten'

duncan
First you have to delete the previously generated tablebase in order to set some positions again from that tablebase.
tried as you suggested. I saw it made a folder Finalgensp with 4 files presumably with the positions in but did not get any different results

duncan
Duncan,

Can you send me the names of the files you saw in the Finalgensp folder and the content of the FEN.txt file?
at my address referenced in http://www.mtu-media.com/finalgen/contact_ing.php
I'll try to investigate what happened.

Pedro Pérez
pPerez
Posts: 9
Joined: Wed Mar 21, 2012 9:45 pm

Re: At a glance you may think this is a draw. White wins!

Post by pPerez »

Hello,

You can use this special version of Finalgen to solve positions in a conditional way, that is, FinalGen will give the result of a position, but the correctness depends on the value you set for some critical positions.

This requires some skill from the user but it can be useful in some situations.

Here is another example, it is taken from the game Aronian-Kramnik, candidates tournament , London, 2013
[D]6b1/6p1/8/5kPP/K7/P1P5/8/8 w - - 0 1

In this position Finalgen could not find the solution: h6 is displayed as "Black wins or Draw".
All the other moves are winning for Black and are solved successfully.
In the game Aronian played g6 and eventually lost the game.

I have identified the following 4 critical positions:

8/7b/6pk/PK6/8/2P5/8/8 w - - 0 1
6b1/8/6pk/1K6/P7/2P5/8/8 w - - 0 1
8/P7/5k1P/2K5/2b5/6p1/8/8 b - - 0 1
6b1/P7/5k1P/1K6/2P5/8/6p1/8 w - - 0 1

I have set these positions to "Draw".
And then FinalGen gives a definite result: "Draw".
If we check the critical positions.

The first three have 6 pieces, so they can be easily checked using Nalimov tablebases.
Regarding the last one
[D]6b1/P7/5k1P/1K6/2P5/8/6p1/8 w - - 0 1
White promotes a pawn first. After that it seems that he/she can easily get the draw.

White can even try to win the game on that positions. So the outcome given by Finalgen can be interpreted as "White wins or draws".
In fact, White cannot win from the initial position because he/she cannot force Black to reach the critical position.
Black can play 1.. gxh6 in response to 1. h6, reaching a Draw according to the original generation (without conditions).

Conclusion:
The initial position is a (conditional) Draw if White does not lose in the critical position showed above .

Regards,

Pedro Pérez Romero
duncan
Posts: 12038
Joined: Mon Jul 07, 2008 10:50 pm

Re: At a glance you may think this is a draw. White wins!

Post by duncan »

pPerez wrote:
Duncan,

Can you send me the names of the files you saw in the Finalgensp folder and the content of the FEN.txt file?
at my address referenced in http://www.mtu-media.com/finalgen/contact_ing.php
I'll try to investigate what happened.

Pedro Pérez
thanks for your email response.

as I feel that an email you sent will be of interest to other users of finalgen, with your permission I will post it here.


...............................
I have taken a look at the post you mentioned. I think your question is about how FinalGen handles the pawn promotions.

This is a non-exhaustive list of cases that can occur:

1 No one can promote a pawn and no one can force a checkmate => The position is solved. FinalGen announces "draw"

2 The winning side can checkmate without promoting a pawn and can also prevent the opposite pawn promotion => The position is solved. FinalGen announces "mates in N"

3 The winning side can checkmate after promoting to a queen and prevents the opposite pawn promotion => The position is solved. FinalGen announces "wins in N". After the pawn promotion, the displayed result is simply "wins", as FinalGen does not store the number of moves.

4 The winning side needs to promote to a minor piece to get the win => The result is "unsolved", since FinalGen cannot handle minor promotions on the winning side.
This is the reason why FinalGen is not able to solve some studies with minor promotions.

5 The winning side needs to promote at least twice to get the win => The result is "unsolved", since FinalGen can handle only one promotion.
This rule has an exception. If the winning side can exchange or sacrifice the promoted queen before the second promotion, then FinalGen will continue calculating after the second promotion.

In the above cases 2 and 3, the winning side could prevent the opposite side's promotion, but what happens if the losing side can promote?.
Generally, in those cases FinalGen shows "unsolved", but there is two exceptions:
- If the promoted piece can be immediately captured (or after some checks), and the winning side can win after capturing it, then the position will be solved
- If the winning side can checkmate inmediately after the promotion or (of after some checks), then the position will be solved
when evaluating promotions from the losing side, all promotions are calculated, even minor promotions, contrary to "winning" side promotions, where only promotions to queen are calculated.

Here are some examples to illustrate these exceptions:
1 - "8/1P6/8/1KP5/3k4/8/6p1/8 w - - 0 1" General rule, both sides promote simultaneously. The result is "unsolved"

2 - "8/5P2/8/4K3/5P2/2k5/1p6/8 w - - 0 1"Exception. FinalGen is able to solve this position. Both sides promote simultaneously, but the black queen can be captured after some checks, and white wins afterwards (by promoting the remaining pawn) 1. Qc5+ Kd2 2. Qf2+ Kc3 3. Qd4+ exchanges queens and wins.

3 - "8/5P2/8/4K3/5N2/2k5/1p6/8 w - - 0 1" Like the previous example, both sides promotes simultaneously. White can capture the black queen after promotion, but FinalGen could no prove the win for white, as there is only a knight remaining. So the result is "unsolved"

4 -"8/P7/8/8/8/5K2/1p5k/8 w - - 0 1" FinalGen is able to solve this position. Both sides promote simultaneously, but White can force checkmate after some checks starting with:
1. Qh8+ Kg1 2. Qg7+ Kf1 3. Qg2+ and Qe2#


Now let's take a look at the position you submitted.
8/2P5/8/P7/1P4p1/3k4/5p1K/8 w - - 0 1
It looks like the example 2, both sides can promote simultanously and White can win the promoted queen with Qa3+, so it should be solved.
However, when considering "losing" promotions, MINOR PROMOTIONS MUST BE (AND ARE) EVALUATED. Otherwise the tablebase would not be correct. In that case, the black pawn can promote to a knight with a check, preventing the move Qa3+ temporaryly+, so white cannot inmediately capture the knight or checkmate, so the position is "unsolved"

If you place the white on a square so that he cannot be "checked" by the promoted pawn, let's say h4 or b2, then FinalGen will announce "White wins"




................
duncan
Posts: 12038
Joined: Mon Jul 07, 2008 10:50 pm

Re: At a glance you may think this is a draw. White wins!

Post by duncan »

Gerd Isenberg wrote:you may try the Szén position with Chunker ;-)
do you know where can one get hold of chunker from ?
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: At a glance you may think this is a draw. White wins!

Post by Gerd Isenberg »

duncan wrote:
Gerd Isenberg wrote:you may try the Szén position with Chunker ;-)
do you know where can one get hold of chunker from ?
No. It was a research project by Campbell and Berliner in the early 80. I fear source code was not available nor ported to PCs.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: At a glance you may think this is a draw. White wins!

Post by bob »

Uri Blass wrote:
Robert Flesher wrote:A beautiful position that illustrates the advantage that a single tempo can give. Then zugzwang and black is lost. The key to this position is looking at it yourself, before using an engine. It's very instructive! Some very strong engine(s) also struggle here. Komodo CCT after 5 min cannot see the win on my machine.



[D]4k3/5ppp/8/8/8/8/PPP5/3K4 w - - 0 1
Humans cannot calculate all possible lines so how looking at it by myself can help?

seeing the solution does not help to be able to practically win it because black can practically play a different move.

For example 1.Ke2 Ke7 or 1.Ke2 a5 or 1.Ke2 Kd7 2.Kf3 Kc6

Impossible to calculate all lines and if humans can understand that white wins then I would like to read some strategy that tells me what to do in every position and not a variation.
Here's a hint. Take off all the black pawns. Now work on how white makes progress without the king, and what black has to do to eventually zugzwang white to be able to draw (assuming the white king stays out of the mix). There are a couple of pattern positions one learns to recognize. Now put the black pawns back on the board and you are playing two games at once. White has one tempo, he can NOT give it up with a silly move or this turns into a draw or even worse. So each white (or black) move has to make progress in advancing his own pawns, while at the same time keeping the king located so that it can neutralize wild pawn pushes by the other side.

Several of us used to play this all the time on ICC (called wild 7 there). It is an interesting exercise, and once you "get it" there are no surprise moves that will trip you up..
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: At a glance you may think this is a draw. White wins!

Post by bob »

Robert Flesher wrote:
Uri Blass wrote:
Robert Flesher wrote:A beautiful position that illustrates the advantage that a single tempo can give. Then zugzwang and black is lost. The key to this position is looking at it yourself, before using an engine. It's very instructive! Some very strong engine(s) also struggle here. Komodo CCT after 5 min cannot see the win on my machine.



[D]4k3/5ppp/8/8/8/8/PPP5/3K4 w - - 0 1
Humans cannot calculate all possible lines so how looking at it by myself can help?

seeing the solution does not help to be able to practically win it because black can practically play a different move.

For example 1.Ke2 Ke7 or 1.Ke2 a5 or 1.Ke2 Kd7 2.Kf3 Kc6

Impossible to calculate all lines and if humans can understand that white wins then I would like to read some strategy that tells me what to do in every position and not a variation.
Hi Uri, I did not say calculate it youself. I said look at the position yourself without an engine. You of all people I thought would understand this. LOL, I guess not!. I studied and learned the secrets of this postion without an engine. I wanted people to move the pieces and try to understand this position. I guess this was the wrong place to post this.
There are things to be learned here. For example, Botvinnik used the term "trousers" (two legs) when discussing two passed pawns with at least one file in between them. A common position happens with the white a and c pawns on the same rank somewhere with the black king two ranks in front. If the pawns are on a4/c4, and king at b6, if black plays Kb5 threatening the c4 pawn, white calmly plays a5 and black must retreat to prevent that pawn from queening. Repeat until black can't give way any more. If there is a tempo problem (there are LOTS of tempo problems in the full game) white has the b pawn that can advance to "lose" a tempo and avoid zugzwang. Of course, on the other side of the board, the SAME game goes on in reverse. But white has that "move in his pocket" since he plays first, and he wins each and every zugzwang battle that occurs, unless he loses that tempi somehow.

I found it quite educational when we were fiddling with this back in the late 90's on ICC...

There are SO many positions where black will say "If I just had one extra move, or if I could just lose one tempi..." Strangely, it always seemed (to me) to be easier for white to lose than for black, given that mistakes are made, because white seems to have some sort of "first-move advantage" that he struggles to not give away, making it easier to do so. :)

Here's a sort of similar "two simultaneous games on one board" position from Reti:

[D]7K/8/k1P5/7p/8/8/8/8 w - - 0 1

White to move and draw in what looks to be a hopeless position. White has two goals, promote his C pawn and stop black's h-pawn. Seems he can't do either. But it turns out he can try to do both, which ties black's hands and leads to the draw...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: At a glance you may think this is a draw. White wins!

Post by bob »

Robert Flesher wrote:
syzygy wrote:
Robert Flesher wrote:Sometimes we need to leave the engines alone and move the pieces on a real board. :wink: I will say that a5 asap is the only way to win. For example Ke2 Kd7 Kf3 h5 a4 Kc6 a5 winning! As I explained the extra tempo leads to zugzwang. Black is lost! Perhaps final gen does not understand this.
I think it is safe to say that this position is far more complex that "a5 asap" and "the extra tempo leads to zugzwang". Sure, it is all about zugzwang, but the complexity is to such degree that mere mortals as opposed maybe to endgame specialists won't get very close to the solution from just "moving the pieces on a real board".

The article that was linked to might help though for gaining a real understanding of this position, I have not had a good enough look at it.
Once you study it infact it is that simple. I can beat ANY engine with ease playing the white pieces. So can anyone, but it requires some study. This is no different than learning Queen vs Rook in that it takes alot of study to be able to do it correctly. There are many different rank defense that the rook can adopt. However, once you have studied it enough it all comes together. Try it before you claim it to be to difficult, you may be surprised.
At one point, I thought KQ vs KR was hard. It is trivial, once you recognize the critical positions. Ditto for KBN vs K. All it takes is one wrong move to turn it into a 50-move draw. But a little study and that doesn't happen.

Wild 7 is incredibly clever. And incredibly hard the first time you play it. Steve Lim and I used to play it all the time (I was actually trying to add rules to Crafty to help solve it back then). We became quite adept at never losing with white so long as time wasn't a factor. And ditto for squeaking out draws as black (or even wins) if white makes one mistake.

Once you figure out how simple it actually is, it is one of those "THUNK... I coulda had a V-8" moments. :)