本文整理汇总了C++中VNode::belief方法的典型用法代码示例。如果您正苦于以下问题:C++ VNode::belief方法的具体用法?C++ VNode::belief怎么用?C++ VNode::belief使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VNode
的用法示例。
在下文中一共展示了VNode::belief方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Expand
void AEMS::Expand(QNode* qnode, BeliefLowerBound* lb, BeliefUpperBound* ub,
const BeliefMDP* model, History& history) {
VNode* parent = qnode->parent();
int action = qnode->edge();
map<OBS_TYPE, VNode*>& children = qnode->children();
const Belief* belief = parent->belief();
// cout << *belief << endl;
double step_reward = model->StepReward(belief, qnode->edge());
map<OBS_TYPE, double> obss;
model->Observe(belief, qnode->edge(), obss);
double lower_bound = step_reward;
double upper_bound = step_reward;
// Create new belief nodes
for (map<OBS_TYPE, double>::iterator it = obss.begin(); it != obss.end(); it++) {
OBS_TYPE obs = it->first;
double weight = it->second;
logd << "[AEMS::Expand] Creating node for obs " << obs
<< " with weight " << weight << endl;
VNode* vnode = new VNode(model->Tau(belief, action, obs),
parent->depth() + 1, qnode, obs);
vnode->likelihood = weight;
logd << " New node created!" << endl;
children[obs] = vnode;
InitLowerBound(vnode, lb, history);
InitUpperBound(vnode, ub, history);
lower_bound += weight * Discount() * vnode->lower_bound();
upper_bound += weight * Discount() * vnode->upper_bound();
}
qnode->step_reward = step_reward;
qnode->lower_bound(lower_bound);
qnode->upper_bound(upper_bound);
}