Package org.cspoker.ai.bots.bot.gametree.action

Examples of org.cspoker.ai.bots.bot.gametree.action.SearchBotAction


      }
      errorStr += ("\n-----------------------------<");
    }
   
    // chosen node of opponentmodel should have changed
    SearchBotAction action = parentOpponentModel.getChosenNode().getLastAction().getAction();
    if (parentOpponentModel.getChosenNode() == node || cProb == null) {
//      System.err.println(str);
      return null;
    }
   
View Full Code Here


  public AbstractTLSNode getParent() {
    return parent;
  }
 
  public void backPropagate(double value, SimulatedGame game){
    SearchBotAction action = game.pop();
    if(!isSplit()){
      for (Test test : possibleTests) {
        test.updateStats(action, value);
      }
    }
View Full Code Here

//          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");
//    if (tableContext.getGameState().getRound() == Round.FLOP)
//      System.out.print(root.getNbSamples());
//    System.out.print("\t");
//    if (tableContext.getGameState().getRound() == Round.TURN)=
//      System.out.print(root.getNbSamples());
//    System.out.print("\t");
//    if (tableContext.getGameState().getRound() == Round.FINAL)
//      System.out.print(root.getNbSamples());
//    System.out.println("");
   
    action.perform(playerContext);
    MCTSListener[] listeners = createListeners(gameState, botId);
    for (MCTSListener listener : listeners) {
      listener.onMCTS(root);
    }
  }
View Full Code Here

      children = childrenBuilder.build();
    }
  }
 
  public INode getChildAfter(ProbabilityAction probAction) {
    SearchBotAction action = probAction.getAction();
    if (action.endsInvolvementOf(bot)) {
      // bot folded
      return new ConstantLeafNode(this,probAction,gameState.getPlayer(bot).getStack());
    } else {
      try {
        GameState nextState = action.getStateAfterAction();
        // expand further
        if(nextState.getNextToAct().equals(bot)){
          return new DecisionNode(this, probAction, nextState, bot, config);
        }else{
          return new OpponentNode(this, probAction, nextState, bot, config);
View Full Code Here

TOP

Related Classes of org.cspoker.ai.bots.bot.gametree.action.SearchBotAction

Copyright © 2018 www.massapicom. 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.