semitable / lb-foraging

Level-based Foraging (LBF): A multi-agent environment for RL
MIT License
157 stars 64 forks source link

implement alternative 2D grid observation space #2

Closed LukasSchaefer closed 3 years ago

LukasSchaefer commented 3 years ago

Implemented new observation scheme (set via environment argument) which defines a 2D observation grid centered around the agent.

Naming of environments with keyword -grid combined with -Xs to define to sight of agents. E.g. Foraging-grid-2s-8x8-2p-2f-v2 for agents to observe a 5x5 grid centered around the agent.

Each observed cell contains of 5 values. The first 4 encode the entity (out-of-bounds, empty cell, food, agent) and the last value encodes the level (-1 for OOB/ emtpy and level for food/ agent).

semitable commented 3 years ago

As per our discussion, we should put the information in different channels. E.g. one channel for agent levels, one channel for food, and one (0s or 1s) for impassable/out of bounds.