Skip to content

Possible inconsistent tracking of fitness indicies #57

@phinate

Description

@phinate

I've been getting some strange behaviour here and there when trying to inspect the Pokemon with highest/lowest fitness etc. As an example, a CI run just failed on an indexing error when trying to look up teams with np.argmin(fitness), implying a difference in size between the teams and the fitness arrays at the time that's called.

So really, we need a better way to track fitness. We could potentially do what we've already thought about and make fitness an attribute of the Team class. We'd probably have to be careful to make sure this is only settable once, because all teams in the next generation are made as new instances of Team, so we don't want to accidentally overwrite a fitness by mistake instead of passing it to the correct new team.

Should be pretty easy to do!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions