The solution is simple: in Graph.paths, instead of having one key per
action, the keys are just tuples containing all the actions. Then in the
swapping we extend the children attribute of the last node instead of
looping over the actions and appending.
…deepcopies
The solution is simple: in Graph.paths, instead of having one key per action, the keys are just tuples containing all the actions. Then in the swapping we extend the children attribute of the last node instead of looping over the actions and appending.