Farama-Foundation / Minigrid

Simple and easily configurable grid world environments for reinforcement learning
https://minigrid.farama.org/
Other
2.09k stars 604 forks source link

[Question] Question title #367

Closed BenSturgeon closed 11 months ago

BenSturgeon commented 1 year ago

Hello!

I am trying to set up a research and experimentation framework that tries to count the number of possible future states available in an environment given some state s.

However, I am finding it difficult to explore deeper in the state tree without being able to save and load states. Is there any way around this, or a way to implement save and load functionality here? I find the difficulty comes when trying to pickle pygame surface objects as they are not serializable.

Do you have any recommendations?

pseudo-rnd-thoughts commented 1 year ago

If you are not rendering the environment then you should be able to pickle the environment. Otherwise, we can look to fix that

BenSturgeon commented 1 year ago

You're right, when the environment isn't rendered then there is no problem.

However, it would be very helpful to be able to render the environment for visualisation purposes.

How viable do you think it would be to get around the difficulties of serialising the pygame objects so that they could be copied, or finding some other way to copy them?

pseudo-rnd-thoughts commented 1 year ago

This is a pygame issue rather than a minigrid issue As pygame uses c++ this might be more difficult

BolunDai0216 commented 1 year ago

You may be able to get around it by saving self.grid and storing the agent state.

BolunDai0216 commented 11 months ago

Closed due to inactivity, feel free to reopen this issue if the problem persists