mal-lang / mal-simulator

Apache License 2.0
2 stars 1 forks source link

Action mask is a tuple of arrays #53

Closed kasanari closed 2 months ago

kasanari commented 2 months ago

This is the format Space.sample expects.

andrewbwm commented 2 months ago

This is a fix for #7, correct?

kasanari commented 2 months ago

That is true. I forgot I had made the issue.

mrkickling commented 2 months ago

Should be straight forward to merge this right?

EDIT:

Would prefer shorter line lenght, e.g.:


            infos[agent] = {
                "action_mask": (
                    np.array(
                        [can_wait[agent_type], can_act], dtype=np.int8), 
                    np.array(
                        available_actions, dtype=np.int8)
                )
            }
andrewbwm commented 2 months ago

Was squash-merged in 458edc890dbd2fd9602a0c76e12c9f2bc2273637.