Position Legally Reachable?

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
mjlef
Posts: 1315
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Position Legally Reachable?

Post by mjlef » Tue Mar 21, 2017 3:05 pm

Has anyone written a program to prove or disprove a specific chess position is reachable following the rules? And of legal, what moves reach that position? If so, can you provide a link?

Vladimir Xern
Posts: 38
Joined: Wed Mar 08, 2006 7:30 pm

Re: Position Legally Reachable?

Post by Vladimir Xern » Tue Mar 21, 2017 5:34 pm

This is a body of chess problems known as proof games, if I'm not mistaken. One example of a proof game solver is Natch. These problems are usually searching for shortest proof games, however. It will give a position and a move count asking to reconstruct the position in the given number of moves. That's quite different from just legality checking, with no restriction on the number of moves. Natch would probably choke on something too involved, but it might be able to be modified to be more general purpose. There are other solvers like Euclide that may be worth looking into.

mjlef
Posts: 1315
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Re: Position Legally Reachable?

Post by mjlef » Wed Mar 22, 2017 1:54 am

Vladimir Xern wrote:This is a body of chess problems known as proof games, if I'm not mistaken. One example of a proof game solver is Natch. These problems are usually searching for shortest proof games, however. It will give a position and a move count asking to reconstruct the position in the given number of moves. That's quite different from just legality checking, with no restriction on the number of moves. Natch would probably choke on something too involved, but it might be able to be modified to be more general purpose. There are other solvers like Euclide that may be worth looking into.
Thanks, exactly what I was looking for!

User avatar
Nordlandia
Posts: 2034
Joined: Fri Sep 25, 2015 7:38 pm
Location: Sortland, Norway

Re: Position Legally Reachable?

Post by Nordlandia » Wed Mar 22, 2017 4:30 am

I downloaded Version 0.7 dating 2007, but encountered this problem.

Image

jpqy
Posts: 503
Joined: Thu Apr 24, 2008 7:31 am
Location: Belgium

Re: Position Legally Reachable?

Post by jpqy » Wed Mar 22, 2017 10:18 am


Lyudmil Tsvetkov
Posts: 6033
Joined: Tue Jun 12, 2012 10:41 am

Re: Position Legally Reachable?

Post by Lyudmil Tsvetkov » Wed Mar 22, 2017 11:57 am

I guess no one can write perfect code, as there are too many specifics.

I guess most GUIs would have problems even only defining what would be strictly legal.

[d]qnbqkb1r/pp1ppppp/8/8/8/8/PP1PPPPP/RNBQKBNR w KQk - 0 1

Fritz says this is legal, but how on Earth did the black c passer reach promotion square, as white Bc1 did not move with both b2 and d2 pawns on their home squares?

btw., what is the distinction between a legally reachable position and a legal position? are not all legally unreachable positions illegal per se?

brianr
Posts: 248
Joined: Thu Mar 09, 2006 2:01 pm

Re: Position Legally Reachable?

Post by brianr » Wed Mar 22, 2017 1:19 pm

I have not done every step, but with only one black knight the other could have been taken during the promotion and then shuffled with the queen to A8

Robert Pope
Posts: 392
Joined: Sat Mar 25, 2006 7:27 pm

Re: Position Legally Reachable?

Post by Robert Pope » Wed Mar 22, 2017 2:41 pm

But there is no way a black pawn could have gotten to rank 1 to promote without capturing something.

Lyudmil Tsvetkov
Posts: 6033
Joined: Tue Jun 12, 2012 10:41 am

Re: Position Legally Reachable?

Post by Lyudmil Tsvetkov » Wed Mar 22, 2017 2:53 pm

[d]rnbqkbnr/pppppppp/8/8/7P/3P3P/PPPP3P/RNBQKBNR w KQkq - 0 1

for Fritz Gui this is perfectly legal position.
also for SF.

SF says: -1.43. :(

Post Reply