Dear TSAIL group, Thanks for the easy-to-use and efficient library Tianshou for RL.
Recently, when I was learning the MARL example, I found when using MultiAgentPolicyManager and Collector to interact with the Tictactoe environment, the invalid actions are masked. However, I didn't see any code for action masking. I only found in the observe function in the Tictactoe environment returning observation with action_mask. I was wondering how to perform action mask in a custom environment and the tianshou package. Any example can be provided? Thanks!
You need to provide valid action mask as a part of the observation. Please take a look at implementation detail (especially env.step(act)'s signature) in TicTacToe env.
Dear TSAIL group, Thanks for the easy-to-use and efficient library Tianshou for RL. Recently, when I was learning the MARL example, I found when using MultiAgentPolicyManager and Collector to interact with the Tictactoe environment, the invalid actions are masked. However, I didn't see any code for action masking. I only found in the observe function in the Tictactoe environment returning observation with action_mask. I was wondering how to perform action mask in a custom environment and the tianshou package. Any example can be provided? Thanks!