Skip to content

Commit

Permalink
DefaultGenome.__str__ now includes key and fitness in output string.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeReclaimers committed Aug 1, 2017
1 parent 99da17d commit babb5a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neat/genome.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def size(self):
return len(self.nodes), num_enabled_connections

def __str__(self):
s = "Nodes:"
s = "Key: {0}\nFitness: {1}\nNodes:".format(self.key, self.fitness)
for k, ng in iteritems(self.nodes):
s += "\n\t{0} {1!s}".format(k, ng)
s += "\nConnections:"
Expand Down

0 comments on commit babb5a6

Please sign in to comment.