robocin / rSoccer

🎳 Environments for Reinforcement Learning
MIT License
46 stars 19 forks source link

Example code - Agent error #62

Closed GersonHMG closed 1 year ago

GersonHMG commented 1 year ago

The example code is presenting the following error:

Example code:

import gym
import rsoccer_gym

# Using VSS Single Agent env
env = gym.make('VSS-v0')

env.reset()
# Run for 1 episode and print reward at the end
for i in range(1):
    done = False
    while not done:
        # Step using random actions
        action = env.action_space.sample()
        next_state, reward, done, _ = env.step(action)
        env.render()
    print(reward)

Error message:

Exception has occurred: ValueError
not enough values to unpack (expected 5, got 4) 

Error line: next_state, reward, done, _ = env.step(action)

GersonHMG commented 1 year ago

Solution:

pip uninstall gym
pip install gym==0.21.0
FelipeMartins96 commented 1 year ago

We are updating the intall requirements to use the proper version of gym, and we are also looking to update the repo to use the latest gym version