Author: Tord Romstad
Date: 13:25:53 03/24/04
Go up one level in this thread
On March 24, 2004 at 14:49:07, Uri Blass wrote: >I do not understand your arrays > >What is the reason that SmallestAttacker[0]=10? There isn't any good reason. But it also doesn't matter, as you will see if you read my code more carefully. The value of SmallestAttacker[0] is never used. I didn't write the arrays by hand, but wrote a small Lisp program who computed the entries (a technique I use very often, by the way). Therefore the entries have strange an counterintuitive values for some of the more pathological indices. Those entries of the arrays which are actually accessed by the running program have sensible values. >Based on Rebel attack table there should be no attackers in that case. > >Note that I also has similiar code to Crafty to calculate SEE but I decided to >have in my code before i++ when I translate it to your varaibles: > >If (i>1)&&(attackers[i]>attackers[i-2]+attacked) >{ > i++; > break; >} > >The logic is that there are cases when the rest of the pieces are simply not >relevant to decide about the value of SEE. > >If I have BxP QXB RxQ then it is clear that the value of see is one pawn and I >do not need to calculate more captures in the same square. > >I generalized this example to find the formula that I give here. >Note that I do not know if it helps Crafty in speed because the if command may >make things slower but I decided that for my slow SEE it is probably better to >check if I can generate a cut off based on previous captures in order not to >calculate the smallest attacker again. It is possible that I could do something similar, but there isn't really any point for me in doing so, because the SEE calculations are executed very rarely. In almost all cases, the value will be found in the small SEE cache, and no computation is necessary. Tord
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.