I'm now working on the search and I've just implemented transposition tables, killer heuristic, history heuristic, quiescence search, iterative deepening, internal iterative deepening, null move pruning and some other small things.
Then I tried to implement aspiration search but with poor results. The fact is that the engine at some depth outputs stupid moves and the reason is because it evaluates equally all the legal moves (my evaluation function is still quite bad, but not so bad!) . Here is an example:
After 1. e4
This is the evaluation of all the black moves at depth 8:
Code: Select all
a7a5 -95
a7a6 -90
b7b5 -170
b7b6 -105
c7c5 -105
c7c6 -100
d7d5 -75
d7d6 -60
e7e5 -50
e7e6 -50
f7f5 -105
f7f6 -125
g7g5 -130
g7g6 -105
h7h5 -95
h7h6 -90
b8a6 -80
b8c6 -40
g8f6 -55
g8h6 -90
Code: Select all
a7a5 -10
a7a6 -10
b7b5 -10
b7b6 -10
c7c5 -10
c7c6 -10
d7d5 -10
d7d6 -10
e7e5 -10
e7e6 -10
f7f5 -10
f7f6 -10
g7g5 -10
g7g6 -10
h7h5 -10
h7h6 -10
b8a6 -10
b8c6 -10
g8f6 -10
g8h6 -10
I use an aspiration value of 50 (which I do not increment or decrement for now) and this is my implementation:
Code: Select all
while(...)
{
// aspiration search
// first estimate of val is calculated outside the loop
temp = searchRoot(depth, val - AspirationValue, val + AspirationValue, move, board);
if (temp <= val - AspirationValue || temp >= val + AspirationValue)
temp = searchRoot(depth, -Constants::Infinity, Constants::Infinity, move, board);
val = temp;
Could a small value for aspiration cause wrong moves? Shouldn't it just decrease performance?
Thanks all
P.S. sorry for my english, I'm italian