add repr for genome and gene;
add ipynb test for testing whether add node or add conn will not change the output for the network.
This commit is contained in:
@@ -39,3 +39,11 @@ class BaseNodeGene(BaseGene):
|
||||
),
|
||||
attrs,
|
||||
)
|
||||
|
||||
def repr(self, state, node, precision=2, idx_width=3, func_width=8):
|
||||
idx = node[0]
|
||||
|
||||
idx = int(idx)
|
||||
return "{}(idx={:<{idx_width}})".format(
|
||||
self.__class__.__name__, idx, idx_width=idx_width
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user