StormChart (Call)

As promised here a preview on our third an most valuable statistics.
(Fold vs Call… Call vs Raise will come in the next post)

It shows if a player is tight or loose or if he is holding strictly to a strategy (forseeable actions) or tries to disguise his hands…

The graphics are not yet very nice as we just finished the back end programming, but they serve the purpose.

Call StormCharts

To test these Charts, each AI had to play over 500.000 games (12 player table like on July 3rd). Slight adjustments were done to them so the overall ranking from now on is different than the previous ones. The many games from this simulation show clearly that the AI belong to different groups of strength levels:
Hephaistos (775k), Vulcanos (762k), Fortuna (751k), Hades (743k), Pluto (737k), Tyche (719k) — Flora (518k), Saturn (507k), Kronos (488k), Janus (485k), Ares (400k), Mars (332k), Nemesis (316k), Victoria (317k), Merkur (314k), Bellona (313k), Hermes (310k), Hera (274k), Nike (273k), Juno (237k), Luna (229k), Selene (192k), Zeus (119k), Uranus (90k), Athene (66k), Jupiter (57k), Minerva (56k), Apollo (38k), Aurora (-25k), Somnus (-33k), Eos (-40k), Morpheus (-53k) — Always Fold Test AI (-123k) — Faunus (-254k), Pan (-298k), Aphrodite (-306k), Venus (-307k), Neptun (-414k), Poseidon (-428k), Furiae (-571k), Erinyen (-628k), Helios (-646k), Sol (-682k) — Eros (-915k), Cupido (-928k) — Dionysos (-1650k), Bacchus (-1720k)

Debugging the Main Frame

In one of the previous posts, error prevention was mentioned.

While running each sub function through thousands of test cases proves very effective with most of the classes, this procedure is quite problematic on the main frame.
On one hand there are simply too many possible states that would need testing (the few thousand states of each subfunction must be combined with those of all other subfunctions). A shear brute force evaluation (testing every combination) would need ages.
On the other hand, most state combinations must be discarded in advance (a player can not act after he folded… a player can not check after another raised… etc), otherwise the brute force protocol would show millions of caught exeptions that are irrelevant (and the real problems would dissapear below that enormous amount of junk).

So debugging the main frame needs other tactics: Continuous monitoring of critical values and double check results with different calculation algorithms.
See the following examples.

  • The bank system is monitoring how much money is located on each table (by regarding only what is withdrawn on buy-in and what is deposited when a player leaves a table). The dealer is monitoring the same amount (by regarding only the stack of each player and the pot). These two values are compared at each round (and must be identical).
  • When no game is active (all money is located at the bank, none at the tables), the sum of all bank accounts must be 0.
  • The statistics of each player (number of folds/calls/raises or wins/losses) must correspond in their sum to the number of played games (this is even calculated per round, taking in count that later rounds have lower numbers due to folds or early wins)

This is not a fail safe check as not all possible combinations are tested… but only the examples above can already detect most calculation errors handling the money andstatistical numbers… and as they are widely interconnected with the game engine, this gets checked, too. So the blind spots can be widely decreased by (1) adding monitoring programs wherever reasonable and (2) running as many games in simulation mode as possible.

As quality control is held very high at, every time an exception flag is shown, its debugging gets prioritized over whatever new functions are currently being developed.
Since the alpha phase started in march, the list on open issues from exception flags was a constant pain in the a…, sometimes new issues came up way faster than old ones got solved. But yesterday the last known exception on this list was cleared and a test run of 500.000 games (12 player table pot limit, 120.000 games per AI) got through without a single flag coming up.
This does not mean, we are finished (there are still many functions that need to be developed for the final version and every step can create new exceptions), but getting rid of this additional weight lifts the moral and frees much energy for the next steps.


P.D: Here the ranking of Gen-1 AIs after this new test run (to be compared to the 8 player table results last week): Janus (303k), Flora (289k), Hephaistos (258k), Merkur (238k), Tyche (228k), Hades (227k), Fortuna (224k), Hermes (220k), Vulcanos (210k), Pluto (189k), Saturn (180k), Kronos (174k), Selene (167k), Luna (153k), Minerva (125k), Juno (124k), Bellona (103k), Hera (101k), Athene (97k), Nike (95k), Victoria (76k) Ares (58k), Uranus (50k), Apollo (44k), Nemesis (36k), Zeus (15k), Somnus (7k), Mars (-4k), Morpheus (6k), Eos (-16k), Aurora (-26k), Always Fold Test AI (-30k), Jupiter (-52k), Pan (-53k), Faunus (-54k), Aphrodite (-144k), Venus (-145k), Sol (-186k), Helios (-200k), Poseidon (-227k), Neptun (-261k), Erinyen (-274k), Furiae (-289k), Eros (-337k), Cupido (-360k), Bacchus (-608k), Dionysos (-626k)

