Skip to content

Commit 08d0651

Browse files
committed
Add new and expand type requirements of certain optional fields; Improve showdown action description;
1 parent 88db3bd commit 08d0651

File tree

6 files changed

+118
-70
lines changed

6 files changed

+118
-70
lines changed

changelog.rst

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Changelog
2+
=========
3+
4+
Version 0.0.1 (September 19, 2024)
5+
----------------------------------
6+
7+
**Added**
8+
9+
- Optional fields: ``venue``, ``time_zone_abbreviation``, ``winnings``, ``currency_symbol``.
10+
11+
**Changed**
12+
13+
- Improved description of showdown actions.
14+
- Add ``String`` native TOML type as valid type for ``hand`` and ``table`` optional fields.
15+
16+
Version 0.0.0 (April 5, 2024)
17+
-----------------------------
18+
19+
**Initial Release**

conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
project = 'Poker Hand History File Format Specification'
1010
copyright = '2024, Juho Kim'
1111
author = 'Juho Kim'
12-
release = '0.0.0'
12+
release = '0.0.1'
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
discussion
2424
conclusion
2525
contributing
26+
changelog
2627

2728
Indices and tables
2829
==================

optional.rst

+54-30
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,38 @@ Optional Fields
33

44
The optional fields may be left unspecified by the annotator. The complete list of optional fields and their TOML native types are tabulated below.
55

6-
============================================================== ======================== ===========================
7-
Field Name TOML Native Type
8-
============================================================== ======================== ===========================
9-
Annotator full name or mononym ``author`` String
10-
Event name ``event`` String
11-
Event or organizer URL ``url`` String
12-
Venue street-level address ``address`` String
13-
Venue city ``city`` String
14-
Venue region, state, or province ``region`` String
15-
Venue postal code ``postal_code`` String
16-
Venue country ``country`` String
17-
Timestamp at the start of the hand ``time`` Local time
18-
`IANA time zone <https://www.iana.org/time-zones>`_ ``time_zone`` String
19-
Event day ``day`` Integer
20-
Event month ``month`` Integer
21-
Event year ``year`` Integer
22-
Hand number ``hand`` Integer
23-
Tournament level ``level`` Integer
24-
Players' seat numbers ``seats`` Array of integers
25-
The number of seats ``seat_count`` Integer
26-
Table number ``table`` Integer
27-
Player full names or mononyms ``players`` Array of strings
28-
Final stacks ``finishing_stacks`` Array of integers or floats
29-
`ISO 4127 <https://www.iso.org/standard/64758.html>`_ currency ``currency`` String
30-
Ante uniformity ``ante_trimming_status`` Boolean
31-
Allocated time per action ``time_limit`` Integer or float
32-
Time banks at the beginning of the hand ``time_banks`` Array of integers or floats
33-
============================================================== ======================== ===========================
6+
============================================================== ========================== ===========================
7+
Field Name TOML Native Type
8+
============================================================== ========================== ===========================
9+
Annotator full name or mononym ``author`` String
10+
Event name ``event`` String
11+
Event or organizer URL ``url`` String
12+
Venue ``venue`` String
13+
Venue street-level address ``address`` String
14+
Venue city ``city`` String
15+
Venue region, state, or province ``region`` String
16+
Venue postal code ``postal_code`` String
17+
Venue country ``country`` String
18+
Timestamp at the start of the hand ``time`` Local time
19+
`IANA time zone <https://www.iana.org/time-zones>`_ ``time_zone`` String
20+
Time zone abbreviation ``time_zone_abbreviation`` String
21+
Event day ``day`` Integer
22+
Event month ``month`` Integer
23+
Event year ``year`` Integer
24+
Hand name or number ``hand`` String or integer
25+
Tournament level ``level`` Integer
26+
Players' seat numbers ``seats`` Array of integers
27+
The number of seats ``seat_count`` Integer
28+
Table name or number ``table`` String or integer
29+
Player full names or mononyms ``players`` Array of strings
30+
Final stacks ``finishing_stacks`` Array of integers or floats
31+
Winnings ``winnings`` Array of integers or floats
32+
`ISO 4127 <https://www.iso.org/standard/64758.html>`_ currency ``currency`` String
33+
Currency symbol ``currency_symbol`` String
34+
Ante uniformity ``ante_trimming_status`` Boolean
35+
Allocated time per action ``time_limit`` Integer or float
36+
Time banks at the beginning of the hand ``time_banks`` Array of integers or floats
37+
============================================================== ========================== ===========================
3438

3539
Author
3640
------
@@ -52,6 +56,11 @@ URL
5256

5357
The ``url`` field contains a string URL relevant to the event. This field is particularly important for online poker hands where the venue might not be a physical location. Still, the annotator may choose to specify a relevant URL to the organizer's website or tournament website for physical poker hands, as well. The link should be prefixed with substrings like ``http://`` or ``https://`` to denote the internet communication protocol.
5458

59+
Venue
60+
^^^^^
61+
62+
The ``venue`` field contains a string value that may or may not include the name of the venue in which the hand was played (e.g. online poker rooms).
63+
5564
Address
5665
^^^^^^^
5766

@@ -82,13 +91,18 @@ Time
8291

8392
The ``time`` field should contain the approximate time the hand began as a TOML native local time without the timezone information.
8493

