Author: Alessandro Damiani
Date: 04:08:13 10/25/02
Go up one level in this thread
>>The implementation of generating moves in chunks is easily done by encapsulating
>>all work in a method that returns the next move:
>>
>> Move nextMove(int ply, ...)
>>
>>The value 0 is returned, if there is no move anymore.
>>
>>The method nextMove() has a state for each ply: in which generation phase it
>>currently is. For instance, our move ordering is
>>
>> 1. hashmove
>> 2. winning captures
>> 3. killer 1
>> 4. killer 2
>> 5. equal captures
>> 6. non captures
>> 7. losing captures
>>
>>We define the following phases:
>>
>> PHASE_HASHMOVE 0
>> PHASE_GENCAPTURES 1
>> PHASE_POSCAPTURES 2
>> PHASE_KILLER_1 3
>> PHASE_KILLER_2 4
>> PHASE_EQUALCAPTURES 5
>> PHASE_GENNONCAPTURES 6
>> PHASE_NONCAPTURES 7
>> PHASE_NEGCAPTURES 8
>
>Today I also have phases nit clearly less phases than you.
>
As I stated above, this is just an example. I have got more phases.
Just to be clear: only phase 1 and phase 6 generate moves (in this example).
>My sort function that choose the next move does not consider hash moves because
>when starting with the hash move is done in different place in the program:
>
>switch (phase[ply])
> {
> case pvnode:phase[ply]=goodcapture;
>/* break in case that you find a move*/
>...
>
> case goodcapture:
>/*break in case that you find a move*/
>case firstkillermove:phase[ply]=secondkillermove;
>/*phase[ply] never gets the value firstkillermove but gets into that loop when
>phase[ply]=goodcapture and it dis not find a good capture in the remaining
>moves*/
>
>/*break in case that you find a move*/
>case second killermove:phase[ply]=historyphase
>/*break in case that you find a move*/
>
I don't understand what you want to say. You talk about sorting. I do select
moves and do not sort them. This is done in phases 2 and 5 in the _example_
above.
Alessandro
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.