Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: I don't use illegal moves EVER

Author: Dan Newman

Date: 13:54:36 11/24/99

Go up one level in this thread


On November 24, 1999 at 09:47:30, blass uri wrote:

>On November 24, 1999 at 08:30:06, Jari Huikari wrote:
>
>>On November 22, 1999 at 19:05:13, leonid wrote:
>>
>>>Was puzzled few times by finding that many logics use illegal moves and
>>>succesfully. Until now I used this kind of moves only in the ply zero. Expect to
>>>rewrite my logic completelly with usage of illegal moves in every ply.
>>
>>This doesn't answer to your questions, but I decided to mention it anyway.
>>Am I alone or does someone else also generate only legal moves?
>>
>>					Jari
>
>I remember karinsdad said that he decided to generate only legal moves because
>he cannot use ideas like the single reply extension if he generate illegal
>moves.

You can still use the single-reply extension.  One way is to do as Bob does
in Crafty and use a special check evasions generator that is only called when
the side to move is in check and generates only legal moves.  The other way
(that I use) is to count the number of legal moves and (if I don't get a
cutoff) use that count to determine if I need to do a one-reply extension.
This does cause a little extra work though...

>
>I have another question.
>Did people try to compare between the 2 options before deciding to generate
>illegal moves and if the answer is positive what was the result of the
>comparison.

The first chess program I wrote (about 4 years ago) generated only legal
moves.  Initially 80% of the cpu time was taken by the in-check detection
code.  I think I got that cut down to about 50%.  That program is much
slower than my current programs.  So I suspect that it's a win to do
pseudo-legal move generation.  Really all you are doing is a sort of
lazy calculation.  You are just delaying some of the work in the hope
that you won't have to do it at all...and quite often that's the case.

>
>Is the legal move generator slower in solving test positions(assuming no special
>extensions like single reply extension) and how much slower?
>
>Uri

I think my program that does legal moves got about 40 knps the last time
I checked.  My current (bitboard) program gets about 180 knps on WAC.
(Both on a P6/200.)  But there are a lot of other differences between
these two programs...

-Dan.



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.