diff --git a/minatar/environments/asterix.py b/minatar/environments/asterix.py index cbf5473..3551de6 100644 --- a/minatar/environments/asterix.py +++ b/minatar/environments/asterix.py @@ -121,7 +121,7 @@ def difficulty_ramp(self): # Process the game-state into the 10x10xn state provided to the agent and return def state(self): - state = np.zeros((10,10,len(self.channels))) + state = np.zeros((10,10,len(self.channels)),dtype=bool) state[self.player_y,self.player_x,self.channels['player']] = 1 for x in self.entities: if(x is not None): diff --git a/minatar/environments/breakout.py b/minatar/environments/breakout.py index 48d28b5..c9a089e 100644 --- a/minatar/environments/breakout.py +++ b/minatar/environments/breakout.py @@ -101,7 +101,7 @@ def difficulty_ramp(self): # Process the game-state into the 10x10xn state provided to the agent and return def state(self): - state = np.zeros((10,10,len(self.channels))) + state = np.zeros((10,10,len(self.channels)),dtype=bool) state[self.ball_y,self.ball_x,self.channels['ball']] = 1 state[9,self.pos, self.channels['paddle']] = 1 state[self.last_y,self.last_x,self.channels['trail']] = 1 diff --git a/minatar/environments/freeway.py b/minatar/environments/freeway.py index 4ae7638..bdf40e9 100644 --- a/minatar/environments/freeway.py +++ b/minatar/environments/freeway.py @@ -92,7 +92,7 @@ def difficulty_ramp(self): # Process the game-state into the 10x10xn state provided to the agent and return def state(self): - state = np.zeros((10,10,len(self.channels))) + state = np.zeros((10,10,len(self.channels)),dtype=bool) state[self.pos,4,self.channels['chicken']] = 1 for car in self.cars: state[car[1],car[0], self.channels['car']] = 1 diff --git a/minatar/environments/seaquest.py b/minatar/environments/seaquest.py index 18fc49b..d092f30 100644 --- a/minatar/environments/seaquest.py +++ b/minatar/environments/seaquest.py @@ -252,7 +252,7 @@ def difficulty_ramp(self): # Process the game-state into the 10x10xn state provided to the agent and return def state(self): - state = np.zeros((10,10,len(self.channels))) + state = np.zeros((10,10,len(self.channels)),dtype=bool) state[self.sub_y,self.sub_x,self.channels['sub_front']] = 1 back_x = self.sub_x-1 if self.sub_or else self.sub_x+1 state[self.sub_y,back_x,self.channels['sub_back']] = 1 diff --git a/minatar/environments/space_invaders.py b/minatar/environments/space_invaders.py index 01545f2..8c9bc57 100644 --- a/minatar/environments/space_invaders.py +++ b/minatar/environments/space_invaders.py @@ -121,7 +121,7 @@ def difficulty_ramp(self): # Process the game-state into the 10x10xn state provided to the agent and return def state(self): - state = np.zeros((10,10,len(self.channels))) + state = np.zeros((10,10,len(self.channels)),dtype=bool) state[9,self.pos,self.channels['cannon']] = 1 state[:,:, self.channels['alien']] = self.alien_map if(self.alien_dir<0):