About depth-first traversal with pylean
Opened this issue · 2 comments
When I used pylean in depth-first traversal, because I had to do some backtracking, it seemed like there was only reset, which meant I had to start from scratch every time I didn't find the right step.I would like to ask if you have implemented the function of backtracking in pylean to go back to the previous step when this step fails, such as setting a parameter n to go back to the n step, instead of starting from the beginning each time.
step()
function takes action
as an argument which is a tuple of elements: the first element is a state_id
and the second element is an action itself. So, if you want to go back to the previous step you just need to provide the state_id
of that step.
state_id
can be found in the output of the step()
function: it returns tuple of 4 elements, the first element is also a tuple where the first element is state_id
and the second is a state itself.