perpetual check

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Look
Posts: 364
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

perpetual check

Post by Look »

http://www.chesscorner.com/tutorial/basic/draw/draw.htm
http://www.chesskid.com/article/view/p- ... tual-check


AFAIK many engines including Stockfish (5) do not have proper perpetual check draw detection; They rely on Alpha Beta to do this, and that is late. Houdini 1.5a (that I have a hand on) does this much better.

Consider this computer game and tell when your engine detects draw.

[Event "?"]
[Site "?"]
[Result "1/2-1/2"]
[Date "2014.06.23"]
[Remark "3 0"]

1.d4 Nf6 2.c4 e5 3.dxe5 Ng4 4.Nc3 Bc5 5.e3 Nxe5 6.Nf3 Nxf3+ 7.Qxf3
O-O 8.Be2 Nc6 9.O-O Bd6 10.b3 Be5 11.Bb2 d6 12.Qd5 Re8 13.Qd2
Bf6 14.Bd3 b6 15.Rad1 Bb7 16.Be4 Qc8 17.f3 a5 18.Rfe1 Nb4 19.Bxb7
Qxb7 20.e4 Nc6 21.Nd5 Bxb2 22.Qxb2 Ne5 23.Qd4 Qc8 24.Rd2 Nc6
25.Qf2 f6 26.Red1 Ne5 27.Nc3 Re7 28.Qd4 Re8 29.Nb5 Qd7 30.Qd5+
Kh8 31.Nc3 Qc8 32.Qd4 Kg8 33.a3 Kh8 34.Qd5 Ng6 35.Qd3 Nf4 36.Qc2
Ne6 37.Nd5 Qd7 38.g3 Nc5 39.b4 axb4 40.axb4 Ne6 41.c5 bxc5 42.bxc5
Nxc5 43.Nxf6 gxf6 44.Qxc5 Re5 45.Rd5 Qf7 46.Qb5 Rxd5 47.exd5
Qe7 48.Qb2 Kg7 49.Kg2 Qf7 50.Rd2 Ra5 51.Rd4 h5 52.Qd2 Rc5 53.Qd3
c6 54.dxc6 Qa2+ 55.Kh3 Rc2 56.g4 Rxh2+ 57.Kg3 Qf2+ 58.Kf4 Rh3
59.Qe4 hxg4 60.Qe7+ Kg6 61.Qe8+ Kh6 62.Qf8+ Kg6 63.Qe8+ Kh6 64.Qf8+
Kg6 65.Qe8+

If white does not give perpetual check, he would be under mating attack.
Farewell.
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: perpetual check

Post by ZirconiumX »

According to Lichess, SF5 considers the game a draw after 53...c6.

Not that either side had any particular advantage over the other.

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: perpetual check

Post by bob »

In the case of Crafty, it sees a perpetual with draw score when it plays move 54 for white. This giving 10 seconds to make the move on a fairly slow 4 core box I have here. At move 54 it sees the draw instantly, however.

It did not spot it at move 53, which would make me question black's move 53. ... c6 as possibly allowing the perpetual.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: perpetual check

Post by zullil »

Look wrote:http://www.chesscorner.com/tutorial/basic/draw/draw.htm
http://www.chesskid.com/article/view/p- ... tual-check


AFAIK many engines including Stockfish (5) do not have proper perpetual check draw detection; They rely on Alpha Beta to do this, and that is late. Houdini 1.5a (that I have a hand on) does this much better.

Consider this computer game and tell when your engine detects draw.
[pgn]
[Event "?"]
[Site "?"]
[Result "1/2-1/2"]
[Date "2014.06.23"]
[Remark "3 0"]

1.d4 Nf6 2.c4 e5 3.dxe5 Ng4 4.Nc3 Bc5 5.e3 Nxe5 6.Nf3 Nxf3+ 7.Qxf3
O-O 8.Be2 Nc6 9.O-O Bd6 10.b3 Be5 11.Bb2 d6 12.Qd5 Re8 13.Qd2
Bf6 14.Bd3 b6 15.Rad1 Bb7 16.Be4 Qc8 17.f3 a5 18.Rfe1 Nb4 19.Bxb7
Qxb7 20.e4 Nc6 21.Nd5 Bxb2 22.Qxb2 Ne5 23.Qd4 Qc8 24.Rd2 Nc6
25.Qf2 f6 26.Red1 Ne5 27.Nc3 Re7 28.Qd4 Re8 29.Nb5 Qd7 30.Qd5+
Kh8 31.Nc3 Qc8 32.Qd4 Kg8 33.a3 Kh8 34.Qd5 Ng6 35.Qd3 Nf4 36.Qc2
Ne6 37.Nd5 Qd7 38.g3 Nc5 39.b4 axb4 40.axb4 Ne6 41.c5 bxc5 42.bxc5
Nxc5 43.Nxf6 gxf6 44.Qxc5 Re5 45.Rd5 Qf7 46.Qb5 Rxd5 47.exd5
Qe7 48.Qb2 Kg7 49.Kg2 Qf7 50.Rd2 Ra5 51.Rd4 h5 52.Qd2 Rc5 53.Qd3
c6 54.dxc6 Qa2+ 55.Kh3 Rc2 56.g4 Rxh2+ 57.Kg3 Qf2+ 58.Kf4 Rh3
59.Qe4 hxg4 60.Qe7+ Kg6 61.Qe8+ Kh6 62.Qf8+ Kg6 63.Qe8+ Kh6 64.Qf8+ Kg6 65.Qe8+
[/pgn]
If white does not give perpetual check, he would be under mating attack.
User avatar
Look
Posts: 364
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

Re: perpetual check

Post by Look »

ZirconiumX wrote:According to Lichess, SF5 considers the game a draw after 53...c6.

Not that either side had any particular advantage over the other.

Matthew:out
Consider this: White has slight advantage in a lot of lines, due to suspicious opening by black. Black threatens mating attack but leaves his king unsheltered.This leads to perpetual checks by white gaining draw.

Now if you have slight advantage or more and you are able to see perpetual checks by the opponent; you can avoid that draw and keep the advantage.

On the other hand if you are worse than opponent, you may try to create opportunity to give perpetual check and escape.
Farewell.