Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Move Ordering

Author: Gerd Isenberg

Date: 16:46:18 12/23/02

Go up one level in this thread


On December 23, 2002 at 18:08:15, Martin Bauer wrote:

>Hello,
>
>i have a queastion about move ordering. There are many sources with move
>ordering heuristics like killer heuristic, history and so on...
>
>But I found no description _how_ to program the move ordering in an _efficient_
>way. In my own enginge I use an integer value together with the move and put it
>on the move stack. Moves that should be searched first, become a high value and
>the less important moves a low one. Then there is a function named
>"NextBestMove" that that looks for the highest value at the actual searchdepth
>on the movestack. Therefore it must look at all possible moves in the actual
>position. When the best move is found, the value is set to -Matescore, so it can
>not get the best move the next time the function is called.

Hi Martin,

thats fine, but the tagged moves stil remain in the move stack and get compared
in each "NextBestMove" again and again, all the moves already played.
I suggest a second move stack index (NextGet in opposition to NextPush) that is
incremented after a move is found. If the best found index is greater than this
index, simply swap moveStack[NextGet] with moveStack[BestIdx] and return
moveStack[NextGet++] in any case.

Gerd

>
>This algorithm must have a look at all possible moves in the position at the
>actual depth, even if the frist 10 best moves are searched. This look not
>efficient to me, because it is an O(n) algorithm in reading the best move and
>O(1) in storing the best move.
>
>Are there any common better technics for moveordering, that are not to complex?
>Are there any papers or sources in the Web?
>
>How do it the "good engines" like crafty & Co?
>
>Regards
>
>Martin



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.