当前位置: 首页>>代码示例>>Java>>正文


Java ExperienceMemory类代码示例

本文整理汇总了Java中burlap.behavior.singleagent.learning.experiencereplay.ExperienceMemory的典型用法代码示例。如果您正苦于以下问题:Java ExperienceMemory类的具体用法?Java ExperienceMemory怎么用?Java ExperienceMemory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExperienceMemory类属于burlap.behavior.singleagent.learning.experiencereplay包,在下文中一共展示了ExperienceMemory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readExperienceMemory

import burlap.behavior.singleagent.learning.experiencereplay.ExperienceMemory; //导入依赖的package包/类
private static ExperienceMemory readExperienceMemory(double discountFactor, final Path container) {

        List<Episode> episodes = Episode.readEpisodes(container.resolve("data").toAbsolutePath().toString());
        ExperienceMemory memory = new FixedSizeMemory(episodes.size()*243);
        for(Episode e : episodes)
            for(int t=0; t<e.maxTimeStep(); t++)
                memory.addExperience(new EnvironmentOptionOutcome(e.state(t),
                                                                  e.action(t),
                                                                  e.state(t+1),
                                                                  e.reward(t+1),
                                                                  t+1==e.maxTimeStep(),
                                                                  discountFactor,
                                                                  e
                ));
        return memory;

    }
 
开发者ID:CarrKnight,项目名称:POSEIDON,代码行数:18,代码来源:BurlapShodan.java

示例2: DeepQTester

import burlap.behavior.singleagent.learning.experiencereplay.ExperienceMemory; //导入依赖的package包/类
public DeepQTester(Policy policy, ExperienceMemory memory, StateMapping stateMapping) {
    this.policy = policy;
    this.memory = memory;
    this.stateMapping = stateMapping;
}
 
开发者ID:h2r,项目名称:burlap_caffe,代码行数:6,代码来源:DeepQTester.java

示例3: setExperienceReplay

import burlap.behavior.singleagent.learning.experiencereplay.ExperienceMemory; //导入依赖的package包/类
/**
 * Sets the experience replay memory to use and the number of samples to take from the memory after each step for updating
 * @param memory {@link ExperienceMemory} to use
 * @param numReplay the number of samples from the memory used for updating the Q-function
 */
public void setExperienceReplay(ExperienceMemory memory, int numReplay){
	this.memory = memory;
	this.numReplay = numReplay;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:10,代码来源:ApproximateQLearning.java


注:本文中的burlap.behavior.singleagent.learning.experiencereplay.ExperienceMemory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。