neat.STree.path_to_root

STree.path_to_root(node)[source]

Return the path from a given node to the root

Parameters:

node: neat.SNode

Returns:

List of nodes from node to root. First node is the input node and last node is the root

Return type:

list of neat.SNode