Poker-AI.org http://poker-ai.org/phpbb/ |
|
Poker Genius problems making a bot http://poker-ai.org/phpbb/viewtopic.php?f=24&t=2889 |
Page 1 of 1 |
Author: | Bearworks [ Tue Mar 10, 2015 12:07 pm ] |
Post subject: | Poker Genius problems making a bot |
Hi, 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 |
Author: | algonoob [ Thu Mar 12, 2015 3:49 am ] |
Post subject: | Re: Poker Genius problems making a bot |
should this even compile? your getAction method is missing a closing brace } edit: i see that there's some very strange code, 2 getActions? |
Author: | Bearworks [ Thu Mar 12, 2015 9:39 am ] |
Post subject: | Re: Poker Genius problems making a bot |
Oh sorry I dont know what happend :S The actual code is Code: public Action getAction() { double toCall = gi.getAmountToCall(ourSeat); if (toCall == 0.0D) { return Action.checkAction(); } return Action.callAction(toCall); } Which still doesn't work :/ |
Author: | BotMe [ Wed Mar 18, 2015 9:39 pm ] |
Post subject: | Re: Poker Genius problems making a bot |
I think your files were taken from the OpenTestBed so I see a few errors: 1. java file: you don't need the first two strings. So change this: Code: package bots.demobots; import javax.swing.JPanel; to Code: import java.awt.event.*; import javax.swing.*; 2. pd file: Replace: Code: BOT_PLAYER_CLASS=bots.demobots.AlwaysCallBot with Code: BOT_PLAYER_CLASS=AlwaysCallBot and add the following line: Code: PLAYER_JAR_FILE=data/bots/AlwaysCallBot.jar I also recommend to read this post: http://poker-genius.com/forum/Thread-Writing-a-Poker-bot So I've tested this bot with Poker Genius and it works great. You'll get the perfect calling-station hehe. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |