Package org.cspoker.ai.opponentmodels.prolog

Examples of org.cspoker.ai.opponentmodels.prolog.ToPrologTermVisitor


    }
  }

  @Override
  protected double priorActionProbability(SymbolTerm action, PlayerId playerId) {
    ToPrologTermVisitor visitor = getTopVisitor();
    IntegerTerm gameId = new IntegerTerm(visitor.getGameId());
    IntegerTerm actionId = new IntegerTerm(visitor.getActionId() + 1);
    SymbolTerm player = SymbolTerm.makeSymbol("player_" + playerId.getId());
    SymbolTerm round = visitor.getRound();
    VariableTerm p = new VariableTerm();
    PRED_prior_action_probability_6 pedicate = new PRED_prior_action_probability_6(
        gameId, actionId, player, action, round, p, null);
    String goal = pedicate.toString();
    goal = goal.replace(p.toString(), "P") + ".";
View Full Code Here


        termWithPackage, dontcare });
  }

  @Override
  protected double priorActionProbability(SymbolTerm action, PlayerId playerId) {
    ToPrologTermVisitor visitor = getTopVisitor();
    Predicate prior_action_probability = new PRED_prior_action_probability_6();
    VariableTerm p = new VariableTerm();
    IntegerTerm gameId = new IntegerTerm(visitor.getGameId());
    IntegerTerm actionId = new IntegerTerm(visitor.getActionId() + 1);
    SymbolTerm playerName = SymbolTerm.makeSymbol("player_" + playerId.getId());
    Term[] args = { gameId, actionId, playerName, action, visitor.getRound(), p };
    if (logger.isDebugEnabled()) {
      logger.debug(new PRED_prior_action_probability_6(gameId, actionId, playerName, action, visitor.getRound(), p, null));
    }
    if (!executeGoal(prior_action_probability, args)) {
      throw new IllegalStateException("Failed to call "
          + prior_action_probability);
    }
View Full Code Here

TOP

Related Classes of org.cspoker.ai.opponentmodels.prolog.ToPrologTermVisitor

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.