Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: History heurstic

Author: Volker Böhm

Date: 09:35:47 02/08/04

Go up one level in this thread


On February 08, 2004 at 10:18:21, Michel Langeveld wrote:

>On February 08, 2004 at 08:04:02, Volker Böhm wrote:
>
>>Hi,
>>
>>I have implemented a combination, I thik.
>>Question: Piece square tables are static tables build in your chess program?
>
>Yes, I use for this "static" tables.
>Nullmover has 3 kinds: opening, middlegame, endgame for pawn, pawn, bishop,
>knight, rook, queen, king . 3x7 = 21 lists. I have for black and white each an
>own list for speed issues. So I have 42 lists at start up.

can you give me an idear how that changes?

In opening you prefere knight and bishop moves before pawn moves before rook and
queen moves before king moves (casteling is an exception, allways first)?

Where does this change in middlegame?

In endgame its pawn-moves before king moves before piece moves?

>
>>If yes I do the following:
>
>>Build 9 move lists.
>
>What 9 movelists?
Usually you´ll generate each move to a list of moves. Ususally this list is
implemented as array of moves.

I have an array of arrays of moves with 9 elements:
Move MoveLists[9][MAXMOVES]
When generating moves I add every move to one of the 9 "lists". In list "0" I
put "good" hit moves, in list "1" "bad" hit moves, in list "2".."8" non-hit
moves.
The number 2..8 is selected by static tables.

When iterating through all moves I take the moves from MoveLists[0] first, then
from MoveLists[1], ...

I sort the moves in the list only if I get to this list.

if (!MoveList[CurrentMoveList].GetNextMove())
{
   CurrentMoveList++;
   MoveList[CurrentMoveList].Sort();
}

Thats how i mix static values with values from history-tables.

>
>>Put every move to one of this lists from the static piece
>>square table (example pawn moves to 7-th rank gets to the top list).
>>Sort every move in one bucket by history (from-to).

The word "bucket" is taken form "bucket-sort" the only sort algorithm with
complexity N. A "bucket" is another name for a movelist (i.e. MoveList[0] is a
"bucket", MoveList[1] is a "bucket", ...).

>
>I try to understand what you wrote but don't get it.
>Can you explain this a bit more?
>
>>Works best for me. Reduces amount of sorting time.
>>
>>Greetings Volker



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.