Computer Chess Club Archives


Search

Terms

Messages

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

Author: Robert Hyatt

Date: 19:54:33 08/26/04

Go up one level in this thread


On August 26, 2004 at 22:48:52, Pham Hong Nguyen wrote:

>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.
>>
>>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.
>
>
>If you try it, you may change your mind. For chess, imagination may be quite
>different from practice :)
>
>The gain depends much on your board representation. You may notice that the
>bitboard could generate the capture moves faster than the non-capture ones. That
>is why Crafty generates moves in phases in hope to avoid genarating non-capture
>moves. But if your board is an array style (like mine), where both capture and
>non-capture moves could be generated by the same speed and the combination of
>them can save time in many cases, phase generation gains almost nothing (or
>negative thing).
>
>BTW, you are talking about a gain of 0-3% (for any kinds of board
>representations), it is not very significant gain as you wish.
>
>Pham

The only reason I do it as I do is it is easy to generate captures by
themselves, and that has two advantages.

(1) in the q-search I don't waste time generating non-captures.

(2) in the capture part of the regular search I avoid the generation cost for
non captures, plus I don't have to skip over non-captures when sorting the
captures.  It is a win.  Not huge, not insignificant either...


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