Dec 27, 2006

[Other] So how smart is it?

Here are a few tests I made. All searches are made at 5 ply search depth.

Expected line:
Ra1
Qxa1
Rxa1
Kb7
Rb1
Evaluation: 500 (equal to rook up)
Time: 1391 ms
Fen: k7/8/8/8/q7/8/8/1R3R1K w - - 0 1


Expected line:
Nh6
Kh8
Qg8
Rxg8
Nf7
Evaluation: 100000 (mate)
Time: 2422 ms
Fen: 5rk1/5Npp/8/3Q4/8/8/8/7K w - - 0 1


Expected line:
a3
Kd2
a2
Ke1
a1=Q
Evaluation: 900 (equal to queen up)
Time: 32 ms
Fen: 2k5/8/8/8/p7/8/8/4K3 b - - 0 1


Expected line:
0-0-0
Kg1
Ra1
Kh1
0-0-0
Evaluation: 100004 (mate)
Time: 156 ms
Fen: 8/8/8/8/8/8/R7/R3K2k w Q - 0 1


Expected line:
Ke3
Qxa4
Kf2
Qb3
Kg1
Evaluation: -900 (equal to queen down)
Time: 250 ms
Fen: 7k/8/8/8/R2K3q/8/8/8 w - - 0 1


All in all the engine is doing well. It picked the best move for all five positions. As you can see the evaluation is positive even if it is black that is ahead in the third example. This is because black is the side calculating and the numbers are therefore switched so black sees positive numbers as a good evaluation.

In the fifth example white is calculating and realizes he will be down a queen, therefore the number is negative.

In the fourth example you can see traces of the problem I had with the principal variation extraction. The first move is correct (long castle) which mates the black king, but since it was told to search to ply 5 it does so and you get traces of the search in the principal variation. This will be fixed one way or another (probably by stopping the calculation when a mate is found, this method is called killer moves).

Positions with a queen let loose on an open board takes longer to calculate, while a position with only a pawn the calculation is extremely fast. This is of course because of all the possibilites the queen has to choose from. We can shorten the time with better move ordering (among other things). Had we for example calculated checks first in the second position, the time would have been much shorter. Since the first move checked would have been a knight move, and we would have quickly found the mate. And then all the unnessescary queen moves would have been cutoff.

No comments: