Poker-AI.org Poker AI and Botting Discussion Forum 2015-03-18T21:39:19+00:00 http://poker-ai.org/phpbb/feed.php?f=24&t=2889 2015-03-18T21:39:19+00:00 2015-03-18T21:39:19+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2889&p=6629#p6629 <![CDATA[Re: Poker Genius problems making a bot]]>
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.

Statistics: Posted by BotMe — Wed Mar 18, 2015 9:39 pm


]]>
2015-03-12T09:39:09+00:00 2015-03-12T09:39:09+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2889&p=6625#p6625 <![CDATA[Re: Poker Genius problems making a bot]]>
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 :/

Statistics: Posted by Bearworks — Thu Mar 12, 2015 9:39 am


]]>
2015-03-12T03:49:18+00:00 2015-03-12T03:49:18+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2889&p=6624#p6624 <![CDATA[Re: Poker Genius problems making a bot]]> your getAction method is missing a closing brace }
edit: i see that there's some very strange code, 2 getActions?

Statistics: Posted by algonoob — Thu Mar 12, 2015 3:49 am


]]>
2015-03-10T12:07:23+00:00 2015-03-10T12:07:23+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2889&p=6623#p6623 <![CDATA[Poker Genius problems making a bot]]>
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


]]>