3 thoughts on “[Activity] Reinforcement Learning and Q-Learning with Gym”

  1. voxpopus says:

    Hit a problem: installed gym, “gym.make” line runs OK so version 3 is OK… but streets.render() hangs up
    Tried adding the streets.reset() but didn’t help.
    =========
    ResetNeeded Traceback (most recent call last)
    ~\AppData\Local\Temp/ipykernel_3664/1062669811.py in
    6 streets = gym.make(“Taxi-v3”).env #New versions keep getting released; if -v3 doesn’t work, try -v2 or -v4
    7 #streets.reset()
    —-> 8 streets.render()

    ~\anaconda3\lib\site-packages\gym\wrappers\order_enforcing.py in render(self, *args, **kwargs)
    45 “””Renders the environment with `kwargs`.”””
    46 if not self._disable_render_order_enforcing and not self._has_reset:
    —> 47 raise ResetNeeded(
    48 “Cannot call `env.render()` before calling `env.reset()`, if this is a intended action, ”
    49 “set `disable_render_order_enforcing=True` on the OrderEnforcer wrapper.”

    ResetNeeded: Cannot call `env.render()` before calling `env.reset()`, if this is a intended action, set `disable_render_order_enforcing=True` on the OrderEnforcer wrapper.

    1. Frank Kane says:

      I think maybe you missed the annotation in the video at 0:25. You need to specifically install pip version 0.15.3 (with pip install gym==0.15.3) as the Taxi model was removed in later versions.

  2. voxpopus says:

    0.15.3 wouldn’t install either– until I updated pip.
    After that … I can now see the grid.
    Thanks for the help.

Leave a Reply