google-deepmind / pysc2

StarCraft II Learning Environment
Apache License 2.0
7.96k stars 1.15k forks source link

Revert the environment one step back #325

Closed opocaj92 closed 1 year ago

opocaj92 commented 3 years ago

Hi everyone, I would like to know if there is any way to revert the environment one step back (kind-of undoing the last step() call in a standard Gym-like environment, or undoing the last action performed). I don't think that just using the copy library from Python to keep the previous environment setting would actually work, as the backend is not affected by this... Thanks in advance for any help.

dimikout3 commented 3 years ago

Hi, I am also interested in a similar approach. I have found out that neither the copy() or the deepcopy() functions will do the job, because sc2 is running on a thread. Does anyone else have any ideas ?

tewalds commented 1 year ago

Unfortunately this is not supported. The way to do it would be to quick-save and quick-load, or load a replay and continue from there. Unfortunately that isn't supported by the api.