Changes

Jump to: navigation, search

Perft

366 bytes removed, 04:39, 25 April 2020
no edit summary
</pre>
To speed up calculating==Bulk-counting==Instead of counting nodes at "depth 0", programs may consider avoiding making and unmaking legal move generators can take advantage of the fact that the number of moves generated at "depth 1" represents the accurate perft value for that branch. Therefore they can skip the last depth (depth == 1[[Make Move|makemove]]/[[Unmake Move|undomove]], before which gives much faster results and is a better indicator of the brand endingraw move generator speed (versus move generator + make/unmake). That may save However, this can cause some confusion when comparing perft values. Assuming the above code used a lot because leave nodes are always much more than legal move generator, it would only need the middle nodes.following modification:
<pre>
<span id="Bulk"></span>
=Bulk-counting=
Instead of counting nodes at "depth 0", legal move generators can take advantage of the fact that the number of moves generated at "depth 1" represents the accurate perft value for that branch. Therefore they can skip the last [[Make Move|makemove]]/[[Unmake Move|undomove]], which gives much faster results and is a better indicator of the raw move generator speed (versus move generator + make/unmake). However, this can cause some confusion when comparing perft values. Assuming the above code used a legal move generator, it would only need the following modification:
<pre>
...
//__/* DELETE: if (depth == 0) return 1; */__//
 
n_moves = GenerateMoves(move_list);
 
__if (depth == 1) return n_moves;__
...
</pre>
=Hashing=

Navigation menu