GithubHelp home page GithubHelp logo

hhsmithy / pokerhandhistoryparser Goto Github PK

View Code? Open in Web Editor NEW
72.0 18.0 34.0 2.7 MB

Used to parse hand-histories poker hand-histories to extract information such as limits, game-types, players, stack-sizes, hand actions etc.

Home Page: https://www.hhsmithy.com

C# 100.00%

pokerhandhistoryparser's Introduction

Poker Hand History Parser

C# .NET library for parsing poker hand-histories.

What can it be user for?

Parsing hand-histories is a common task in most 3rd party poker projects, however it has many edge cases, formats and is very tedious. The hand-parser was written to take poker hand-history text logs and parse summary information and/or hand-action information without having to deal with all the headaches. The parser was designed to be fairly fast, and in some places this may have affected code read-ability, however there are extensive unit tests.

Site Support

The poker hand-history parser currently supports the following sites:

  • Poker Stars (.com / .fr / .it / .es)
  • Full Tilt Poker
  • Party Poker
  • On Game (.com / .fr / .it)
  • IPoker
  • Merge
  • 888
  • Microgaming
  • Winimax
  • Winning Poker
  • Boss Media
  • Entraction (deprecated)

Format Support

  • Cash games (2 to 10 players)
  • Zoom (Poker Stars Only)

Game Type Support

  • No Limit Hold'em
  • Cap No Limit Hold'em
  • Fixed Limit Hold'em
  • Pot Limit Hold'em
  • Pot Limit Omaha
  • Fixed Limit Omaha
  • Omaha Eight of Better

Future Upgrades

  • Single and multi-table tournament support
  • Ongoing support

Documentation

See the documentation.

License

The MIT License

Copyright (c) 2014 "Luke" Kader Belbina

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pokerhandhistoryparser's People

Contributors

bewareofwombat avatar italytoast avatar lukebelbina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pokerhandhistoryparser's Issues

Not supporting "Run It Twice"

Example Hand:
PokerStars Hand #122549687621: Omaha Pot Limit ($2/$4 USD) - 2013/06/12 11:08:24 ET
Table 'Benkoela II' 6-max Seat #3 is the button
Seat 1: Player1 ($400 in chips)
Seat 3: Player2 ($200 in chips)
Seat 4: Player3 ($400 in chips)
Player2: posts small blind $2
Player1: posts big blind $4
*** HOLE CARDS ***
Player2: raises $8 to $12
Player3: calls $10
Player1: calls $8
*** FLOP *** [5h 5c Tc]
Player3: checks
Player1: checks
NewPlayer joins the table at seat #5
Player2: bets $24
Player3: raises $41 to $65
Player1: folds
Player2: raises $135 to $200 and is all-in
straate joins the table at seat #6
Player3: calls $140
*** FIRST TURN *** [5h 5c Tc] [Ac]
*** FIRST RIVER *** [5h 5c Tc Ac] [9d]
*** SECOND TURN *** [5h 5c Tc] [6s]
*** SECOND RIVER *** [5h 5c Tc 6s] [2d]
*** FIRST SHOW DOWN ***
Player3: shows [Kd Td 5d Jc](a full house, Fives full of Tens)
Player2: shows [8c Qd 5s Jd](three of a kind, Fives)
Player3 collected $200 from pot
*** SECOND SHOW DOWN ***
Player3: shows [Kd Td 5d Jc](a full house, Fives full of Tens)
Player2: shows [8c Qd 5s Jd](three of a kind, Fives)
Player3 collected $200 from pot
*** SUMMARY ***
Total pot $400 | Rake $1.50
Hand was run twice
FIRST Board [5h 5c Tc Ac 9d]
SECOND Board [5h 5c Tc 6s 2d]
Seat 1: Player1 (big blind) folded on the Flop
Seat 3: Player2 (button) showed [8c Qd 5s Jd] and lost with three of a kind, Fives, and lost with three of a kind, Fives
Seat 4: Player3 (small blind) showed [Kd Td 5d Jc] and won ($200) with a full house, Fives full of Tens, and won ($200) with a full house, Fives full of Tens

