本文整理汇总了C++中HISTORY::Pop方法的典型用法代码示例。如果您正苦于以下问题:C++ HISTORY::Pop方法的具体用法?C++ HISTORY::Pop怎么用?C++ HISTORY::Pop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HISTORY
的用法示例。
在下文中一共展示了HISTORY::Pop方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DisplayValue
void VNODE::DisplayValue(HISTORY& history, int maxDepth, ostream& ostr) const
{
if (history.Size() >= (uint) maxDepth)
return;
for (int action = 0; action < NumChildren; action++)
{
history.Add(action,-1);
Children[action].DisplayValue(history, maxDepth, ostr);
history.Pop();
}
}
示例2: DisplayValue
void VNODE::DisplayValue(HISTORY& history, int maxDepth, ostream& ostr, const std::vector<double> *qvalues) const
{
if (history.Size() >= maxDepth)
return;
for (int action = 0; action < NumChildren; action++)
{
history.Add(action);
const QNODE &qnode = Children[action];
if (qnode.Applicable()) {
ostr << "n=" << qnode.GetCount() << " ";
if (qvalues) {
qnode.DisplayValue(history, maxDepth, ostr, &(qvalues->at(action)));
}
else {
qnode.DisplayValue(history, maxDepth, ostr);
}
}
history.Pop();
}
}
示例3: DisplayPolicy
void VNODE::DisplayPolicy(HISTORY& history, int maxDepth, ostream& ostr) const
{
if (history.Size() >= (uint) maxDepth)
return;
double bestq = -Infinity;
int besta = -1;
for (int action = 0; action < NumChildren; action++)
{
if (Children[action].Value.GetValue() > bestq)
{
besta = action;
bestq = Children[action].Value.GetValue();
}
}
if (besta != -1)
{
history.Add((uint)besta,0);
Children[besta].DisplayPolicy(history, maxDepth, ostr);
history.Pop();
}
}
示例4: DisplayPolicy
void VNODE::DisplayPolicy(HISTORY& history, int maxDepth, ostream& ostr) const
{
if (history.Size() >= maxDepth)
return;
// double bestq = -Infinity;
int besta = -1;
for (int action = 0; action < NumChildren; action++)
{
// if (Children[action].Dirichlet.GetValue() > bestq) //XXX
// {
// besta = action;
// bestq = Children[action].Dirichlet.GetValue();
// }
}
if (besta != -1)
{
history.Add(besta);
Children[besta].DisplayPolicy(history, maxDepth, ostr);
history.Pop();
}
}