Here's a gory report of some technical internals of my app. If Java or concurrent programming bores you, avert your eyes.
Yesterday I completed the mechanism to detect the user's Full Tilt Poker hand history. I'm pleased with the result. It gave me a chance to give the java.util.concurrency API a good work out. I have the interesting challenge of keeping the GUI responsive while performing some processor intensive parsing. I got to write a simple implementation of Google's MapReduce algorithm too.
Here's what happens: my Poker stats app scans for hand history files in the ~/Documents/HandHistory folder, which is where Full Tilt Poker writes its hand history, unless instructed otherwise. This folder can be changed in the preferences.
A background thread is launched to monitor this folder. Any file that has either not been parsed yet, or has changed in file size since last parsed is added to a list of files to be parsed. This process is repeated every 10 seconds. To be precise, it is repeated 10 seconds after the end of the previous scan. Through careful monitoring I've proven that this regular scanning causes no discernible ongoing load on the system.
The list of files needing scanning is then sent to the parser. I've used every trick I know to make the parser fast. On my dual core 2.4 Ghz Mac Book Pro, it currently rips through the hand history files at the rate of about 2500 hands per second, although it sometimes peaks at 4000 hands per second. On a multi-CPU or multi-core processor, my MapReduce implementation creates multiple parsing threads, so this rate could feasibly be much higher. I'll have to find a way to test this on a machine with more than 2 cores.
As soon as all the hands in a file are parsed, the GUI is notified to update, via the Observer pattern. Newest files are parsed first, so that upon start-up the most recent statistics appear immediately, whereas the older stats may take a few seconds to appear.
The Poker Copilot Blog
Tracking the development of Poker Copilot, Mac OS X software for poker analysis and statistics.
Saturday, 31 May 2008
Poker Stats: Auto-detecting Full Tilt Poker Hand History
Subscribe to:
Post Comments (Atom)
Poker Copilot Translation Project
Want to use Poker Copilot in your language? Then help with the Poker Copilot Translation Project.
About This Blog
In May 2008 I started working on Poker Copilot, initially as a product to help me with my own poker playing. Soon I joined a "30-day Challenge", where the participants each aimed to launch a software product in 30 days. As a result of this challenge, Poker Copilot version 1.0 was launched in July 2008.
This blog tracks the ongoing development of Poker Copilot. Who would find this blog interesting? People interested in 1-person software development, in Poker, or in both.
Contact me via email at steve at pokercopilot dot com.
This blog tracks the ongoing development of Poker Copilot. Who would find this blog interesting? People interested in 1-person software development, in Poker, or in both.
Contact me via email at steve at pokercopilot dot com.
Blog Archive
-
►
2012
(96)
-
►
May
(13)
- Lock Poker News
- What do MP, EP, CO mean in the positional stats?
- Adding a new Ongame Network poker room to Poker Co...
- Adding a new Merge Network poker room to Poker Cop...
- PokerStars on iPad and Poker Copilot
- Lock Poker and Poker Copilot
- Phil Gordon's Little Gold Book and Poker Copilot's...
- Poker Copilot 3.10 Now Available
- Crushing the Microstakes and Poker Copilot's HUD
- Early Access Version of the next Poker Copilot Upd...
- How many hands do I need for Poker Copilot's HUD t...
- Coming soon: PFR by position, Aggression by street...
- Comments on this Blog
-
►
April
(18)
- Important information from 2+2 : Two Plus Two Foru...
- Coming in the next update: VPIP by position
- A Nice Email…in French
- Poker Copilot Tip: Move HUD Panels without the Ful...
- Update for Winamax Users
- Poker Copilot 3.08 Now Available
- Poker Copilot Blog: 1000+ blog posts
- Poker Copilot and Zoom Poker: Update
- Poker Copilot 3.07 Now Available
- A poker player uses Poker Copilot to improve
- Coming in the next update: FALSE filters
- Mockup of Potential Poker Copilot Dashboard Concep...
- A Poker Copilot work-around for Merge Network idio...
- Poker Copilot App Updating
- Carbon Poker has its own HUD! (but only on Windows...
- Improving Poker Copilot's App Updating
- Poker Copilot 3.06 Now Available
- False Assumptions
-
►
March
(18)
- How NOT to make money as a software company
- Zoom Poker HUD Early Access Edition
- Changes to the Poker Copilot Hand Formatter
- Coming in the Next Update: Zoom Stats can be separ...
- Poker Copilot and Zoom Poker: played my first sess...
- The Absurdity of Modern Life: Facebook claims trad...
- Poker Copilot and Zoom Poker: Progress Update
- What character is that?
- PokerStars screen names
- Poker Copilot and Zoom Poker
- Poker Copilot 3.05 Now Available
- Ongame and Table Size
- Updated Poker Copilot User Guide
- Coming in the next Update: Unopened PFR Statistic
- Poker Copilot 3.04 Now Available
- Google Analytics Update: Almost a Good Graph
- Poker Copilot Website in Russian
- Downloading Older Poker Copilot Updates
-
►
May
(13)
-
▼
2008
(184)
-
▼
May
(16)
- Poker Stats: Auto-detecting Full Tilt Poker Hand H...
- Poker Stats: What's in a Name?
- Poker Stats: Banished the Calculating Bugs
- Poker Stats: Side-by-Side Screenshot
- Poker App: Finished the parser
- Poker App: Some Progress
- Making Dialogs in Java Close When Escape is Presse...
- How can I Format Java Code with Blogger?
- Poker Stats: Getting the Mac Feel Right
- Poker Stats: More Decisions Made
- Poker Stats: The Accidental Genesis of my Poker St...
- Poker Stats: Mac, Windows, or both?
- And now a screenshot
- The App is called...
- Amusing sign-up policy
- 30 Days to Launch a New Software Application
-
▼
May
(16)


0 comments:
Post a Comment