Quick loss

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: Quick loss

Post by Henk »

Uri Blass wrote:
Henk wrote:Tested my chess program. Now I played with white myself.
I got:

e2-e4 g8-f6
e4-e5 f6-e4 ?? This knight can not be saved anymore.
d2-d4 e7-e6
g2-g3 b8-c6
f2-f3 e4-g5
h2-h4 f8-b4 Maybe this is why the program does not see it because this check extends the variation
c2-c3 (1 - 0)


How can I prevent f6-e4 from being played ?
Ne4 is a bad move but the real tactical mistake is 4...Nc6
4...f5 or 4...f6 prepare Nf7 and save the knight.

searching to depth 7 or 8 should be clearly enough to avoid Nc6
and if your program cannot get this depth in less than 0.5 second then something is clearly wrong with your search.
What if I played f2f3 instead of g2g3.
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: Quick loss

Post by Henk »

Henk wrote:
Uri Blass wrote:
Henk wrote:Tested my chess program. Now I played with white myself.
I got:

e2-e4 g8-f6
e4-e5 f6-e4 ?? This knight can not be saved anymore.
d2-d4 e7-e6
g2-g3 b8-c6
f2-f3 e4-g5
h2-h4 f8-b4 Maybe this is why the program does not see it because this check extends the variation
c2-c3 (1 - 0)


How can I prevent f6-e4 from being played ?
Ne4 is a bad move but the real tactical mistake is 4...Nc6
4...f5 or 4...f6 prepare Nf7 and save the knight.

searching to depth 7 or 8 should be clearly enough to avoid Nc6
and if your program cannot get this depth in less than 0.5 second then something is clearly wrong with your search.
What if I played f2f3 instead of g2g3.

After f2f3 instead of g2g3, you might get d8h4, g2g3, e4g3, h2g3, h4h1, g1h3 and the queen may be trapped or not. Have to be a really clever program to find out.
User avatar
Codesquid
Posts: 138
Joined: Tue Aug 23, 2011 10:25 pm
Location: Germany

Re: Quick loss

Post by Codesquid »

asanjuan wrote:I think that there must be a bug somewhere.
I agree.
nanos gigantium humeris insidentes
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: Quick loss

Post by Henk »

Codesquid wrote:
asanjuan wrote:I think that there must be a bug somewhere.
I agree.
Yes you're right. Found another major bug. This time in q-search. aiaiai.
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: Quick loss

Post by Henk »

Henk wrote:
Henk wrote:
Uri Blass wrote:
Henk wrote:Tested my chess program. Now I played with white myself.
I got:

e2-e4 g8-f6
e4-e5 f6-e4 ?? This knight can not be saved anymore.
d2-d4 e7-e6
g2-g3 b8-c6
f2-f3 e4-g5
h2-h4 f8-b4 Maybe this is why the program does not see it because this check extends the variation
c2-c3 (1 - 0)


How can I prevent f6-e4 from being played ?
Ne4 is a bad move but the real tactical mistake is 4...Nc6
4...f5 or 4...f6 prepare Nf7 and save the knight.

searching to depth 7 or 8 should be clearly enough to avoid Nc6
and if your program cannot get this depth in less than 0.5 second then something is clearly wrong with your search.
What if I played f2f3 instead of g2g3.

After f2f3 instead of g2g3, you might get d8h4, g2g3, e4g3, h2g3, h4h1, g1h3 and the queen may be trapped or not. Have to be a really clever program to find out.
Played again but this time f2f3 instead of g2g3:
My program replies with this PV:

d8-h4 e1-e2 e4-g3 h2-g3 h4-h1
g1-h3 h1-h2 c1-f4 b8-c6 null

Value +2 but his queen is trapped
asanjuan
Posts: 214
Joined: Thu Sep 01, 2011 5:38 pm
Location: Seville, Spain

Re: Quick loss

Post by asanjuan »

Played again but this time f2f3 instead of g2g3:
My program replies with this PV:

d8-h4 e1-e2 e4-g3 h2-g3 h4-h1
g1-h3 h1-h2 c1-f4 b8-c6 null

Value +2 but his queen is trapped
Not so bad!
Rhetoric plays a similar line thinking 1 second.
Qh4+ Ke2 Ng3+ hxg3 Qxh1 Kf2 Nc6 Nc3 f6 Nb5 Kd8 exf6 gxf6 Bf4 -2,36/13

The position that you reach is good for black since the queen can escape from the corner.
Any materialistic engine would have played the same move. Good job!
Still learning how to play chess...
knigths move in "L" shape ¿right?
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: Quick loss

Post by Henk »

asanjuan wrote:
Played again but this time f2f3 instead of g2g3:
My program replies with this PV:

d8-h4 e1-e2 e4-g3 h2-g3 h4-h1
g1-h3 h1-h2 c1-f4 b8-c6 null

Value +2 but his queen is trapped
Not so bad!
Rhetoric plays a similar line thinking 1 second.
Qh4+ Ke2 Ng3+ hxg3 Qxh1 Kf2 Nc6 Nc3 f6 Nb5 Kd8 exf6 gxf6 Bf4 -2,36/13

The position that you reach is good for black since the queen can escape from the corner.
Any materialistic engine would have played the same move. Good job!
If instead of Kf2, Nh3 is played the queen is trapped I think.

What search depths do you reach with your program when thinking time is between 2-10 seconds. My average is 7 or 8. Minimum is 6. Sometimes I get 9 and in the end game even more. [Count q-search as 0]. Before I removed these major two bugs I got 10 regularly, so I almost thought my program was playing strong.

I looked at these stockfish analysis examples and they show analysis of over 40 plies. Amazing.
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: Quick loss

Post by AlvaroBegue »

Henk wrote: If instead of Kf2, Nh3 is played the queen is trapped I think.
You are in a computer chess forum. Use an engine to verify that kind of thing, instead of relying in your poor understanding of the game.
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: Quick loss

Post by Henk »

AlvaroBegue wrote:
Henk wrote: If instead of Kf2, Nh3 is played the queen is trapped I think.
You are in a computer chess forum. Use an engine to verify that kind of thing, instead of relying in your poor understanding of the game.
I don't have one. I don't know how to set up an arbitrary position in Arena.
I can only use my own engine, which I cannot trust.

By the way I encountered this position very often. Maybe I'm the expert (not).
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: Quick loss

Post by AlvaroBegue »

Henk wrote:
AlvaroBegue wrote:
Henk wrote: If instead of Kf2, Nh3 is played the queen is trapped I think.
You are in a computer chess forum. Use an engine to verify that kind of thing, instead of relying in your poor understanding of the game.
I don't have one. I don't know how to set up an arbitrary position in Arena.
I can only use my own engine, which I cannot trust.
What do you mean you don't have one? There are gazillions of free engines on the web. Stockfish comes to mind. If you don't know how to set positions in Arena (how hard can that be?), you can always talk UCI directly to the engine.

Code: Select all

uci
position startpos moves e2e4 g8f6 e4e5 f6e4
go depth 15
Question for other people in the forum: Is Henk a total troll?