AI Generation 1

The Poker Trainer will have oponents, whose artificial intelligence is grouped in “generations” (defining their skills and difficulty levels). This allows beginning players to succeed in entry levels but encounter gradually increased difficulty in higher levels until getting AIs in expert levels that are quite challenging even for professionals.

The first generation (Gen-1) is a very basic AI developed for tables where beginners can learn the game. Some AIs are too passive, some are too aggressive, some are too tight and some are too loose. They keep their static properties not only during a game but for a lifetime so the beginning player can learn their behaviour and develop optimized counter strategies (adaptive AIs will be introduced with Gen-2).

Gen-1 AIs are named after greek and roman gods and we tried to adjust their parameters (e.g. aggressive/passive or tight/loose) according to their characteristics: the godfathers Zeus/Jupiter are quite aggressive while the gods of wine Bacchus/Dionysos play like drunk (passive and loose).

Here the actual 46 Gen-1 AIs. They are ordered according to their performance in an extensive test run (they played around 30.000 games each) on an 8 player table pot limit hold’em (buy in 100, blinds 1/2).

  1. Flora (97360) – Roman Goddess of Flowers
  2. Tyche (88050) – Greek Goddess of Fortune (see 7.)
  3. Vulcanos (84640) – Roman God of Fire (see 5.)
  4. Janus (81110) – Roman God of Gates
  5. Hephaistos (81000) – Greek God of Fire (see 3.)
  6. Pluto (79660) – Roman God of the Underworld (see 10.)
  7. Fortuna (65940) – Roman Goddess of Fortune (see 2.)
  8. Hermes (64410) – Greek Messenger of the Gods (see 14.)
  9. Bellona (61880) – Roman Goddess of War
  10. Hades (53920) – Greek God of the Underworld (see 6.)
  11. Kronos (52260) – Greek God of Harvests (see 19.)
  12. Luna (46120) – Roman Goddess of Moon (see 13.)
  13. Selene (42180) – Greek Goddess of Moon (see 12.)
  14. Merkur (40570) – Roman Messenger of the Gods (see 8.)
  15. Ares (40120) – Greek God of War (see 18.)
  16. Nike (39190) – Greek Goddess of Victory (see 17.)
  17. Victoria (39070) – Roman Goddess of Victory (see 16.)
  18. Mars (36660) – Roman God of War (see 15.)
  19. Saturn (21630) – Roman God of Harvests (see 11.)
  20. Nemesis (18640) – Roman Goddess of Retribution
  21. Jupiter (12920) – Roman King of Gods (see 24.)
  22. Juno (10970) – Roman Goddess of Marriage (see 23.)
  23. Hera (10490) – Greek Goddess of Marriage (see 22.)
  24. Zeus (7680) – Greek King of Gods (see 21.)
  25. Apollo (6500) – Greek/Roman God of Music and Medicine
  26. Athene (5860) – Greek Goddess of Wisdom (see 27.)
  27. Minerva (5220) – Roman Goddess of Wisdom (see 26.)
  28. Morpheus (-6950) – Greek God of Dreams (see 31.)
  29. Always-Fold Test AI (-11050)
  30. Eos (-18780) – Greek Goddess of Dawn (see 33.)
  31. Somnus (-20470) – Roman God of Sleep (see 28.)
  32. Neptun (25170) – Roman God of the Sea (see 37.)
  33. Aurora (-26050) – Roman Goddess of Dawn (see 30.)
  34. Pan (-33580) – Greek God of Woods (see 35.)
  35. Faunus (-36670) – Roman God of Woods (see 34.)
  36. Uranus (-36910) – Greek/Roman God of the Sky
  37. Poseidon (-42240) – Greek God of the Sea (see 32.)
  38. Venus (-47320) – Roman Goddess of Love (see 40.)
  39. Furiae (-49990) – Roman Avenging Spirit (see 42.)
  40. Aphrodite (-60030) – Greek Goddess of Love (see 38.)
  41. Helios (-63260) – Greek Sun God (see 43.)
  42. Erinyen (-73150) – Greek Avenging Spirit (see 39.)
  43. Sol (-74640) – Roman Sun God (see 41.)
  44. Eros (-97160) – Greek God of Love (see 45.)
  45. Cupido (-92250) – Roman God of Love (see 44.)
  46. Dionysos (-15235) – Greek God of Wine (see 47.)
  47. Bacchus (-159430) – Roman God of Wine (see 46.)

