I have bought the software poker genius and have the correct meerkat-api directly from poker-genius themselves.
I have tried to create a VERY VERY VERY SIMPLE bot, that will ALWAYS call no matter what..
Instead I ended up with a bot that folds... Every single time. AA? Still folding...
Compiling, and everything should be fine - been supervised by the guys from poker genius.
I have no idea whats wrong... any ideas?
Code:
package bots.demobots;
import javax.swing.JPanel;
import com.biotools.meerkat.Action;
import com.biotools.meerkat.Card;
import com.biotools.meerkat.GameInfo;
import com.biotools.meerkat.Player;
import com.biotools.meerkat.util.Preferences;
/**
* A simple bot that always calls
*/
public class AlwaysCallBot implements Player {
private int ourSeat; // our seat for the current hand
private GameInfo gi; // general game information
private Preferences prefs;
public AlwaysCallBot() {
}
/**
* An event called to tell us our hole cards and seat number
* @param c1 your first hole card
* @param c2 your second hole card
* @param seat your seat number at the table
*/
public void holeCards(Card c1, Card c2, int seat) {
this.ourSeat = seat;
}
/**
* Requests an Action from the player
* Called when it is the Player's turn to act.
*/
public Action getAction() {
public Action getAction() {
double toCall = gi.getAmountToCall(ourSeat);
if (toCall == 0.0D) {
return Action.checkAction();
}
return Action.callAction(toCall);
}
/**
* If you implement the getSettingsPanel() method, your bot will display
* the panel in the Opponent Settings Dialog.
* @return a GUI for configuring your bot (optional)
*/
public JPanel getSettingsPanel() {
return null;
}
/**
* Get the current settings for this bot.
*/
public Preferences getPreferences() {
return prefs;
}
/**
* Load the current settings for this bot.
*/
public void init(Preferences playerPrefs) {
this.prefs = playerPrefs;
}
/**
* A new betting round has started.
*/
public void stageEvent(int stage) {
}
/**
* A showdown has occurred.
* @param pos the position of the player showing
* @param c1 the first hole card shown
* @param c2 the second hole card shown
*/
public void showdownEvent(int seat, Card c1, Card c2) {
}
/**
* A new game has been started.
* @param gi the game stat information
*/
public void gameStartEvent(GameInfo gInfo) {
this.gi = gInfo;
}
/**
* An event sent when all players are being dealt their hole cards
*/
public void dealHoleCardsEvent() {
}
/**
* An action has been observed.
*/
public void actionEvent(int pos, Action act) {
}
/**
* The game info state has been updated
* Called after an action event has been fully processed
*/
public void gameStateChanged() {
}
/**
* The hand is now over.
*/
public void gameOverEvent() {
}
/**
* A player at pos has won amount with the hand handName
*/
public void winEvent(int pos, double amount, String handName) {
}
}
And the PD file:
Code:
# All plug-ins must run through the following class:
PLAYER_CLASS=PlugInOpponent
# put your bot's full class name here:
BOT_PLAYER_CLASS=bots.demobots.AlwaysCallBot
# Your Bot's name:
PLAYER_NAME=AlwaysCallBot
# Your bot engine name:
AI_NAME=DemoBot
# Options for your Bot:
DEBUG=true
RANDOM_SEED=31313
ALWAYS_CALL_MODE=true
Statistics: Posted by Bearworks — Tue Mar 10, 2015 12:07 pm
]]>