Does anyone remember the Connect Four AI competition I held.. umm.. more than 5 years ago?
Connect Four: The Tournament Results
Anyway, I remembered that competition today and I thought it would be fun to hold another. This time the game is Poker... or a simplified version of it.
Rules
- Each player is dealt a hand, which is a uniformly random real number between 0 and 1.
- The highest number wins
- The first player has to bet 1, which is the big blind.
- The players then makes their decisions: check, fold or raise
- When every player has either checked or folded, the player with the highest number takes the pot
- Regular Hold'em rules apply for all-in
- The data type of money is integer.
Code
To enter the contest, implement the following function:
Where the struct GameInfo looks like this:Code:int make_bet(int my_id, float my_hand, const GameInfo& game_info) { return INT_MAX; //Always all-in }
To check, the function make_bet must return (curr_max_bet - has_bet[my_id]). A smaller bet will be converted into a fold. A bet higher than money[my_id] will be converted to all-in.Code:struct GameInfo { int num_players; int* money; //Chip count for each player (including myself) bool* has_folded; //What players are still in play int* has_bet; //What each player has betted int curr_max_bet; //Current highest bet };
You may use static variables to allocate lots of memory to keep track of your opponents previous moves. This page will probably be edited as people as questions etc.
Please write in this thread if you plan to enter, so that others know whether this is worth spending time on. The deadline for submissions is April 1st by PM.