Thanks for your question. While the API doesn't directly have a function to undo an action, there's a quick work-around for undo-like behavior. Since the simulations are deterministic for a given task_id/variation_id, you can simply restart a new game with the same configuration, and rerun all of the actions the agent has taken (minus the most recent one), and this should mirror an 'undo' behavior.
I've used a similar method for pathcrawling (both in ScienceWorld and TextWorldExpress), and it works well. If you run into any issues, just let us know.
Hi @xxmlala
Thanks for your question. While the API doesn't directly have a function to undo an action, there's a quick work-around for undo-like behavior. Since the simulations are deterministic for a given task_id/variation_id, you can simply restart a new game with the same configuration, and rerun all of the actions the agent has taken (minus the most recent one), and this should mirror an 'undo' behavior.
I've used a similar method for pathcrawling (both in ScienceWorld and TextWorldExpress), and it works well. If you run into any issues, just let us know.
best wishes, Peter