Skipping observation in multi agent env
See original GitHub issueDescribe your feature request
I am working on an implementation of the warewolf game using the rllib wrapper for gym multi agent envs. In this game there are wolves and villagers.
The game is divided into night and day phase. During day every agent can perform an action while during night only wolves can. Precisely, night observation should not be visible to villager agents. I have an observation which specify the current phase and would like to filter out night observation for the latter case. Is there a way to implement it easily?
What have I tried
I tried modifying the _process_observations function adding a line after line 403. Using a custom Preprocessor I am able to return None if the current observation should be discarded (given an agent id). Then if the processed observation is none just skip the step with:
if prep_obs is None:
continue
I don’t know if this implementation if conceptually correct or if there is another way to do it. Please let me know.
Edit 1
Applying the previous method yields:
{ValueError}The environment terminated for all agents, but we still don't have a last observation for agent villager_2 (policy vill_p). Please ensure that you include the last observations of all live agents when setting '__all__' done to True. Alternatively, set no_done_at_end=True to allow this.
In here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Moreover the second solution seems to work for the issue so we could consider the issue closed
Sorry for the late reply, I manage to solve the problem by running
Rather then :