Project Six - PowerPoint PPT Presentation

About This Presentation
Title:

Project Six

Description:

Bots for the Poker Academy software are written in Java. We will use the Meerkat API to interact with the Poker Academy Software ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 11
Provided by: jonatha119
Category:
Tags: ajar | create | games | gi | hands | inherit | java | king | of | player | poker | project | return | ride | six | spades | suit | the

less

Transcript and Presenter's Notes

Title: Project Six


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 its 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() gt Card.TEN c2.getRank() gt
    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_CLASScom.biotools.poker.opponent.PlugInOpp
    onent
  • put your bot's full class name here
  • BOT_PLAYER_CLASSSimpleBot
  • put the path to your jar file here (relative to
    PokiPoker.exe)
  • PLAYER_JAR_FILEdata/bots/simpleBot.jar
  • Your Bot's name
  • PLAYER_NAMESimpleBot
  • Your bot engine name
  • AI_NAMESimpleBot

10
Creating Your .pd File (cont)
  • Options for your Bot
  • DEBUGtrue
  • RANDOM_SEED31313
  • ALWAYS_CALL_MODEfalse
Write a Comment
User Comments (0)
About PowerShow.com