本文整理汇总了Python中pybrain.rl.experiments.EpisodicExperiment.doEpisode方法的典型用法代码示例。如果您正苦于以下问题:Python EpisodicExperiment.doEpisode方法的具体用法?Python EpisodicExperiment.doEpisode怎么用?Python EpisodicExperiment.doEpisode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pybrain.rl.experiments.EpisodicExperiment
的用法示例。
在下文中一共展示了EpisodicExperiment.doEpisode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CCRLEnvironment
# 需要导入模块: from pybrain.rl.experiments import EpisodicExperiment [as 别名]
# 或者: from pybrain.rl.experiments.EpisodicExperiment import doEpisode [as 别名]
from pybrain.rl.environments.ode import CCRLEnvironment
from pybrain.rl.environments.ode.tasks import CCRLGlasTask
from pybrain.tools.shortcuts import buildNetwork
from pybrain.structure.modules.tanhlayer import TanhLayer
from pybrain.optimization import PGPE
from pybrain.rl.agents import OptimizationAgent
from pybrain.rl.experiments import EpisodicExperiment
environment = CCRLEnvironment()
task = CCRLGlasTask(environment)
net = buildNetwork(len(task.getObservation()),4,environment.indim,outclass=TanhLayer)
agent = OptimizationAgent(net,PGPE())
experiment = EpisodicExperiment(task,agent)
for updates in range(20000):
experiment.doEpisode()