diff --git a/flappy_bird_gymnasium/envs/flappy_bird_env_simple.py b/flappy_bird_gymnasium/envs/flappy_bird_env_simple.py index e4f42f6..d504f90 100644 --- a/flappy_bird_gymnasium/envs/flappy_bird_env_simple.py +++ b/flappy_bird_gymnasium/envs/flappy_bird_env_simple.py @@ -106,13 +106,15 @@ def _get_observation(self): player_y = self._game.player_y v_dist = ((upper_pipe_y + lower_pipe_y) / 2) - player_y pipes.append((h_dist, v_dist)) - + pipes = sorted(pipes, key=lambda x: x[0]) vel_y = self._game.player_vel_y rot = self._game.player_rot if self._normalize_obs: - pipes = [(h / self._screen_size[0], v / self._screen_size[1]) for h, v in pipes] + pipes = [ + (h / self._screen_size[0], v / self._screen_size[1]) for h, v in pipes + ] vel_y /= PLAYER_MAX_VEL_Y rot /= 90 diff --git a/setup.py b/setup.py index f323722..7439cdc 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ import setuptools -_VERSION = "0.1.0" +_VERSION = "0.1.1" # Short description. short_description = "A Gymnasium environment for the Flappy Bird game."