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

Alternative input representations to RGB #213

Closed
willis-richard opened this issue Feb 6, 2024 · 2 comments
Closed

Alternative input representations to RGB #213

willis-richard opened this issue Feb 6, 2024 · 2 comments

Comments

@willis-richard
Copy link
Contributor

Is it possible to get an alternative input representation? For example, rather than an RBG input, to have one-hot matrices encoding features such as square contains:

  • Nothing
  • Apple
  • Agent facing N
  • Agent facing S
  • etc

I am not familiar with lab2d so I wouldn't know how to do this.

@jzleibo
Copy link
Collaborator

jzleibo commented Feb 6, 2024

You would have to add custom observations in the Lua for whatever information you are looking to pull out. There are lots of examples of how to add custom observations in the existing substrates. You can follow those examples. Take a look at Allelopathic Harvest, I believe that one has quite a few implemented. You'll probably find this tutorial helpful: https://github.com/google-deepmind/meltingpot/blob/main/docs/substrate_tutorial/index.md

Btw, this is a meltingpot question, not a lab2d question. Also: if you do look into lab2d (the underlying engine) you may come across the "layers" representation, which will sound like what you want. But for meltingpot it will give misleading and wrong answers. Don't use it. The right way to get new custom observations is to add them in the same way we add all the custom observations.

@duenez
Copy link
Contributor

duenez commented Jun 24, 2024

Closing. Feel free to re-open if you have more questions.

@duenez duenez closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants