The code is available to you in case you want to help on this site (download the file 07052016.zip). I use Visual Studio 2015, but I think the 2013 version should work well. I haven't yet checked whether it compiles fine with g++. Here are some other pointers:
=> By default Relative history heuristics are not used, since they actually increase the branching factor in my case, change this in file movepicker.h line #27
=> The default null move reduction depth is 2. A reduction depth of 3, even at higher depths, leads to a larger branching factor and node count (is it bug?)
=> If a hash move is found, it is given a bonus score in move ordering framework so that it will be put first in the list. I haven't researched on how Transposition Tables are used for move ordering, and I really don't get a lot of benefit from doing this, so I might be doing it wrong.
=> The search command is "search <depth> <hash_table_size>". The <hash_table_size> must be a small number (20 to 25), since <hash_table_size> of 24 almost 500MB on my system.
=> If you have a list of fen positions, separated by a newline, then you can use the command "testsearch <depth> <hash table size> <input filename (without spaces)> <output filename (without spaces)>" to search them all and write the output.
=> I would not swear that my program has no search bugs. I can swear it has a correct move generator and a symmetrical evaluation function.
Here is the output from the engine for the starting position:
Code: Select all
Yaka 0.0 x64 by Syed Fahad
search 10 20
info depth 1 score cp 38 nodes 1 nps 1000 tthits 0 pv b1a3
info depth 1 score cp 79 nodes 2 nps 2000 tthits 0 pv b1c3
info depth 1 score cp 88 nodes 9 nps 9000 tthits 0 pv e2e3
info depth 2 score cp 0 nodes 44 nps 44000 tthits 0 pv e2e3 e7e6
info depth 3 score cp 79 nodes 571 nps 571000 tthits 0 pv e2e3 e7e6 b1c3
info depth 4 score cp 0 nodes 2793 nps 2793000 tthits 7 pv e2e3 e7e6 b1c3 b8c6
info depth 4 score cp 53 nodes 2985 nps 2985000 tthits 26 pv b1c3 e7e6 e2e3 b8c6
info depth 5 score cp 62 nodes 17309 nps 5769000 tthits 627 pv b1c3 e7e6 e2e3 b8
c6 g1f3
info depth 5 score cp 128 nodes 21848 nps 1986000 tthits 951 pv e2e3 e7e6 b1c3 b
8c6 g1f3
info depth 6 score cp -98 nodes 62211 nps 4785000 tthits 3530 pv e2e3 e7e6 b1c3
b8c6 g1f3 g8f6
info depth 6 score cp -94 nodes 67700 nps 5207000 tthits 3790 pv e2e4 e7e6 d2d4
b8c6 b1c3 c6d4
info depth 6 score cp -73 nodes 101257 nps 1426000 tthits 7653 pv c2c3 e7e6 d2d4
b8c6 g1f3 c6d4
info depth 6 score cp -27 nodes 108020 nps 6751000 tthits 8171 pv d2d3 e7e6 g1f3
g8f6 b1c3 b8c6
info depth 7 score cp 80 nodes 239116 nps 5832000 tthits 23080 pv d2d3 e7e6 g1f3
g8f6 b1c3 b8c6 c1f4
info depth 7 score cp 87 nodes 443969 nps 1039000 tthits 51712 pv e2e4 e7e6 d2d4
b8c6 b1c3 c6d4 d1d4
info depth 7 score cp 146 nodes 510885 nps 3702000 tthits 63365 pv b1c3 e7e6 e2e
3 b8c6 g1f3 g8f6 d2d4
info depth 8 score cp -65 nodes 980585 nps 6809000 tthits 140344 pv b1c3 e7e6 e2
e3 b8c6 g1f3 g8f6 d2d4 c6d4
info depth 9 score cp 122 nodes 3962993 nps 1295000 tthits 513707 pv b1c3 e7e6 e
2e3 b8c6 g1f3 g8f6 d2d4 c6d4 d1d4
info depth 9 score cp 124 nodes 5014084 nps 2145000 tthits 652304 pv d2d4 e7e6 g
1f3 b8c6 b1c3 d7d5 c3d5
info depth 10 score cp -37 nodes 29175537 nps 3170000 tthits 2038167 pv d2d4 e7e
6 g1f3 b8c6 b1c3 d7d5 c3d5
bestmove d2d4 nodes 78014875
