[Proposal] Ensure seed_test
checks for action masks in both observation and info dict
#1117
Closed
1 task done
Labels
enhancement
New feature or request
Proposal
In line 50-51 of
pettingzoo.test.seed_test
(see link), the current method of getting an action mask may not be 100% consistent with documentation.The documentation says that action masking can be stored in either
mask = observation["action_mask"]
ormask = info["action_mask"]
, but the above seed test only checks for masks under the former. It may be best to check for the action mask in both places. Thus, I propose we change lines 50-51 to the following, which checks for a mask in both theobservation
andinfo
dicts:The code comes directly from the pettingzoo documentation on AEC API
Motivation
The above feature will help the
seed_test
's action masking feature be more in line with the documentation since it is clearly stated in the documentation:Otherwise, there should be more emphasis on doing things one way or the other.
Pitch
Discuss the viability of the feature and integrate into the codebase
Alternatives
I guess we can tell everyone to simply stick with putting action masks in one place only...
Additional context
I was putting together a custom pettingzoo environment but it kept failing the seed test. Upon further inspection, realized that the action mask was not being used since I was storing them within
info
, which I find to be cleaner.Checklist
The text was updated successfully, but these errors were encountered: