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

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


  @Override
  public void enterNode(final Pair<ActionWrapper,GameTreeNode> pair, final double lowerBound) {
    display.syncExec(new Runnable() {
      public void run() {
        ActionWrapper action = pair.getLeft();
        TreeItem item = items.peek();
        TreeItem newItem;
        if (item == null) {
          if (newDecision.compareAndSet(true, false)) {
            tree.removeAll();
          }
          newItem = new TreeItem(tree, SWT.NONE);
        } else {
          newItem = new TreeItem(item, SWT.NONE);
        }
        ProbabilityAction probAction;
        String samples = "?";
        if (action instanceof ProbabilityAction) {
          probAction = (ProbabilityAction) action;
        } else {
          throw new IllegalStateException("What action is this? "
              + action);
        }
        GameTreeNode node = pair.getRight();
        Round round = rounds.peek();
        rounds.push(node.getGameState().getRound());
        String actor = action.getAction().actor.equals(botId)?"Bot":"Player "+action.getAction().actor;
        newItem.setText(new String[] { actor,
            action.getAction().toString(), round.getName(),
            Math.round(100 * probAction.getProbability()) + "%",
            samples, "?", "?", "" + node.getNbTokens() ,
            ""+Util.parseDollars(node.getUpperWinBound() - relStackSize),
            ""+Util.parseDollars(node.getGameState().getGamePotSize()),
            ""+Util.parseDollars(lowerBound - relStackSize)
View Full Code Here

TOP

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

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.