Helpmate-programs - and some problems for you....

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

Moderators: hgm, Rebel, chrisw

User avatar
F.Huber
Posts: 853
Joined: Thu Mar 09, 2006 4:50 pm
Location: Austria

Re: Helpmate programs - and some problems for you...

Post by F.Huber »

Ajedrecista wrote: Once I read your proposed solution, it took me less than a minute to find 1.- f3, f6; 2.- g4, Nc6; 3.- d4, h5; 4.- Kf2, Nh6; 5.- Kg3, h4+; 6.- Kxh4, Nf5#. The last couple of plies provided by Heiner were crucial for start to think in the right direction. So, the question is: why Chest did not find this solution?
Well, that's quite easy to explain: Chest doesn't find this 'solution' because it just is no solution, at least not a helpmate in its usual sense!

After 1.f3 f6 2.g4 Nc6 3.d4 your 'solution(?)' 3... h5 4.Kf2 Nh6 5.Kg3 h4+ 6.Kxh4 Nf5# is of course a possible continuation with 6 moves where the wK is mated on h4, but it is not the shortest possible helpmate after 3.d4, and thus Chest doesn't find it. It's the same as for usual mates, if you search for a mate in 6 but there's already a mate in 5, then Chest only gives you this #5 solution! And this is how usually all 3 kinds of chess problems (mate/selfmate/helpmate) are interpreted: a solution is the shortest possible move sequence.

Let Chest search for a HelpMate in 4 moves after 1.f3 f6 2.g4 Nc6, and you'll only find one solution (a helpmate in 3 moves) with the starting move 3.d4.
So the true helpmate after 1.f3 f6 2.g4 Nc6 3.d4 is in fact the following h#5:
3... f5 4.h3 e6 5.Nd2 Qh4

Franz
JBNielsen
Posts: 267
Joined: Thu Jul 07, 2011 10:31 pm
Location: Denmark

Re: Helpmate programs - and some problems for you...

Post by JBNielsen »

F.Huber wrote:
Ajedrecista wrote: Once I read your proposed solution, it took me less than a minute to find 1.- f3, f6; 2.- g4, Nc6; 3.- d4, h5; 4.- Kf2, Nh6; 5.- Kg3, h4+; 6.- Kxh4, Nf5#. The last couple of plies provided by Heiner were crucial for start to think in the right direction. So, the question is: why Chest did not find this solution?
Well, that's quite easy to explain: Chest doesn't find this 'solution' because it just is no solution, at least not a helpmate in its usual sense!

After 1.f3 f6 2.g4 Nc6 3.d4 your 'solution(?)' 3... h5 4.Kf2 Nh6 5.Kg3 h4+ 6.Kxh4 Nf5# is of course a possible continuation with 6 moves where the wK is mated on h4, but it is not the shortest possible helpmate after 3.d4, and thus Chest doesn't find it. It's the same as for usual mates, if you search for a mate in 6 but there's already a mate in 5, then Chest only gives you this #5 solution! And this is how usually all 3 kinds of chess problems (mate/selfmate/helpmate) are interpreted: a solution is the shortest possible move sequence.

Let Chest search for a HelpMate in 4 moves after 1.f3 f6 2.g4 Nc6, and you'll only find one solution (a helpmate in 3 moves) with the starting move 3.d4.
So the true helpmate after 1.f3 f6 2.g4 Nc6 3.d4 is in fact the following h#5:
3... f5 4.h3 e6 5.Nd2 Qh4

Franz
I understand.

Have you considered to implement the options that Brutalis have?
See evt. the documentation.

Brutalis should for this kind of problems also have specific options for each move fx white move 6 should be Kg3-h4.
Perhaps I make that some day...... Or use Chest if you are making it :D
User avatar
F.Huber
Posts: 853
Joined: Thu Mar 09, 2006 4:50 pm
Location: Austria

Re: Helpmate programs - and some problems for you...

Post by F.Huber »

JBNielsen wrote: Have you considered to implement the options that Brutalis have?
No, that would contradict the purpose of Chest/ChestUCI which is to find definitely the shortest solution for a mate/selfmate/helpmate (BTW as every other matesolver, too).
And such additional (IMHO 'fairy') conditions like e.g. mating on a special square) would certainly need a complete rewrite of Chest's main algorithms.
IIRC the program Alybadix can handle such special conditions, but since ChestUCI was born I haven't used this progam for years now. :wink:

Franz
hMx
Posts: 61
Joined: Wed Mar 08, 2006 9:40 pm
Location: Germany, Berlin

Re: Helpmate programs - and some problems for you...

Post by hMx »

Ajedrecista wrote:Hello:
hMx wrote:
F.Huber wrote:
JBNielsen wrote: Sorry, but the white king must be on h4!!

