Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How much better is phased move generation/ordering?

Author: Gerd Isenberg

Date: 14:42:31 08/26/04

Go up one level in this thread


On August 26, 2004 at 16:25:07, Lance Perkins wrote:

>After seeing the posted NextMove code, I wonder how much better this is than
>simply generating all the moves and then sorting them in one go.

It depends on the design of the engine.

In general it is a good idea to delay as much as possible and hope for an early
cut. Beside hash or pv move, you often cut with winning captures, only
generating them seems to make sense. Probably same for generating/trying
killers.

With classical board presentations, traversing the board in one direction with a
sliding piece, it might be better, to generate quite moves on the fly into a
separte move list, while looking for capture targets. Of course there is some
waste of memory write cycles if generating all and early cutoff.

Anyway, after hash/goodCaptures/Killers/EvalHints it might be the best to
generate all remaining moves (captures, checks, winning double attacks) and to
assign history/psq or whatever scores to them to pick the next best.

With my current finite state movegen i delay/skip generating piece
captures/moves to squares attacked by opposite pawns or other negative SEE
values.

With bitboards one may even keep legal move target bitboards, piece or direction
wise. So you have an idea of the number of moves or stalemate without
serialising moves into a list.


>
>This code is a little to complex and tool long for my liking, but if it offers a
>very significant gain, maybe I should give it a second look.
>
>I can immagine that when one gets a cutoff, the rest of the moves don't have to
>be generated (captures vs non-captures). However, in leaf nodes, one is very
>likely to generated all the moves anyway.

Leaf nodes, if not hash hits or repetitions, are eval cut nodes or stand pat
nodes with no or only (bad) pruned captures because of eval+gain < alfa. The
first one needs no generated moves at all the second only captures. Pruning
might already considered during movegen.

Simply use some counters and do some statistics.

Gerd

>
>Has anyone compared these?



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.