本文整理汇总了C#中HRSim.Playfield.tick方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.tick方法的具体用法?C# Playfield.tick怎么用?C# Playfield.tick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HRSim.Playfield
的用法示例。
在下文中一共展示了Playfield.tick方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: rollOut
public double[] rollOut()
{
Playfield RandomRollerState = new Playfield(state);
int action = 0;
while (!RandomRollerState.isEnded() && action != -1) {
action = RandomRoller.roll(RandomRollerState);
if(action >= 0)
{
RandomRollerState.tick(action);
}
}
return m_ParetoMCTSPlayer.getHeuristic().value(RandomRollerState);
}
示例2: expand
public SimpleTreeNode expand() {
// choose a random unused action and add a new node for that
int bestAction = -1;
double bestValue = -1;
for (int i = 0; i < children.Length; i++) {
double x = r.NextDouble();
if (x > bestValue && children[i] == null) {
bestAction = i;
bestValue = x;
}
}
Playfield nextState = new Playfield(state);
nextState.tick(bestAction);
SimpleTreeNode tn = new SimpleTreeNode(nextState, this, this.RandomRoller, this.paretoTreePolicy, this.m_ParetoMCTSPlayer);
children[bestAction] = tn;
return tn;
}