Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project Six CSE 397/497 AI and Computer Games. Introduction to Poker Academy  Bots for the Poker Academy software are written in Java  We will use the.

Similar presentations


Presentation on theme: "Project Six CSE 397/497 AI and Computer Games. Introduction to Poker Academy  Bots for the Poker Academy software are written in Java  We will use the."— Presentation transcript:

1 Project Six CSE 397/497 AI and Computer Games

2 Introduction to Poker Academy  Bots for the Poker Academy software are written in Java  We will use the Meerkat API to interact with the Poker Academy Software  Links to everything you need are provided on the Project Web Page

3 Programming Your AI  Implement the poker.Player interface, and over-ride the required methods.  Build against the provided meerkat-api.jar library  Create a jar file with your bot's classes.  Create a player definition file

4 Some Classes You Should Know  Player Your AI will inherit from Player It has three methods:  getAction()  holeCards()  init()

5 Player  init(Preferences prefs) Loads preferences from.pd file  getAction() When it’s your turn to act, this method is called. Think of it as your main body  holeCards(Card c1, Card c2, int seat) Returns your two hole cards, and your location at the table

6 Card  Contains functions such as getRank() and getSuit() for manipulating cards  Defines a constants for every value and suit, such as TWO, SEVEN, KING, or SPADES  Ex: if (c1.getRank() >= Card.TEN && c2.getRank() >= Card.TEN) { if (c1.getSuit() == c2.getSuit()) { return Action.raiseAction(toCall, gi.getBetSize()); } return Action.callAction(toCall); }

7 Action  Think of actions returned by getAction() as nodes in your FSM  From SimpleBot.java: if (gi.getStage() == Holdem.PREFLOP) { return preFlopAction(); } else { return postFlopAction(); }

8 Some More Classes to Know  GameInfo Contains information about the current game, such as pot size, stage of the game (pre-flop, flop, river, etc), and info about the other players  Hand Stores up to 7 Card elements Once your cards are in a Hand, you can use the HandEvaluator class to do lots of statistical functions on them, such as getNumBetter(), which returns the number of hands better than your current hand

9 Creating Your.pd File  The.pd file stores information about your bot. We use SimpleBot.pd as a guide: # All plug-ins must run through the following class: PLAYER_CLASS=com.biotools.poker.opponent.PlugInOpponent # put your bot's full class name here: BOT_PLAYER_CLASS=SimpleBot # put the path to your jar file here (relative to PokiPoker.exe) PLAYER_JAR_FILE=data/bots/simpleBot.jar # Your Bot's name: PLAYER_NAME=SimpleBot # Your bot engine name: AI_NAME=SimpleBot

10 Creating Your.pd File (cont) # Options for your Bot: DEBUG=true RANDOM_SEED=31313 ALWAYS_CALL_MODE=false


Download ppt "Project Six CSE 397/497 AI and Computer Games. Introduction to Poker Academy  Bots for the Poker Academy software are written in Java  We will use the."

Similar presentations


Ads by Google