model.getFoldCallRaiseProbabilities(gameState, actor);
model.forgetLastAssumption();
// if (size != model.getVisitorSize()) throw new IllegalStateException("Model didn't forget last assumption");
double foldProbability = probabilities.getLeft();
actions.add(new ProbabilityAction(new FoldAction(gameState, actor), foldProbability));
double callProbability = probabilities.getMiddle();
actions.add(new ProbabilityAction(new CallAction(gameState, actor), callProbability));
if (!gameState.getPlayer(bot).isAllIn()
&& gameState.isAllowedToRaise(actor)) {
double raiseProbability = probabilities.getRight();
addRaiseProbalities(gameState, actor, actions, raiseProbability,
true, relBetSizeSamples, relPBetSizeSamples);
}
} else {
// check or bet
// size = model.getVisitorSize();
model.assumeTemporarily(gameState);
Pair<Double, Double> probabilities = model.getCheckBetProbabilities(gameState, actor);
model.forgetLastAssumption();
// if (size != model.getVisitorSize()) throw new IllegalStateException("Model didn't forget last assumption");
double checkProbability = probabilities.getLeft();
actions.add(new ProbabilityAction(new CheckAction(gameState, actor), checkProbability));
if (!gameState.getPlayer(bot).isAllIn()
&& gameState.isAllowedToRaise(actor)) {
double betProbability = probabilities.getRight();
addRaiseProbalities(gameState, actor, actions, betProbability,
false, relBetSizeSamples, relPBetSizeSamples);
}
}
ImmutableList.Builder<ProbabilityAction> normalizedActionsBuilder = ImmutableList.builder();
for (ProbabilityAction action : actions) {
normalizedActionsBuilder.add(new ProbabilityAction(action
.getActionWrapper(), action.getProbability()));
}
return normalizedActionsBuilder.build();
}