Computer Chess Club Archives


Search

Terms

Messages

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

Author: Pham Hong Nguyen

Date: 20:26:19 08/26/04

Go up one level in this thread


On August 26, 2004 at 22:54:33, Robert Hyatt wrote:

>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 still think that your phrase generator gains mainly for the first move only.
That is the hash move and if it gets a cutoff, you can avoid all generation. But
separating between caputers and non-capters will gain very little, IMO. You can
win some where, but you also can lose in other places.




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.