add car racing sim and first geno to phenotype mapper experiment.
This commit is contained in:
12
experiments/car_racing_test/run.py
Normal file
12
experiments/car_racing_test/run.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import gymnasium as gym
|
||||
|
||||
env = gym.make("CarRacing-v3", render_mode="human")
|
||||
obs, info = env.reset()
|
||||
|
||||
for _ in range(1000):
|
||||
action = env.action_space.sample()
|
||||
_, reward, terminated, truncated, _ = env.step(action)
|
||||
if terminated or truncated:
|
||||
obs, info = env.reset()
|
||||
|
||||
env.close()
|
||||
Reference in New Issue
Block a user