Open Cornslakes opened 1 month ago
Thanks for sharing that bug. It seems like it's related to Gymnasium's options parameter in the step function. As a workaround, the Stable Baselines3 check_env function can be used. The fix for this bug will be provided in the next release.
from stable_baselines3.common.env_checker import check_env
from gym_vectorvelocity import VectorVelocityEnv
GAMEOVER_PENALTY = 75
MISSED_COIN_PENALTY = 3
DODGED_OBSTACLE_REWARD = 1
COLLECTED_COIN_REWARD = 12
def create_env():
env = VectorVelocityEnv()
env.coin_missed_penalty = MISSED_COIN_PENALTY
env.game_over_penalty = GAMEOVER_PENALTY
env.dodged_obstacle_reward = DODGED_OBSTACLE_REWARD
env.coin_reward = COLLECTED_COIN_REWARD
return env
env = create_env()
check_env(env)
Describe the bug It is not possible to use the gymnasium env_checker on the environment.
To Reproduce Steps to reproduce the behavior:
`from gymnasium.utils.env_checker import check_env from stable_baselines3.common.env_checker import check_env
env modifications if needed
GAMEOVER_PENALTY = 75 MISSED_COIN_PENALTY = 3
DODGED_OBSTACLE_REWARD = 1 COLLECTED_COIN_REWARD = 12
def create_env(): env = VectorVelocityEnv() env.coin_missed_penalty = MISSED_COIN_PENALTY env.game_over_penalty = GAMEOVER_PENALTY env.dodged_obstacle_reward = DODGED_OBSTACLE_REWARD env.coin_reward = COLLECTED_COIN_REWARD return env
env = create_env() check_env(env)`
Expected behavior The code should run properly.
Desktop (please complete the following information):