27 lines
332 B
Python
27 lines
332 B
Python
|
"""
|
||
|
Lunar Lander example
|
||
|
"""
|
||
|
|
||
|
import gym
|
||
|
|
||
|
from model import ActorCritic
|
||
|
from run import run
|
||
|
from train import train
|
||
|
|
||
|
seed = 12345
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
env = gym.make('LunarLander-v2')
|
||
|
env.seed(seed)
|
||
|
|
||
|
policy = ActorCritic()
|
||
|
|
||
|
training = True
|
||
|
|
||
|
if training:
|
||
|
train(env, policy)
|
||
|
|
||
|
run(env, policy)
|
||
|
|
||
|
|