Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Move Generation

Author: Scott Gasch

Date: 22:20:26 02/23/05

Go up one level in this thread


On February 23, 2005 at 13:47:30, Tord Romstad wrote:

>On February 22, 2005 at 20:28:21, Scott Gasch wrote:
>
>>First of all, why even decide whether a move is checking until you play it?  (I
>>ask that rhetorically because I do flag moves as checking or not before they are
>>played).  But it seems reasonable to me to not know whether the move is check
>>(or legal, for that matter) until you send it to MakeMove.  Unless, for some
>>reason, you want the check flag information before the move is made (to decide
>>pruning?  to score the move?) then don't bother with this stuff.
>
>Pruning is indeed the most important thing.  I never want to prune a check.
>Knowing whether a move is a check before you make it is also useful if you
>want to use ETC or related techniques.
>
>>If, however, you decide you do want to know if a move is checking before you
>>play it (as you generate it?  when you select it in search?) then Uri's advice
>>is good.  However it's not fast.  It is the fastest way I know to tell if a move
>>checks the king but it's still about 8% of my program's runtime overhead.
>
>8 percent?  Are you sure?  On my profiler outputs, the is_check() and is_legal()
>functions are so far down the list that I have never even noticed them.
>Legality
>checking and check detection (before or after the move is made) is virtually
>free.  If this really consumes 8% of your CPU time, your implementation
>must be inefficient, or the rest of your program must be incredibly fast.
>
>Tord

I'm positive.  The reason it is so high, I suspect, is that I am tagging moves
in qsearch as checking... which is a criteria for whether they are searched or
not.  This is a big overhead.  I don't know anything about your engine but I'd
be interested in knowing if you are tagging qsearch moves as you generate them
and still see such a low overhead from your check detection code?

Scott



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.