-
Notifications
You must be signed in to change notification settings - Fork 97
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
fix: small bug in the pettingzoo wrapper related to legal action masking #432
Conversation
@AsadJeewa see the fixes here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks @jcformanek 👍
We should just benchmark to make sure it is working as expected.
Thanks for the quick fix @jcformanek |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and runs on my side without any errors
What?
The legal action mask in pettingzoo Pong was causing the madqn example to fail. This is because MADQN expects the legal action mask to be a vector of ones and zeros specifying for each action if it is a valid action or not. The pettingzoo wrapper was returning only a single one value for the legal action mask.
Also fixed problem in TicTacToe example. The MADQN executor needs a
select_action
method for single agents.Why?
The MADQN example on Pong was failing.
How?
Simple fix in the pettingzoo wrapper.
MADQN needs
select_action
method for single agents in sequential games like Tic Tac Toe.Extra
N/A