I should have been more precise:
3) A game started 1.f3,f6 2.g4,Nc6 3.d4 and ended in move six, where the white king on h4 was mated.

And there is only one solution!
Well, then let me summarize what this means:
After your first given 3 moves the wK is still on e1, but 3 (white) moves later he has to be on h4 (because you say the he is mated there).
So all the next 3 white moves are forced and the following PV must look like this:
3... 4.Kf2 ... 5.Kg3 ... 6.Kh4 ...#

In all possible solutions provided by Chest there are only 2 lines where the wK makes at least 2 steps towards h4, and these lines are:
3. ... Ne5 4.Kf2 Nxg4+ 5.Kg3 d5 6.Kf4 Qd6+
and
3. ... Nh6 4.Kf2 Nxg4+ 5.Kg3 d5 6.Kf4 Qd6+

As Jesus Munoz already wrote - there's definitely no PV in all 503 possible solutions which end with 6.Kh4 ...#, so either your intended solution is wrong ... or there's a bug in Chest (and I'm quite sure this is not the case).

So just waiting for your ' solution' ... :wink:

Franz
I think it ends in 6.Kxh4 Nf5# 8-)
Great! Did you solve the helpmate by yourself or did you use computer help?
I did that completely by myself. No computer at all. Was fun. :D
I had quite early the idea to activate the rook at h8... the rest was rather straight forward... discovering by hxg4 did not work, need some other piece to discover the rook, may be the knight... aha :idea:
Once I read your proposed solution, it took me less than a minute to find 1.- f3, f6; 2.- g4, Nc6; 3.- d4, h5; 4.- Kf2, Nh6; 5.- Kg3, h4+; 6.- Kxh4, Nf5#. The last couple of plies provided by Heiner were crucial for start to think in the right direction. So, the question is: why Chest did not find this solution?
Most probably it is not a shortest path.
Guaranteeing shortest solution paths is a main part of Chest's job.
The puzzles you present here, are not the standard kind of helpmate,
you know :wink:

For it to work, we would have to tell Chest, that the king must be mated
at exactly h4, so that it can change its judgement of a permissable solution,
and then eliminate the shorter path, which hides the intended solution.
@Franz: I exactly searched lines with 4.- Kf2, ...; 5.- Kg3, ...; 6.- {Kh4, Kxh4}, ...#, because the king moves were forced, but I failed to find the solution.

Regards from Spain.

Ajedrecista.
Cheers! Heiner
User avatar
Ajedrecista
Posts: 1971
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Helpmate programs - and some problems for you...

Post by Ajedrecista »

Hello Heiner:
hMx wrote:I did that completely by myself. No computer at all. Was fun. :D
I had quite early the idea to activate the rook at h8... the rest was rather straight forward... discovering by hxg4 did not work, need some other piece to discover the rook, may be the knight... aha :idea:
Good! I also had the idea of opening the h-file, as you can see on other posts by me, but I was not so smart to provide the required solution.
hMx wrote:Most probably it is not a shortest path.
Guaranteeing shortest solution paths is a main part of Chest's job.
The puzzles you present here, are not the standard kind of helpmate,
you know :wink:

For it to work, we would have to tell Chest, that the king must be mated
at exactly h4, so that it can change its judgement of a permissable solution,
and then eliminate the shorter path, which hides the intended solution.

Cheers! Heiner
Just to avoid confusion, Jens is who presents those puzzles, not me!

Regards from Spain.

Ajedrecista.
hMx
Posts: 61
Joined: Wed Mar 08, 2006 9:40 pm
Location: Germany, Berlin

Re: Helpmate programs - and some problems for you...

Post by hMx »

Ajedrecista wrote:Hello Heiner:
Just to avoid confusion, Jens is who presents those puzzles, not me!
Oh, yes, sure, sorry, my error! :oops:

Cheers! Heiner
User avatar
Ajedrecista
Posts: 1971
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Helpmate-programs - and some problems for you...

Post by Ajedrecista »

Hello Jens:
JBNielsen wrote:1) A game ended with 6.gxf8N mate.
I tried this problem again without computer help, retrograde analysis, etc. (only my brain) and the most I reached are helpmates in seven moves (13 plies) that end with gxf8=N#. Here are two possible solutions (there are more, of course):

1.- g4, h5; 2.- gxh5, Rh7; 3.- d4, d6; 4.- d5, Kd7; 5.- h6, Nf6; 6.- hxg7, Ne8; 7.- gxf8=N#.

1.- h4, d6; 2.- h5, Kd7; 3.- h6, Nc6; 4.- d4, Nf6; 5.- hxg7, Ne8; 6.- Rxh7, Rxh7; 7.- gxf8=N#.

