Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Extending Checks

Author: Stuart Cracraft

Date: 12:08:20 09/11/04

Go up one level in this thread


On September 11, 2004 at 11:37:23, Harald Lüßen wrote:

>On September 11, 2004 at 00:05:06, Rick Bischoff wrote:
>
>>You already count your legal moves through the loop-- that is how you
>>determine mates, right?
>
>No, not in my engine. I detect the mate after I tried all
>moves. When there was no legal move and I am in check I return
>the mate_score - ply. (Or draw score when not in check.)

I do it this way.

>
>And I do not count or even generate all moves before I try
>the first one. Instead I start with the hash move, then
>generate, pre-sort and try good capture moves, then killers
>then normal moves and the rest. If there is a beta cut at the

I generate all moves first and then check the hash move's presence
in there, sort it to the top, then search the first move.

I tried not generating all moves first, just making the hash move
as long as my legal-move checker routine for a single move said
it was okay on the current board and I experienced a slowdown.
I need to do more work in this area since avoiding the movegen
is a no-brainer and should result in a speedup, meaning I might
have another hash move bug, possibly fixed by some other work I'm
doing.

>first legal move, how can I know that this was the only legal
>move? Should I really try to generate and legal-test all

No way.Have to gen all moves and make/unmake/checkifincheck
each unless there is some really different software floating about.
Ah just had a thought. See next.

>other moves in this case (until one other is found) to detect
>this situation and then do the beta cut move again, one ply
>extended? May be it will no longer cause a fail high then.
>This is why my single move extension is disabled.

It certainly would make sense for me to at least try at the top,
after the initial movegen, to do make/unmake/checkifincheck for
all moves and simply break out of the loop if >1 are found legal,
prior to all other activity. It should go quickly, maybe a few
make/unmake's at most. That is the way to do it and keep it cheap.
Break out of the loop that is doing the make/unmake after you
know it is not the only legal move!!!!!

>
>Harald

Stuart



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.