Fix random number generation in MiniMax Algorithm (#2636)
Co-authored-by: aitorfi <afidalgo@birt.eus>
This commit is contained in:
parent
f30ec189ba
commit
eaf5395272
@ -97,8 +97,8 @@ public class MiniMaxAlgorithm {
|
|||||||
int[] randomScores = new int[(int) Math.pow(2, size)];
|
int[] randomScores = new int[(int) Math.pow(2, size)];
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
|
|
||||||
for (int a : randomScores) {
|
for (int i = 0; i < randomScores.length; i++) {
|
||||||
a = rand.nextInt(maxScore) + 1;
|
randomScores[i] = rand.nextInt(maxScore) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return randomScores;
|
return randomScores;
|
||||||
|
Loading…
Reference in New Issue
Block a user