-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving and restoring the state of the world #48
Comments
The memories are all pure text so it should be relatively easy to save them however you like to save text files. Then you can just add them back into the memory. You would lose the embeddings this way, but that might not be too big of a deal. If your embedder is deterministic you would get the same embeddings of the same memories again anyway. @vezhnick @jagapiou anything else to think about for this? I'm realizing that we should probably provide a convenience function to save and load agents and game masters. We'll probably go ahead and do that soon. |
One potential problem is that although all components have standardized method names, the attributes are different (e.g., Conversation vs. Observation). We may need a save and a load methods for each component. Should everything be saved as JSON strings? |
Not the best answer for long-term storage/sharing (and we've not tested it), but have you tried |
pickle would probably work but I prefer JSON as it is human-readable. An agent and all its components seem to share the same AssociativeMemory instance, so I need to save it only once. Is this correct? |
JSON would work. Yes, all the components of a given agent share the same AssociativeMemory. Also, all the components of the GameMaster share an associative memory. Sub "scene" game masters might or might not use a different associative memory (e.g. for a conversation). |
What is the best way to save and restore the state of the world to avoid initializing all agents and the game master every time?
The text was updated successfully, but these errors were encountered: