Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: History heuristic

Author: Uri Blass

Date: 02:17:48 03/18/04

Go up one level in this thread


On March 18, 2004 at 04:32:12, Sergei S. Markoff wrote:

>Hello!
>
>First try to index history depending of piece that moves. It's a "free"
>improvement. I don't know why Crafty not doing it. See me code (it complicated a
>little, but works ok):
>
>#define KING				1
>#define KNIGHT				2
>#define PAWN				3
>#define ROOK				5
>#define BISHOP				6
>#define QUEEN				7
>
>const int history_group[8]={0,0,0,1,0,2,1,3};

I see king knight in the same group.
pawn bishop in the same group
I understand that the logic is that moves of this pieces that are not captures
by pawns have to be different and captures by pawns are not relevant because
they are always considered as good captures(there are cases when they are bad
and it may be better to escape with the queen if the opponent threats it but
Crafty does not generate escapes first)

>int history[4][64*64*2];
>
><...>
>
>void History(int Depth,MOVE mv)
>{
> int index=((mv&4095)<<1)|SideToMove;
> int index1=history_group[M_PIECE(mv)];
>
> history[index1][index]+=Depth*Depth;
>
><...>

I understand
index includes from,to,side_to_move
when index1 is the piece type.

I will probably try it after I do some changes in my code to do it more easy to
understand.

Uri



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.