mirror of
https://github.com/vale981/ray
synced 2025-03-11 21:56:39 -04:00
12 lines
287 B
Python
12 lines
287 B
Python
![]() |
from ray.rllib.agents.ppo import PPOAgent
|
||
|
from ray import tune
|
||
|
import ray
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
ray.init()
|
||
|
# Test legacy *Agent classes work (renamed to Trainer)
|
||
|
tune.run(
|
||
|
PPOAgent,
|
||
|
config={"env": "CartPole-v0"},
|
||
|
stop={"training_iteration": 2})
|