How to move an agent in desired direction


Take MsPacman-v0 for example. I know we can use env.action_space.sample() to move agent in random direction. But how can I move the agent in the directions as I desired?


you will need to figure out the action id -> joystick direction mapping (consult

and pass the desired action id to env.step(action_id)