Each AI exists twice for analysis on statistical variance. The pairs can be spotted by the different names of the same god (Zeus/Jupiter, Neptun/Poseidon, Aphrodite/Venus, Eros/Cupido).

Statistic Screen 2

While the ranking list was already implemented in the alpha build two weeks ago, the screen showing trend curve and action overview was not finished until this week.
This second screen will be hidden while a player is still playing the beginner tables and is enabled when he passes to intermediate level.

Trend Curve

The screen appears on selection of any player within the ranking list and gives a more detailed view of his actions and how he performed in the past.

Statistic Screen 1

I hoped to be able to present you all 3 statistic screens at once but developement slowed down as (1) we are currently facing major downtimes (free time is mainly used to watch the Euro Championship) and (2) debugging proved to be much harder than any previous code as the statistics have quite a few more interfaces to the existing classes than previous code.

To prevent long periods in between updates, I hereby present the already existing statistic screens.


The first screen is a simple ranking list (which exists for each game mode by separate) that shows you where you are compared to the artificial intelligences (and how each of them performes).
This screen will be available right after installing the game.

Dynamic User Interface is ready

Until now, the screen was adjusted to iPhone 6 only, making it impossible to play on devices with a lower screen resolution and leaving lots of unused space on bigger screens.
Now it adapts to each device… a 6 player table on iPhone 4 and 5, 8 players on iPhone 6/6+, up to 12 players on most iPad and even 16 players are possible on iPad Pro.


The spartanic screens may still look quite rough, but they serve the purpose  to test the game engine, where the main focus of this app lies (and I do not see much good in binding our resources in developing fancy graphics while there is still much work left on more important functions)

User Interface Overview

Note: for information about the content of the game engine screen, see this older post.

Welcome, Rex

The poker trainer app just got a mascot: Rex, the octopus.

Why an octopus?
After large sessions of brainstorming (with truckloads of good whisky), cephalopodes seemed to be unarguably the best choice for a poker bot.
– highly intelligent
– multiple long arms (perfect for dealing)
– unequaled in the domain of disguising and bluffing
– can be very aggressive
– in some cases will leave you dead on the floor (and certain death for fishes)

Why “Rex”?
As our head engineer is constantly travelling (10 month a year, up to 3 continents per month), a mascot of pocket size had to be found.
Unfortunately the final choice was a cute fellow with short arms, instantly reminding everyone of the “T-Rex” (a nickname for those coming late to poker sessions as they have to sit on the far outer rims of the table).



Write your own AI

The poker trainer app was initially written as analysis tool for poker statistics and theories.
It takes very long to test a theory in real life, as many games are required to overcome the statistical variance. But if the theoretic basis is coded into an AI, a simulation can run this against many other AIs (parallel or older versions of the same theory as well as other theories) through several millions of games so that a difference in the outcome becomes significantly visible.
Winning AIs will be used for further improvements, loosing AIs will be discarded.

The following template is the base interface for AIs to run on our poker trainer platform.

AI_Template v01

Pocket Win Probabilities

Calculating the exact win probabilities of each pocket hand is getting close to impossible when too many opponents are sitting on the table (a game with 2 players has only around 3 billion possible combinations after the river, thats a number with 12 digits… a game with 16 players has 8 quindecillion possible combinations on the showdown, a number with 48 digits).

But an estimation is easy with a Monte Carlo Simulation: A program generates random hands for each player several million times, checks whom of them has the best hand and calculates the average winning rates until the numbers reach stable values… after each million hands the average is recalculated and compared to the last results, if the values do not change any more (except slightly somewhere behind the comma) the final result is reached.

The attached document shows win probabilities for each pocket hand on tables with 2-16 players (1 to 15 opponents).

Poker Cards (Monte Carlo Simulation)
(document updated on April 09 2016)

As in the last publications, the mathematical background is in German. But the relevant content (the numerical tables) can be used by everyone without problem, even if you are not speaking this language.

Note that these numbers are only valid if each player stays in the game until the showdown. Usually bad hands have an even lower win probability as they are often folded before the showdown (so they won’t win even if the best hand would come up in turn and river) which gives good hands a higher probability than shown in these tables…