initial data commit.
This commit is contained in:
12
replay.py
Normal file
12
replay.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from stable_baselines3 import TD3
|
||||
from car_racing_env import CarRacing
|
||||
|
||||
test_env = CarRacing(render_mode="human")
|
||||
best = TD3.load("./td3_run_2_best/best_model.zip", env=test_env)
|
||||
obs, info = test_env.reset()
|
||||
done = trunc = False
|
||||
while not (done or trunc):
|
||||
action, _ = best.predict(obs, deterministic=True)
|
||||
obs, r, done, trunc, info = test_env.step(action)
|
||||
test_env.render()
|
||||
test_env.close()
|
||||
Reference in New Issue
Block a user