Port TRPO, PPO, GAIL

This commit is contained in:
ebuehrle
2022-02-15 11:01:52 +01:00
parent 530ac95d61
commit a3b9b3e250
79 changed files with 5633 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from sb3_contrib import TRPO
from intersim.envs import IntersimpleLidarFlat
from intersim.envs.intersimple import speed_reward
import functools
env = IntersimpleLidarFlat(
n_rays=5,
agent=51,
reward=functools.partial(
speed_reward,
collision_penalty=0
),
)
model = TRPO("MlpPolicy", env, use_sde=False, sde_sample_freq=4, verbose=1)
model.learn(total_timesteps=250000)