March 2019
Intermediate to advanced
184 pages
4h 57m
English
Import the TORCS environment from gym_torcs so that we can train the RL agent on it:
from gym_torcs import TorcsEnv
# Generate a Torcs environment env = TorcsEnv(vision=False, throttle=True, gear_change=False)
if np.mod(i, 100) == 0: ob = env.reset(relaunch=True) #relaunch TORCS every N episodes due to a memory leak errorelse: ob = env.reset()
Read now
Unlock full access