Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: potential checks

Author: Russell Reagan

Date: 21:44:18 04/15/03

Go up one level in this thread


Two things:

1. You could use a scheme like 0x88 that has a fast attack detection routine and
generating pseudo-legal moves is perfectly fine and still fast.

2. Yes there are programs that generate moves completely legal. You have to be
careful though because there are some tricky positions. Double check could case
problems. En passant captures can cause problems. You just have to think about
every possible situation if you're doing it this way.

Here is one example:

[D]8/5p2/8/r5PK/8/8/8/8 b - - 0 1

If black plays 1... f5, now we have the position:

[D]8/8/8/r4pPK/8/8/8/8 w - f6 0 2

White cannot make the en passant capture, because it would leave his king in
check. This is one example of subtle things you have to consider if you use a
100% legal move generator.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.