You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this great repo and it is really helpful!
I am running experiments on the breakthrough environment. My experiments need to save some intermediate states and try to reload them so I can reset the environment state to any point I want. I find that state serialization can help me for most of my needs, except for the player turn information. The state serialization seems to miss the player turn information so I cannot fully retrieve the state from it.
Do I miss anything or is there any better way to implement it?
The text was updated successfully, but these errors were encountered:
Oh wow.. I think you're right. That's a bug. That is very, very old code.. I believe it was written before we open-sourced OpenSpiel, might be more than 5 years old.
Breakthrough does not really need custom serialization. It probably was coded before we introduced the general serialization. We could just use the default one (which stores each game's parameters and full action history). This works very well for all the simple games because it's game-independent and works directly from the general API.
So there are two options:
Just remove the custom serialization methods (BreakthroughState::Serialize and BreakthroughGame::DeserializeState) which will adopt the default ones from State and Game
Keep the custom serialization but fix it so that the current player is included.
I could go either way, but actually, I slightly prefer Option 2. Because then we could also easily implement NewInitialState(const std::string& str) described here:
. We could refactor part of the the BreakthroughGame::DeserializeState function into a BreakthroughState::FromString function that would then also be called by NewInitialState(const std::string& str).
What do you think? Could you submit a PR fix? It'd be great to get credit for finding / fixing this but if you don't have time, we could also easily do it on our side.
Thanks for this great repo and it is really helpful!
I am running experiments on the breakthrough environment. My experiments need to save some intermediate states and try to reload them so I can reset the environment state to any point I want. I find that state serialization can help me for most of my needs, except for the player turn information. The state serialization seems to miss the player turn information so I cannot fully retrieve the state from it.
Do I miss anything or is there any better way to implement it?
The text was updated successfully, but these errors were encountered: