Skip to content

Commit

Permalink
Randomize moves before sorting 2.5 times more often.
Browse files Browse the repository at this point in the history
  • Loading branch information
bagaturchess committed May 26, 2023
1 parent 4560c4d commit 2b615c0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,8 @@ public void sort() {
final int start_index = nextToMove[currentPly];
final int end_index = nextToGenerate[currentPly] - 1;

//Randomize each 3 sortings
//In order to increase the effect of nondeterminism, ensure first ordering is randomized.
if (counter_sorting == 0 || counter_sorting % 5 == 0) {
if (counter_sorting == 0 || counter_sorting % 2 == 0) {

randomize(moveScores, moves, start_index, end_index);
}
Expand Down

0 comments on commit 2b615c0

Please sign in to comment.