Skip to content
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

Support for dictionaries as observations? #115

Closed
CaptainTrojan opened this issue Oct 19, 2023 · 1 comment
Closed

Support for dictionaries as observations? #115

CaptainTrojan opened this issue Oct 19, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@CaptainTrojan
Copy link

Does LightZero provide support for complex observation types, such as dictionaries of multiple tensors? If not, where should the change be made? Right now I'm thinking:

  1. hope that all tensors in the dictionary are of the same type
  2. join them and flatten the result
  3. let LZero do its thing
  4. unflatten the flattened tensor merge inside a custom model implementation (override model class)
@puyuan1996
Copy link
Collaborator

In this PR39, we have put the emphasis on managing complex structured observations. The current main branch does not yet provide support for dict-type observations. However, PR39 provides an good reference to devise a specialized encoder for dictionary-type observations. Once developed, this encoder can replace the main backbone of the representation network (as indicated in common.py). Moreover, you might need to make minor adjustments in the data preprocessing code specifically in game_buffer_muzero.py. For guidance, you can refer to the modifications made in this PR39. By incorporating these changes, you can effectively manage more complex structured observation data.

Please note that the modifications in PR39 are intended for handling more intricate structured observations and are for reference only.

@puyuan1996 puyuan1996 added enhancement New feature or request good first issue Good for newcomers labels Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants