Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: TSCP strength improvements

Author: Richard Pijl

Date: 13:26:57 01/10/04

Go up one level in this thread


On January 10, 2004 at 10:42:25, Michel Langeveld wrote:

>Just 2 improvements
>
>put the history updating one line lower so from:
>
>history[(int)gen_dat[i].m.b.from][(int)gen_dat[i].m.b.to] += depth;
>if (x >= beta)
>{
>   return beta;
>}
>
>into:
>
>if (x >= beta)
>{
>   history[(int)gen_dat[i].m.b.from][(int)gen_dat[i].m.b.to] += depth;
>   return beta;
>}
>
>----------------------------------
>
>Also it helps to make the is_check that it doesn't have to search the king
>anymore:
>
>BOOL in_check(int s)
>{
>	return attack(kings[s], s ^ 1);
>}
>
>and add into makemove:
>
>   //king has moved
>   if (piece[m.to] == KING)
>   {
>      kings[side] = m.to;
>   }
>
>and into restoremove:
>   //change location of king
>   if (piece[m.to] == KING)
>   {
>      kings[side] = m.from;
>   }
>
>Does someone knows other tricks?


Look closely at the function attack. Instead of scanning the board for pieces
that can attack the square, do something much smarter.
Richard.



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.