Replies: 2 comments
-
Another solution would be to flatten all actions for all entities and mask accordingly, but this leaves the arrays very sparse and feels wasteful. "move" -> up, down, left, right, rotate left, rotate right, move forward |
Beta Was this translation helpful? Give feedback.
-
This strikes me as the correct solution. The |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In the
Environment
class we are asked to return anObservation
object which has the following structure:In particular there is the action mask
action_masks: Mapping[str, ActionMask]
which provides a map of "action name" -> "action mask"The ActionMask itself defines a 2d array defining which actor entity (row) can perform which action (column).
I think there is a case where this is not compatible with certain environments.
If an environment has a number of actor entities which define actions with the name "move", but those entities have different definitions under the hood. For example: one entity can move up,down,left,right.... but another can only rotate left, rotate right and move forwards.
Will we need to prefix all actions wtih some sort of entity_type, so that actions with the same names do not conflict if their inputs are different?
Something like this:
entity1_move -> up, down, left, right
entity2_move -> rotate left, rotate right, move forward
This feels like a hacky solution, so want to open this question to more ideas.
Beta Was this translation helpful? Give feedback.
All reactions