Removed redundant pickWeightedAffinity function
This commit is contained in:
parent
dc5dc756cb
commit
3e4f10236d
@ -24,12 +24,3 @@ class Affinities:
|
|||||||
:return: List of weights
|
:return: List of weights
|
||||||
"""
|
"""
|
||||||
return [self.food, self.water, self.rest]
|
return [self.food, self.water, self.rest]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def pickWeightedAffinity(affinities: Affinities):
|
|
||||||
population = [Classifiers.FOOD, Classifiers.WATER, Classifiers.REST]
|
|
||||||
weights = affinities.getWeigths()
|
|
||||||
|
|
||||||
return random.choices(population, weights)[0]
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user