Monday, October 11, 2010

Speed improvements on TinyChess

A week ago or so I post this log, searching to depth 10 from inital position:

11:20:31, Send: 1 57 0 43 Ngf3 
11:20:31, Send: 2 0 0 227 Ngf3 Ngf6
11:20:31, Send: 3 57 0 503 Ngf3 Ngf6 Nbc3
11:20:31, Send: 4 0 31 2208 Ngf3 Ngf6 Nbc3 Nbc6
11:20:31, Send: 5 27 31 4100 Ngf3 Ngf6 Nbc3 Nbc6 e3
11:20:31, Send: 6 13 141 12055 Nbc3 Nbc6 d4 Ngf6 e4 e6
11:20:31, Send: 7 29 500 39259 Nbc3 Nbc6 Ngf3 Ngf6 e3 d5 Bfd3
11:20:33, Send: 8 10 1734 137817 Nbc3 Ngf6 Ngf3 Nbc6 e3 d5 Bfb5 Bcd7
11:20:36, Send: 9 24 2438 246414 Nbc3 Ngf6 Ngf3 Nbc6 d4 d5 Bcf4 Bcf5 e3
11:20:45, Send: 10 31 9594 624118 Nbc3 Nbc6 Ngf3 e6 e4 Bfb4 Bfd3 Bbxc3 dxc3 Ngf6 



As you can see it took 14 seconds, well this weekend I had to lunch a bunch of processes at work, so meanwhile I had time to deal with speed, compare to this:



10:09:19, Send: 1 55 0 43 Ng1f3 
10:09:19, Send: 2 0 0 223 Ng1f3 Ng8f6 
10:09:19, Send: 3 55 0 473 Ng1f3 Ng8f6 Nb1c3 
10:09:19, Send: 4 0 15 2036 Ng1f3 Ng8f6 Nb1c3 Nb8c6 
10:09:19, Send: 5 20 0 3885 Ng1f3 Ng8f6 Nb1c3 Nb8c6 e3 
10:09:19, Send: 6 0 141 21194 Ng1f3 Nb8c6 Nb1c3 Ng8f6 e3 e5 
10:09:19, Send: 7 25 94 38454 Ng1f3 Nb8c6 Nb1c3 Ng8f6 e3 e5 Bf1d3 
10:09:20, Send: 8 0 609 123812 Ng1f3 Ng8f6 d4 d5 Nb1c3 Nb8c6 Bc1e3 Bc8f5 
10:09:21, Send: 9 17 1125 258263 Ng1f3 Ng8f6 d4 d5 Nb1c3 Nb8c6 e3 Nf6e4 Nc3b5 
10:09:23, Send: 10 15 2500 534927 Ng1f3 Ng8f6 d4 Nb8c6 Nb1c3 d5 e3 Nf6e4 Nc3xe4 d5xe4 


Now the same depth is achieved with only 4,5 seconds (the movements are different since many changes were done), this is 219.293 nodes per second. I'm very satisfied with the results, but this is not finish, the new GenerateAllMoves() totally based on bitboards is on the way, I expect a big performance increase. These were the changes:

  • Bitboards are generated gradually
  • Pieces are generated gradually
  • Evaluation was refactored 

No comments:

Post a Comment