Fix random number generation in MiniMax Algorithm (#2636)

Co-authored-by: aitorfi <afidalgo@birt.eus>
This commit is contained in:
Aitor Fidalgo Sánchez 2021-10-16 08:14:46 +03:00 committed by GitHub
parent f30ec189ba
commit eaf5395272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,8 +97,8 @@ public class MiniMaxAlgorithm {
int[] randomScores = new int[(int) Math.pow(2, size)];
Random rand = new Random();
for (int a : randomScores) {
a = rand.nextInt(maxScore) + 1;
for (int i = 0; i < randomScores.length; i++) {
randomScores[i] = rand.nextInt(maxScore) + 1;
}
return randomScores;