public int run(Game a_gameState, long a_timeDue, boolean a) { m_root.state = a_gameState; m_root.m_numIters = 0; m_root.mctsSearch(a_timeDue); int nextAction = 0; if (a) { if (m_targetWeights.length == 1) nextAction = m_root.bestActionIndexValue(); else { /*System.out.print("("); for(int i = 0; i < m_root.children.length; ++i) { if(!m_root.m_prunedChildren[i]) { System.out.print(i + ":" + m_root.children[i].nVisits + ","); } } System.out.println(")"); */ double[] targetWeights = m_heuristic.getTargetWeights(); // System.out.println(targetWeights[0] + "," + targetWeights[1] + "," + targetWeights[2]); nextAction = m_root.bestActionIndex(targetWeights); } } this.m_numCalls++; this.m_numIters += m_root.m_numIters; return nextAction; }
public double getHV(boolean a_normalized) { return m_root.getHV(a_normalized); }