85-
If the ``time_zone`` field is defined, the time is assumed to be of that time zone. Otherwise, if every one of the following three fields -- ``city,`` ``region,`` and ``country`` -- are defined, it is assumed that the time is in the local time zone of the location of the hand. If the two previous conditions are not satisfied, the time is assumed to be in Coordinated Universal Time (UTC).
94+
If the ``time_zone`` and/or ``time_zone_abbreviation`` field(s) is/are defined, the time is assumed to be of that/those. Otherwise, if every one of the following three fields -- ``city,`` ``region,`` and ``country`` -- are defined, it is assumed that the time is in the local time zone of the location of the hand. If the two previous conditions are not satisfied, the time is assumed to be in Coordinated Universal Time (UTC).
8695

8796
Time Zone
8897
^^^^^^^^^
8998

9099
The ``time_zone`` field contains a value of type string and must represent an IANA time zone in the latest version of the `IANA time zone <https://www.iana.org/time-zones>`_ database available like ``America/Toronto``.
91100

101+
Time Zone Abbreviation
102+
^^^^^^^^^^^^^^^^^^^^^^
103+
104+
The ``time_zone_abbreviation`` field contains a value of type string and must represent a time zone abbreviation like ``EDT`` or ``UTC``.
105+
92106
Day
93107
^^^
94108

@@ -133,7 +147,7 @@ The ``seat_count`` field denotes the number of seats and must have an integer va
133147
Table
134148
^^^^^
135149

136-
The ``table`` field denotes the table number the hand is played in, as an integer value. Typically, these are counted from ``1``.
150+
The ``table`` field denotes the table name or number the hand is played in, as a string or an integer value. If numbered, these are typically counted from ``1``.
137151

138152
Miscellaneous Fields
139153
--------------------
@@ -150,11 +164,21 @@ The ``finishing_stacks`` field denotes the final stacks as an array of non-negat
150164

151165
The description of finishing stacks is helpful as the parser may not be aware of the granularity of the currency the chips are in or the rake applied in the end. For example, dollars can be broken down to cents whereas Japanese Yen must be of an integral value. On top of this, in a physical setting where chips are used, depending on the denominations, odd chip situations may arise where the player out of position is given the extra odd chip that cannot be broken further. It is, of course, infeasible to describe all the different chip values each player has in a poker hand history format. These inaccuracies are inherent drawbacks of using purely numerical representations to describe the stack values. It is worth noting that the inconsistencies caused by such circumstances only lead to extremely minor ambiguities in the final stack sizes that should not significantly impact the expected value calculations.
152166

167+
Winnings
168+
^^^^^^^^
169+
170+
The ``winnings`` field denotes the winnings (i.e. collected pots) as an array of non-negative integers or floats. It may also be specified for a non-terminal hand history file, which can be interpreted as the winnings after all the action notations are applied (not very useful since winnings are zeros while the hand is ongoing). If rakes are applied the winnings should denote the post-rake values.
171+
153172
Currency
154173
^^^^^^^^
155174

156175
The ``currency`` field denotes what currency the chips are in. The value must be of string and be one of three letter currency values in the `ISO 4127 <https://www.iso.org/standard/64758.html>`_ standard.
157176

177+
Currency Symbol
178+
^^^^^^^^^^^^^^^
179+
180+
The ``currency_symbol`` field denotes the symbol of the currency the chips are in. The value must be a single-character string like ``"$"``.
181+
158182
Ante Trimming Status
159183
^^^^^^^^^^^^^^^^^^^^
160184

required.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ The ``min_bet`` field, a positive integer or a float, denotes the minimum bet in
146146
Starting Stacks
147147
^^^^^^^^^^^^^^^
148148

149-
The ``starting_stacks`` field denotes the starting stacks of each player and is an array of positive integers or floats of length equal to the number of players. All stack sizes must strictly be non-zero. Unknown stack values can be denoted as ``null``.
149+
The ``starting_stacks`` field denotes the starting stacks of each player and is an array of positive integers or floats of length equal to the number of players. All stack sizes must strictly be non-zero. Unknown stack values can be denoted as ``inf`` (i.e. an infinite value).
150150

151151
State Progression
152152
-----------------
@@ -237,7 +237,7 @@ This action represents completion, betting, or raising to a positive integral or
237237
Showing/Mucking Hole Cards
238238
^^^^^^^^^^^^^^^^^^^^^^^^^^
239239

240-
The showdown action is performed at the end of the hand or after all players go all-in. It represents showing of the hole cards to try to win the pot or after an all-in, or mucking of the hole cards. This action accepts an optional argument of cards which, if supplied, must all be known. The omission of this field represents mucking while the inclusion represents showing.
240+
The showdown action is performed at the end of the hand or after all players go all-in. It represents either the showing of the hole cards to try to win the pot, after an all-in, or after all other players fold or the mucking of the hole cards signifying the player's forfeiture on his or her stake of the pot. This action accepts an optional argument of cards. The omission of this argument represents mucking while the inclusion represents showing. If a hand is part of a tournament and the player elects to show, all his/her hole cards must be known (note that in all-in situations, active players are forced to show their hand). If it is a cash-game, then some or all of the cards in the argument may be unknown (e.g. ``??Ad``) to denote that the player chose to both not muck their hand and not show their hole cards (partially or completely).
241241

242242
No-operations
243243
^^^^^^^^^^^^^

0 commit comments

Comments
 (0)