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


Java SparseSampling.HashedHeightState方法代码示例

本文整理汇总了Java中burlap.behavior.singleagent.planning.stochastic.sparsesampling.SparseSampling.HashedHeightState方法的典型用法代码示例。如果您正苦于以下问题:Java SparseSampling.HashedHeightState方法的具体用法?Java SparseSampling.HashedHeightState怎么用?Java SparseSampling.HashedHeightState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在burlap.behavior.singleagent.planning.stochastic.sparsesampling.SparseSampling的用法示例。


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

示例1: DifferentiableSparseSampling

import burlap.behavior.singleagent.planning.stochastic.sparsesampling.SparseSampling; //导入方法依赖的package包/类
/**
 * Initializes. The model of this planner will automatically be set to a {@link CustomRewardModel} using the provided reward function.
 * @param domain the problem domain
 * @param rf the differentiable reward function
 * @param gamma the discount factor
 * @param hashingFactory the hashing factory used to compare state equality
 * @param h the planning horizon
 * @param c how many samples from the transition dynamics to use. Set to -1 to use the full (unsampled) transition dynamics.
 * @param boltzBeta the Boltzmann beta parameter for the differentiable Boltzmann (softmax) backup equation. The larger the value the more deterministic, the closer to 1 the softer.
 */
public DifferentiableSparseSampling(SADomain domain, DifferentiableRF rf, double gamma, HashableStateFactory hashingFactory, int h, int c, double boltzBeta){
	this.solverInit(domain, gamma, hashingFactory);
	this.h = h;
	this.c = c;
	this.rf = rf;
	this.boltzBeta = boltzBeta;
	this.nodesByHeight = new HashMap<SparseSampling.HashedHeightState, DiffStateNode>();
	this.rootLevelQValues = new HashMap<HashableState, DifferentiableSparseSampling.QAndQGradient>();
	this.rfDim = rf.numParameters();

	this.vinit = new VanillaDiffVinit(new ConstantValueFunction(), rf);

	this.model = new CustomRewardModel(domain.getModel(), rf);

	this.operator = new DifferentiableSoftmaxOperator(boltzBeta);

	this.debugCode = 6368290;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:29,代码来源:DifferentiableSparseSampling.java

示例2: DifferentiableSparseSampling

import burlap.behavior.singleagent.planning.stochastic.sparsesampling.SparseSampling; //导入方法依赖的package包/类
/**
 * Initializes.
 * @param domain the problem domain
 * @param rf the differentiable reward function
 * @param tf the terminal function
 * @param gamma the discount factor
 * @param hashingFactory the hashing factory used to compare state equality
 * @param h the planning horizon
 * @param c how many samples from the transition dynamics to use. Set to -1 to use the full (unsampled) transition dynamics.
 * @param boltzBeta the Boltzmann beta parameter for the differentiable Boltzmann (softmax) backup equation. The larger the value the more deterministic, the closer to 1 the softer.
 */
public DifferentiableSparseSampling(Domain domain, DifferentiableRF rf, TerminalFunction tf, double gamma, HashableStateFactory hashingFactory, int h, int c, double boltzBeta){
	this.solverInit(domain, rf, tf, gamma, hashingFactory);
	this.h = h;
	this.c = c;
	this.boltzBeta = boltzBeta;
	this.nodesByHeight = new HashMap<SparseSampling.HashedHeightState, DiffStateNode>();
	this.rootLevelQValues = new HashMap<HashableState, DifferentiableSparseSampling.QAndQGradient>();
	this.rfDim = rf.getParameterDimension();

	this.vinit = new VanillaDiffVinit(new ValueFunctionInitialization.ConstantValueFunctionInitialization(), rf);

	this.debugCode = 6368290;
}
 
开发者ID:f-leno,项目名称:DOO-Q_BRACIS2016,代码行数:25,代码来源:DifferentiableSparseSampling.java

示例3: getStateNode

import burlap.behavior.singleagent.planning.stochastic.sparsesampling.SparseSampling; //导入方法依赖的package包/类
/**
 * Either returns, or creates, indexes, and returns, the state node for the given state at the given height in the tree
 * @param s the state
 * @param height the height (distance from leaf node) of the node.
 * @return the state node for the given state at the given height in the tree
 */
protected DiffStateNode getStateNode(State s, int height){
	HashableState sh = this.hashingFactory.hashState(s);
	SparseSampling.HashedHeightState hhs = new SparseSampling.HashedHeightState(sh, height);
	DiffStateNode sn = this.nodesByHeight.get(hhs);
	if(sn == null){
		sn = new DiffStateNode(sh, height);
		this.nodesByHeight.put(hhs, sn);
	}

	return sn;
}
 
开发者ID:f-leno,项目名称:DOO-Q_BRACIS2016,代码行数:18,代码来源:DifferentiableSparseSampling.java


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