Unable to parse Play Money hands

Pacific Play Money Hand:

Game No : 523689209

***** 888poker Hand History for Game 523689209 *****
1/2 Blinds No Limit Holdem - *** 13 10 2014 19:34:01
Table Naperville 6 Max (Practice Play)
Seat 4 is the button
Total number of players : 2
Seat 4: st3sp5 ( 1ย 430 )
Seat 7: koch38 ( 368,55 )
st3sp5 posts small blind [1]
koch38 posts big blind [2]
** Dealing down cards **
st3sp5 calls [1]
koch38 raises [2]
st3sp5 calls [2]
** Dealing flop ** [ 5d, 4d, Dh ]
koch38 checks
st3sp5 bets [2]
koch38 calls [2]
** Dealing turn ** [ Kd ]
koch38 bets [2]
st3sp5 calls [2]
** Dealing river ** [ 2c ]
koch38 bets [2]
st3sp5 raises [6]
koch38 calls [4]
** Summary **
st3sp5 shows [ 3h, 6d ]
koch38 mucks [ 9h, Ks ]
st3sp5 collected [ 26,60 ]

Error with raise adjusting on preflop

Hand: HandActionTests/3BetHand.txt
PokerStars Game #109681406367: Hold'em No Limit ($0.05/$0.10 USD) - 2014/01/06 7:23:59 ET
Table 'Skat III 100-250 bb, Ante' 6-max Seat #3 is the button
...
Tunks2: posts small blind $0.05
Nightfox82: posts big blind $0.10
*** HOLE CARDS ***
Asaki1: folds
Player_L: folds
H6U5r: raises $0.20 to $0.30
....

When this hand is parsed the preflop raises is not adjusted to the big blind and is instead parsed as a RAISE of 0.30.

PokerStars canceled hand does not parse

PokerStars Hand #110222853693: Omaha Pot Limit ($5/$10 USD) - 2014/01/16 13:17:20 CET [2014/01/16 7:17:20 ET]
Table 'Idelsonia III' 6-max Seat #6 is the button
Seat 6: lautie ($1467.77 in chips)
lautie: posts small blind $5
Valorian: is sitting out
Hand cancelled
*** SUMMARY ***
Seat 6: lautie (button) collected ($0)

NuGet package restore

Enable package restore for the solutions and commit the packages.config files. This will make it possible to pull and build the solution immediately.

Winning Network: Problematic hand

Game started at: 2014/10/28 22:1:11
Game ID: 328556048 1/2 Wichita Falls 1/2 - 2 (Hold'em)
Seat 4 is the button
Seat 4: Player1 (92.25).
Seat 5: Player2 (67.25).
Player Player1 has small blind (1)
Player Player2 sitting out
Uncalled bet (1) returned to Player1
------ Summary ------
Pot: 0. Rake 0
Player Player1 does not show cards.Bets: 0. Collects: 0. Wins: 0.
Player Player2 does not show cards.Bets: 0. Collects: 0. Wins: 0.
Game ended at: 2014/10/28 22:1:12

This is a cancelled hand on the winning network, what is the best way to handle this?

Localization issues with Winamax

WinamaxFastParserImpl dont use "System.Globalization.CultureInfo.InvariantCulture" for line:
var amount = decimal.Parse(handLine.Substring(amountStartIndex + 1, handLine.Length - amountStartIndex - 2));

Abandoned?

If you're the maintainer
Is this still being maintained?
Do you have anything in mind for this library going forward?
If not would you mind me taking over the development of the library? (which is kinda what have happened already, except its harder to find my fork)

If you're not the maintainer
I've been doing a lot of work in the fork here (200 commits ahead at time of writing).

Features:

  • more sites: Pokermaster, Winning (the new format)
  • diffrent kind of parsers: Fast, LineCat, JSON
  • seperate data structure for winners
  • update to .net standard

Plans:

  • Removing Exceptions as much as possible (better performance)
  • Implement parsing with spans instead of strings when we get .NET 5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.