Examples of RootNode


Examples of net.sourceforge.cruisecontrol.gui.configuration.tree.nodes.RootNode

        "  </modificationset>" +
        "  <bootstrappers />" +
        "</project>" +
        "</cruisecontrol>",
        "Proj");
    RootNode rootNode = (RootNode) tree.getModel().getRoot();
    testNode = (ProjectNode) rootNode.getChildAt(0);
  }
View Full Code Here

Examples of nz.govt.natlib.meta.ui.tree.RootNode

    // how many files are to be processed?
    fileCount((BaseNode) fileList.getRoot());

    startTime = System.currentTimeMillis();
    RootNode root = (RootNode) fileList.getRoot();
    for (int i = 0; i < root.getChildCount() && !stopping; i++) {
      ObjectFolderNode object = (ObjectFolderNode) root.getChildAt(i);
      // work out what kind of harvester to use for each object...

      if (!FileModel.hasAFile(object)) {
        LogMessage msg = new LogMessage(LogMessage.DEBUG, object
            .getName(), "Object contains no files - skipping",
View Full Code Here

Examples of org.cspoker.ai.bots.bot.gametree.mcts.nodes.RootNode

  @Override
  public void doNextAction() throws RemoteException, IllegalActionException {
    startTime = System.currentTimeMillis();
    long endTime = System.currentTimeMillis()+decisionTime;
    GameState gameState = tableContext.getGameState()
    RootNode root = new RootNode(gameState,botId,config);
    logger.info("Starting MCTS iterations.");
    do{
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
    }while(System.currentTimeMillis()<endTime);
    INode node = root.selectChild(config.getMoveSelectionStrategy());
    config.getModel().setChosenNode(node);
//    try {
//    ImmutableList<INode> children = ((InnerNode) node).getChildren();
//    for (INode n: children) {
//      String str = " <last action> ";
//      str = "" + n.getLastAction().getAction().getUnwrappedStateAfterAction().getClass();
//      System.out.println("Child " +  str
//          + " with action " + n.getLastAction().getAction() + " with probability " +
//          n.getLastAction().getProbability());
//    }
//    } catch (ClassCastException e) {
//      System.out.println("-------------\nNO CLASS CAST\n-------------"); // do nothing
//    }
    SearchBotAction action = node.getLastAction().getAction();
    if(logger.isInfoEnabled())
      logger.info("Stopped MCTS after "+root.getNbSamples()+" samples and choosing "+action);
   
    // to calculate efficiency of sampling algorithms
//    if (tableContext.getGameState().getRound() == Round.PREFLOP)
//      System.out.print(root.getNbSamples());
//    System.out.print("\t");
View Full Code Here

Examples of org.cspoker.ai.bots.bot.gametree.mcts.nodes.RootNode

  @Override
  public void doNextAction() throws RemoteException, IllegalActionException {
//    long startTime = System.currentTimeMillis();
    GameState gameState = tableContext.getGameState()
    RootNode root = new RootNode(gameState,botId,config);
    switch (gameState.getRound()) {
    case PREFLOP: nbSamples = samplesPreFlop; break;
    case FLOP: nbSamples = samplesFlop; break;
    case TURN: nbSamples = samplesTurn; break;
    case FINAL: nbSamples = samplesRiver; break;
    default: throw new IllegalStateException(gameState.getRound().toString());
    }
    do{
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
      iterate(root);
    }while(root.getNbSamples()<nbSamples);   
   
    // to calculate efficiency of sampling algorithms
//    if (tableContext.getGameState().getRound() == Round.FINAL)
//      System.out.println(System.currentTimeMillis()-startTime);
   
    if(logger.isDebugEnabled()){
      logger.debug("Stopped MCTS.");
    }
    root.selectChild(config.getMoveSelectionStrategy()).getLastAction().getAction().perform(playerContext);
   
    MCTSListener[] listeners = createListeners(tableContext.getGameState(), botId);
    for (MCTSListener listener : listeners) {
      listener.onMCTS(root);
    }
View Full Code Here

Examples of org.epic.perleditor.templates.textmanipulation.TextEditNode.RootNode

    for (int i= fEdits.size() - 1; i >= 0; i--) {
      nodes[i]= TextEditNode.create((TextEdit)fEdits.get(i));
    }
    fNumberOfNodes= nodes.length;
    Arrays.sort(nodes, new TextEditNodeComparator());
    RootNode root= new RootNode(fBuffer.getLength());
    for (int i= 0; i < nodes.length; i++) {
      root.add(nodes[i]);
    }
    return root;
  }
View Full Code Here

Examples of org.exist.xquery.RootNode

   
    public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {
     
        if (contextSequence == null || contextSequence.isEmpty()) {
            // if the context sequence is empty, we create a default context
            final RootNode rootNode = new RootNode(context);
            contextSequence = rootNode.eval(null, null);
        }
        final Sequence[] args = getArguments(null, null);
       
        final Item item = args[0].itemAt(0);
        QNameValue qval;
View Full Code Here

Examples of org.jboss.dashboard.ui.config.treeNodes.RootNode

    public void start() throws Exception {
        super.start();
        if (rootNodeArray != null) {
            for (int i = 0; i < rootNodeArray.length; i++) {
                RootNode rootNode = rootNodeArray[i];
                rootNode.setTree(this);
            }
        }
    }
View Full Code Here

Examples of org.jitterbit.integration.json.dom.RootNode

        }
    }

    private void loadDomTree(File jsonFile) throws JsonParseException, IOException {
        JsonDomParser domParser = new JsonDomParser();
        RootNode root = domParser.parse(jsonFile);
        domWalker = new DomWalker(root);
    }
View Full Code Here

Examples of org.jruby.ast.RootNode

    public void compileRoot(Node node, ScriptCompiler context, ASTInspector inspector) {
        compileRoot(node, context, inspector, true, true);
    }

    public void compileRoot(Node node, ScriptCompiler context, ASTInspector inspector, boolean load, boolean main) {
        RootNode rootNode = (RootNode) node;

        context.startScript(rootNode.getStaticScope());

        // create method for toplevel of script
        BodyCompiler methodCompiler = context.startMethod("__file__", "__file__", null, rootNode.getStaticScope(), inspector);

        Node nextNode = rootNode.getBodyNode();
        if (nextNode != null) {
            if (nextNode.nodeId == NodeType.BLOCKNODE) {
                // it's a multiple-statement body, iterate over all elements in turn and chain if it get too long
                BlockNode blockNode = (BlockNode) nextNode;
View Full Code Here

Examples of org.jruby.ast.RootNode

        position = topOfAST != null ? topOfAST.getPosition() : position;

        if (result.getBeginNodes().size() == 0) {
            if (topOfAST == null) topOfAST = NilImplicitNode.NIL;
           
            return new RootNode(position, result.getScope(), topOfAST);
        }
       
        BlockNode newTopOfAST = new BlockNode(position);
        for (Node beginNode: result.getBeginNodes()) {
            appendToBlock(newTopOfAST, beginNode);
        }
       
        // Add real top to new top (unless this top is empty [only begin/end nodes or truly empty])
        if (topOfAST != null) newTopOfAST.add(topOfAST);
       
        return new RootNode(position, result.getScope(), newTopOfAST);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.