Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fast way to sort moves in movelist ?

Author: Dan Newman

Date: 02:26:15 10/16/99

Go up one level in this thread


On October 15, 1999 at 20:34:25, leonid wrote:

>On October 15, 1999 at 13:56:07, Jari Huikari wrote:
>
>>On October 15, 1999 at 12:46:57, Antonio Dieguez wrote:
>>
>>>why did you say N passes over N moves? a pass is a round or a loop right? if I
>>>understood what Jari told, there are only 7, or not? (what a coincidence I do 7
>>>rounds too!)
>>
>>My program is very different from the most of other programs. I have only
>>written a primitive program, in my way. And done changes which have made
>>_it_ better, but are done in a different (and more effective) way in usual
>>programs. :-) In _my _program_ my movesorting doesn't make anything slower.
>>(I generate _all_ the legal moves before I try any. It may be one difference.)
>>
>>					Jari
>
>Are you saying that usually people find and do movesorting before recognizing
>what move is legal? I am asking this question not because I contest what you
>have said but for simple curiosity.
>
>Regards,
>Leonid.

Many of us generate "pseudo-legal" moves, sort them, and then filter out
the illegal ones as we try them.  (Pseudo-legal moves are moves that
would be legal if we were allowed to put the king en prise.)  Testing
a move to see if it leaves the king en prise is fairly expensive, and
since we are probably only going to try an average of say 6 out of the
36 or so moves that we generate (due to alpha-beta cutoffs), we delay
testing for legality and so avoid doing a lot of work.

Also, many do as I do and generate the captures and promotions separately
and try them before trying the rest of the moves.

-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.