This commit is contained in:
Auric Vente
2024-07-22 09:43:54 -06:00
parent bb9606bb46
commit bc928dc8d6
2 changed files with 36 additions and 20 deletions

View File

@@ -148,7 +148,7 @@ class Ants:
weights = [1] * len(Ants.ants) # If all ages are zero, use equal weights
else:
weights = [
int(age / total_age * 1000) for age in ages
int((age / total_age) * 1000) for age in ages
] # Scale and cast to int
# Perform weighted random selection