/**
* Initializes the option by creating the policy uses some provided option. The valueFunction is called repeatedly on each state in the
* the list <code>seedStatesForPlanning</code> and then
* sets this options policy to the valueFunction derived policy that is provided.
* @param name the name of the option
* @param init the initiation conditions of the option
* @param terminationStates the termination states of the option
* @param seedStatesForPlanning the states that should be used as initial states for the valueFunction
* @param planner the valueFunction that is used to create the policy for this option
* @param p the valueFunction derived policy to use after planning from each initial state is performed.
*/
public DeterministicTerminationOption(String name, StateConditionTest init, StateConditionTest terminationStates, List<State> seedStatesForPlanning,
Planner planner, SolverDerivedPolicy p){
if(!(p instanceof Policy)){
throw new RuntimeErrorException(new Error("PlannerDerivedPolicy p is not an instnace of Policy"));
}
this.name = name;
this.initiationTest = init;
this.terminationStates = terminationStates;
//now construct the policy using the valueFunction from each possible initiation state
for(State si : seedStatesForPlanning){
planner.planFromState(si);
}
p.setSolver(planner);
this.policy = (Policy)p;
}
DeterministicTerminationOption.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:DOO-Q_BRACIS2016
作者:
评论列表
文章目录