bot.module.th.shc
Class StartingHandChart

java.lang.Object
  extended by bot.module.th.shc.StartingHandChart
All Implemented Interfaces:
IF_GetProposal, IF_StartingHandChart
Direct Known Subclasses:
TableBSS, TableCSV

public abstract class StartingHandChart
extends java.lang.Object
implements IF_StartingHandChart

This abstract class offers the body for every particular startingHandChart

Author:
Witthold/Korol

Field Summary
private  int numCalls
          length depends on differentiation of table style (OFFENSIVE has 6 - max)
private  int numRaises
          length depends on differentiation of table style (OFFENSIVE has 4 - max)
private  int proposal
          tables proposal
protected static int rank
          1:1 translation: Ace == 14
protected static int suite
          suites start at 0
 int[][][][][][][] table
          basic startinghandchart as int array
1-4: card1Value,card1Color,card2Value.card2Color
5: position (in classes: early,mid,late,sb,bb)
6: how often was called in this round
7: how often was raised in this round
 
Constructor Summary
StartingHandChart(int numPosition, int numCalls, int numRaises)
          Constructor table depending
table depending length - how much differentiation offers the table?
 
Method Summary
private  int getPositionCat(int position, int activePlayers)
          maps the absolute position onto the 5 position categories
position categories: early,mid,late,sb,bb - positions start at 0
categories are filled from EARLY to LATE
e.g. 7 players:
0->3(SB); 1->4(BB); 2->0(EARLY); 3->0(EARLY); 4->1(MIDDLE); 5->1(MIDDLE); 6->2(LATE);
 int[] getProposal(Card[] holeCards, int activePlayers, int smallBlind, int bigBlind, int position, int calls, int raises)
          lookInTable and process proposal
private  void initAllFold()
          init the table with FOLD everywhere
private  int lookInTable(Card[] holeCards, int position, int calls, int raises)
          looks in the startinghandcharts table for its proposal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rank

protected static int rank
1:1 translation: Ace == 14


suite

protected static int suite
suites start at 0


numCalls

private int numCalls
length depends on differentiation of table style (OFFENSIVE has 6 - max)


numRaises

private int numRaises
length depends on differentiation of table style (OFFENSIVE has 4 - max)


proposal

private int proposal
tables proposal


table

public int[][][][][][][] table
basic startinghandchart as int array
1-4: card1Value,card1Color,card2Value.card2Color
5: position (in classes: early,mid,late,sb,bb)
6: how often was called in this round
7: how often was raised in this round

Constructor Detail

StartingHandChart

public StartingHandChart(int numPosition,
                         int numCalls,
                         int numRaises)
Constructor table depending
table depending length - how much differentiation offers the table?

Parameters:
numPosition - - usually and here: 5 standard position classes: early,mid,late,sb,bb 0-4
numCalls - - amount of previous calls by opponents
numRaises - - amount of previous calls by opponents
Method Detail

getProposal

public int[] getProposal(Card[] holeCards,
                         int activePlayers,
                         int smallBlind,
                         int bigBlind,
                         int position,
                         int calls,
                         int raises)
Description copied from interface: IF_StartingHandChart
lookInTable and process proposal

Specified by:
getProposal in interface IF_StartingHandChart
Parameters:
holeCards - - bots hand
activePlayers - - amount of
smallBlind - -
bigBlind - -
position - Position of the player in this hand
(0: first player behind the button; 1: second player behind the button; ...)
calls - - how often was called in this round
raises - - how often was raised in this round
Returns:
action - may be:
-1 (flop)
0 (check/call)
x (some value, depending on blinds and amountOfActiveOpponent
(3*BB + (amountOfActiveOpponent*BB) or 4*BB + (amountOfActiveOpponent*BB)))

getPositionCat

private int getPositionCat(int position,
                           int activePlayers)
maps the absolute position onto the 5 position categories
position categories: early,mid,late,sb,bb - positions start at 0
categories are filled from EARLY to LATE
e.g. 7 players:
0->3(SB); 1->4(BB); 2->0(EARLY); 3->0(EARLY); 4->1(MIDDLE); 5->1(MIDDLE); 6->2(LATE);

Parameters:
position - absolute position of the player in this hand
(0: first player behind the button; 1: second player behind the button; ...)
activePlayers -
Returns:
positionCategory
See Also:
PositionInt

lookInTable

private int lookInTable(Card[] holeCards,
                        int position,
                        int calls,
                        int raises)
looks in the startinghandcharts table for its proposal

Parameters:
holeCards - - own
position - as position class: early,mid,late,sb,bb - positions start at 1
calls - - how often was called in this round
raises - - how often was raised in this round
Returns:
proposal as int

initAllFold

private void initAllFold()
init the table with FOLD everywhere