LunarLanderAgent
张量流的LunarLander强化学习
我在启动Box2d安装时遇到了困难,我尝试使用pip install Box2d而不是pip install gym[all]并成功了。
确保环境正常运行:
虚拟代码:
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import gym
env = gym.make('LunarLander-v2')
obs = env.reset()
for i in range(1000):
obs, reward, done, info = env.step(env.action_space.sample())
env.render()
if done:
break
env.clos
2021-03-21 17:08:38
5.21MB
Python
1