SkillAgentSearch skills...

Oopoker

OOPoker or "Object Oriented Poker" is an engine that runs Texas Hold'm games. You can play against bots, or let bots play against each other. No installer is provided, only the source, because the purpose is that you program your own bots in C++.

Install / Use

/learn @lvandeve/Oopoker
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

OOPoker

.------..------..------..------..------..------..------. |O.--. ||O.--. ||P.--. ||O.--. ||K.--. ||E.--. ||R.--. | | :/: || :/: || :/: || :/: || :/: || (/) || :(): | | :/: || :/: || (__) || :/: || :/: || :/: || ()() | | '--'O|| '--'O|| '--'P|| '--'O|| '--'K|| '--'E|| '--'R| ------'------'------'------'------'------'`------'

Table of Contents:

0 Introduction 1 Terminology 2 Using the program 2.1 System Requirements 2.2 Gameplay 2.3 Battling AIs 2.4 Player Statistics 3 Programming AIs 3.1 Really Quickly Getting Started 3.2 C++, Compiler and IDE. 3.2.1 C++ 3.2.2 Compiler 3.2.3 Language 3.3 Implementing the AI 3.4 Putting your AI in the game 3.5 Utility Functions 3.6 Fast Evaluation (For Win Equity) 3.7 OOPoker Code Overview 3.8 Making a Graphical or Webserver Interface 4 Texas Hold'm Rules 5 Contact Information

//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

Chapter 0: Introduction

OOPoker, or "Object Oriented Poker", is a C++ No-Limit Texas Hold'm engine meant to be used to implement poker AIs for entertainment or research purposes. These AIs can be made to battle each other, or a single human can play against the AIs for his/her enjoyment.

OOPoker is completely open source, it is licensed under GPL 3. It is hosted here: https://github.com/lvandeve/oopoker

Currently only open source C++ code AIs are supported, it doesn't support play over network or through encapsulated protocols at this time.

This program is intended mostly to be used by people who like programming, but it's also possible to enjoy the program without programming by just running it and playing against the built-in AIs.

This manual will explain two things:

-how to use the program to play -how to program and use your own AIs

//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

Chapter 1: Terminology

This chapter explains the terminology used both in the game and in the source code.

Some terms can have multiple confusing meanings in Poker, especially "game", "hand", "bet" and "turn". For that reason, some things are named differently here when possible, to avoid confusion.

Basically, a game of OOPoker is structured like this:

*) A Game = a complete tournament at 1 table. A game exists out of multiple Deals. *) A Deal = dealing the cards. A Deal exists out of multiple Rounds. *) A Round = pre-flop, flop, turn or river. A Round exists out of multiple Turns. *) A Turn = one time going around the table while settling bets. Multiple turns occur if players keep raising. A Turn exists out of multipe Decisions. *) A Decision = an action, one player making a decision during his turn.

Here's the full terminlogy list (alphabetically):

*) Action: choice a player can make: fold, check, call or raise.

*) All-in: action where you put so many chips on the table that your stack becomes empty. Sometimes this is forced (e.g. when the blind was bigger than your stack).

*) Bet: an action where you raise when the call amount was 0. In OOPoker, usually the term raise is used for the action that is normally called "bet" in poker, because mechanically, "bet" and "raise" have the same effect. For example there's an action "A_RAISE" and an event "E_RAISE" that take the role of both bet and raise. If you need to distinguish bet and raise, keep track of the current call amount, when it's 0, it's a bet instead of a raise. However, in the PlayerStats statistics, "bets" and "raises" are separated. To avoid confusion, amounts of chips aren't called "bet", but "wager" instead.

*) Betting Structure: information about the blinds, antes and buy-in amount at this table.

*) Big blind: the chip amount the big blind is, and, the player who is big blind during this deal.

*) Boast: This isn't a real poker term, but this term is used in OOPoker to indicate you show your cards at the end of a deal when it wasn't required. So this is the opposite of "muck".

*) Call: action where you move the minimum required chips to not fold on the table.

*) Call Amount: amount of money you need to move from your stack to the table to call. This is the highest wager on the table minus your current wager.

*) Check: action where you don't have to call and don't raise.

*) Chips: the money, or poker chips, played with.

*) Combination: a 5-card combination, that can form such a combination as full-house, pair, ... A combination can be formed from 7 cards in Texas Hold'm, in that case the best possible 5-card combination is taken. Also, the mathematical combination or binomial coefficient operation.

*) Deal: a single deal of cards and all that comes after it (flop, turn, river, showdown, if the game doesn't end before that at least).

*) Dealer: the player who is dealer (or "the button") during this deal.

*) Decision: a player deciding what Action to do during his turn. Sometimes this is also just called "action", e.g. in the Statistics.

*) Deck: a complete deck of 52 cards.

*) Flop: the second round, when 3 cards are visible on the table.

*) Fold: action where you stop betting for this deal. You can't win the pot anymore.

*) Game: the term "game" refers to the game of poker in general, or this computer game, or the running of the gameplay with Texas Hold'm rules. A game NEVER means a "deal" here, to avoid confusion. A game can mean a complete tournament or a series of deals however.

*) Hand: the two cards you have in your hand

*) Hand card: a card you have in your hand

*) Lap: a lap of the dealer button, e.g. if there are 9 players this is 9 deals

*) Player: one person or AI playing.

*) Pot: the total amount of chips on the table during this deal so far. This is the sum of the bet of all players.

*) Stack: the amount of chips a certain player has.

*) Table: a table with a certain amount of players around it, who are playing poker.

*) Table card: card from the flop, turn or river on the table. Also called the board, or community cards.

*) turn (no caps): A turn of the players. In a turn, each player can choose to fold, raise, etc... During a betting round, there can be multiple turns if players keep raising. Not to be confused with "TURN"!

*) TURN (caps): The Turn, that is, the 3rd round, when the 4th card on the table becomes visible. Not to be confused with "turn"!

*) Round: AKA "betting round". There are maximum 4 betting rounds in a Deal: pre-flop, flop, turn and river.

*) Pre-Flop: the first round, before any cards on the table are visible.

*) Pot: the sum of all wagers on the table.

*) Raise: action where the player bets extra money over the required call amount. The distinction between "betting" and "raising" isn't really made in OOPoker, it's always called "raise".

*) Raise Amount: This terminology isn't from real poker, only relevant in OOPOker. It's the amount of chips placed on top of the Call Amount, to raise. So basically in regular poker this is just "the raise", but in OOPoker sometimes care must be taken if an amount of chips means the raise amount above the call amount, or the total amount of chips you move to the table.

*) River: the 4th and last round, when the 5th card on the table becomes visible.

*) Showdown: when multiple players are still not folded after the river, they show their cards to determine the winner with the best combination. The showdown stage occurs after the river, only if multiple players are still active.

*) Small blind: the chip amount the small blind is, and, the player who is small blind during this deal.

*) Wager: The amount of chips that a player moved to the table (in the pot) during this deal so far. The sum of all wagers, is the pot.

//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

Chapter 2: Using the program

2.1 System Requirements

*) Works on most computers, no special graphics hardware or fastest processor is needed *) Operating System: Windows or Linux *) Free disk space when using the logger (it's enabled by default). When emulating 10000's of games, the log file tends to become quite big.

2.2 Gameplay

The program currently works in a terminal window. When the program starts, a few choices appear about the game type, the size of the buy-in, blinds, etc...

The game type choices are as follows:

*) human + AI's: play as human against multiple AI opponents *) human + AI heads-up: play as human against a single AI opponent *) AI battle: multiple AI's will play, at the end a winner will be declared. The human being can observe. *) AI battle heads-up: two AI's will play against each other, at the end a winner will be declared. The human being can observe.

Next, you can choose a win condition, either the last surviver at the table wins, or players can rebuy and there is a fixed amount of turns.

Due to the way the terminal input is programmed for this menu, you can hit keystrokes in a row to quickly start a certain type of game. E.g. if you hit "3 2 1" in a row, an AI battle with 100 fixed roun

Related Skills

View on GitHub
GitHub Stars73
CategoryDevelopment
Updated6h ago
Forks15

Languages

C++

Security Score

95/100

Audited on Apr 9, 2026

No findings