Name: _____________________________ 6 Digit StudentID: ___ ___ ___ ___ ___ ___

Worksheet 12: Fish Finding

Texas Hold'em is a poker game with a rich slang. One of many unkind terms is a "fish" which refers to a poor player. It is sometimes said that if you have been playing for a half hour and you can't tell who the fish is, it is you.

Imagine you have gained access to an online casino's computer system with this partial API:

class Participant
    int id();    
class Table
    List<Participant> participants();
class Tuple2<A,B>
    A a();
    B b();
abstract class Action
    Participant participant();
class Check extends Action
class Fold extends Action
class Raise extends Action
    double amount();
class Round
    List<Tuple2<Participant, Tuple2<Card, Card>>> participantHoleCardsPairs();
    List<Action> actions();
class Casino
    List<Table> activeTables();
    List<Round> history();

Imagine further you would like to use this access to make money. You believe you are a skillful player. You decide the best way to win money is to play against poor players. If you could join the tables with the least skillful players, then the money will roll in.

The first step you embark on is to create a map from players to their skill level.

There would be many ways to approach this, but you have decided to target those who play poor hands.

You have written two methods which 1) ranks starting hands. and 2) determines if a player bet their hand:

int rank(Tuple2<Card,Card> holeCards) 
boolean betWasMadeBy(Participant participant, List<Action> actions) 

Author an approach to produce a mapping from all players to their skill level.

Post Lecture

Synthesize today's class session

 

 

What is unclear?