These are not the solutions but I wanted to share them. Just as a side note, if the solution of the problem ends with 6.- gxf8=N#, then the white crowning pawn must do five or six moves, depending on the number of squares that advances in its first move.
JBNielsen wrote:5) In a game that involved a capture, whites king on f4 was mated in 4 moves.
In the fifth problem, the possible routes of the white king are:

2.- Kd2, ...; 3.- Ke3, ...; 4.- Kf4.
2.- Ke2, ...; 3.- Ke3, ...; 4.- Kf4.
2.- Ke2, ...; 3.- Kf3, ...; 4.- Kf4.
2.- Kf2, ...; 3.- Ke3, ...; 4.- Kf4.
2.- Kf2, ...; 3.- Kf3, ...; 4.- Kf4.
2.- Kf2, ...; 3.- Kg3, ...; 4.- Kf4.

So, white first move must be d3, d4, e3, e4 or f3 (I discarded f4). White can not capture any pieces. Am I right?
JBNielsen wrote:6) In a game that involved 2 bishop-moves, whites king on g4 was mated in 4 moves.
In the sixth problem, the possible routes of the white king are:

2.- Ke2, ...; Kf3, ...; Kg4.
2.- Kf2, ...; Kf3, ...; Kg4.
2.- Kf2, ...; Kg3, ...; Kg4.

So, white first move must be e3, e4, f3 or f4. The two bishop moves must be played by the black side. Am I right?

Regards from Spain.

Ajedrecista.
JBNielsen
Posts: 267
Joined: Thu Jul 07, 2011 10:31 pm
Location: Denmark

Re: Helpmate-programs - and some problems for you...

Post by JBNielsen »

Hello Jesús

1) Some parts of your solutions are right:
- the pawn advances two Squares in the first move
- the king is on d7 when it is mated
- Black has a knight on e8

5) one of your routes are right, and yes, it is Black who makes a capture

6) You are right about the first move and the king route.
And yes, it is Black who makes two bishop moves.

Have fun! ....... or trouble :wink:

best, jens
User avatar
Ajedrecista
Posts: 1971
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Helpmate-programs - and some problems for you...

Post by Ajedrecista »

Hi again:
JBNielsen wrote:Hello Jesús

1) Some parts of your solutions are right:
- the pawn advances two Squares in the first move
- the king is on d7 when it is mated
- Black has a knight on e8
I solved it! 1.- h4, d5; 2.- h5, Nd7; 3.- h6, Ndf6; 4.- hxg7, Kd7; 5.- Rh6, Ne8; 6.- gxf8=N#.

Your hints were very valuable: 'the pawn advances two squares in the first move': it could only be f4 or h4 (it will be justified later); 'the king is on d7 when it is mated': obviously, the black king must be on d7, e6, g6 or h6... the shortest path is d7, so d-pawn must advance either to d6 or d5 (I was obstinated with d6); 'black has a knight on e8': the problem with the kingside knight jumping to f6 and e8 is that it allows a defense with the rook... there were too many moves to let the black rook abandon the eighth rank.

So, the queenside knight would spend three moves to reach e8: b8-d7, d7-f6 and f6-e8 (I supposed that a knight must be on e8 for block the defense of the queen). Just said that: a d-pawn move plus a king move plus three knight moves complete the total of fives moves by black. So the d-pawn move only allows f4 or h4 as white first move, as white will not capture any pawn or piece but g7 and the piece on f8. Then, I had to attack c6 square (e6 was attacked by the knight underpromotion). I was obstinated with ..., d6 because it blocked the square d6 to the black king; I could not attack c6 square with just one move by white... or yes? Yes, of course! Rook must be useful and it discards f4 move, so for attacking c6 square with the rook, it also must attack d6, so the only possible black pawn move was ..., d5. It is the story of the solution, which I reached in around 10 minutes but I wrote it in more time.

Regards from Spain.

Ajedrecista.
User avatar
Ajedrecista
Posts: 1971
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Helpmate-programs - and some problems for you...

Post by Ajedrecista »

Hello:

I solved the fifth and the sixth problems... in blindfold style!
JBNielsen wrote:5) In a game that involved a capture, whites king on f4 was mated in 4 moves.
1.- e3, e6; 2.- Ke2, Qg5; 3.- Kf3, Qxg2+; 4.- Kf4, Bd6#.
JBNielsen wrote:6) In a game that involved 2 bishop-moves, whites king on g4 was mated in 4 moves.
1.- f3, e6; 2.- Kf2, Bc5; 3.- Kg3, Bf2+; 4.- Kg4, Qh4#.

I solved these two problems in reverse order: firstly the number 6, secondly the number 5.

Thank you very much for your entertaining problems. :)

Regards from Spain.

Ajedrecista.