From d998d816a13d1588892c9f3fc4814f619e546f16 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Wed, 29 Jun 2022 12:42:20 +0200 Subject: [PATCH] Updated humanPlayer.py to the new input mapping --- columbus/humanPlayer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/columbus/humanPlayer.py b/columbus/humanPlayer.py index 1ce0278..4420a2c 100644 --- a/columbus/humanPlayer.py +++ b/columbus/humanPlayer.py @@ -48,6 +48,7 @@ def playEnv(env): pos = pygame.mouse.get_pos() pos = (min(max((pos[0]-env.joystick_offset[0]-20)/60, 0), 1), min(max((pos[1]-env.joystick_offset[1]-20)/60, 0), 1)) + pos = pos[0]*2-1, pos[1]*2-1 obs, rew, done, info = env.step(np.array(pos, dtype=np.float32)) print('Reward: '+str(rew)) print('Score: '+str(info))