I am trying this testbed:
http://poker-ai.org/archive/www.pokerai ... &sk=t&sd=aBut I think I found a problem on the HandHelper.java.
Code:
public static double isTopXPercentPreflop(int[] cards) {
for (int i = 0; i < hand_rankings.length; i++) {
for (int j = 0; j < hand_rankings[i].length; j++) {
if ((CardsDealer.printCard(cards[0]).charAt(0) == hand_rankings[i][j].charAt(0)
&& CardsDealer.printCard(cards[1]).charAt(0) == hand_rankings[i][j].charAt(1))
|| (CardsDealer.printCard(cards[1]).charAt(0) == hand_rankings[i][j].charAt(0)
&& CardsDealer.printCard(cards[0]).charAt(0) == hand_rankings[i][j].charAt(1))) {
if (hand_rankings[i][j].charAt(2) == 's') {
if (isSuited(cards))
return (hand_rankings.length * i + j + 1.0) / 169.0;
} else if (hand_rankings[i][j].charAt(2) == 'o') {
if (!isSuited(cards))
return (hand_rankings.length * i + j + 1.0) / 169.0;
}
}
}
}
return -1;
}
Shouldn't this be
hand_rankings.length[0] on both returns?