Fred Fickleberry III
Fred Fickleberry III

Reputation: 2529

How exactly does sharkscope or PTR data mine all those hands?

I'm very curious to know how this process works. These sites (http://www.sharkscope.com and http://www.pokertableratings.com) data mine thousands of hands per day from secure poker networks, such as PokerStars and Full Tilt.

Do they have a farm of servers running applications that open hundreds of tables (windows) and then somehow spider/datamine the hands that are being played?

How does this work, programming wise?

Upvotes: 19

Views: 17482

Answers (5)

john mcaree
john mcaree

Reputation: 19

I'm not sure how it works but I have an application id and a key- which you get as a gold or silver subscriber- sign up for a month and send them an email and you will get access and the API documentation.

Upvotes: -1

Dave
Dave

Reputation: 101

maybe I can help. I play poker, run a HUD, look at the stats and am a software developer.

I've seen a few posts on this suggesting it's done by OCR software grabbing the screen. Well, that's really difficult and processor hungry, so a programmer wouldn't choose to do that unless there were no other options. Also, because you can open multiple windows, the poker window can be hidden or partially obscured by other things on the screen, so you couldn't guarantee to be able to capture the screen.

In short, they read the log files that are output by the poker software.

When you install your HUD like Sharkscope or Jivaro etc, than they run client software on your PC. It reads the log files and updates its own servers with every hand you play.

Most poker software is similar, but lets start with Pokerstars, as thats where I play. The Poker software outputs to local log files for every action you/it makes. It shows your cards, any opponents cards that you see plus what you do. eg. which button you have pressed, how much you/they bet etc. It posts these updates in near real time and timestamps the log file.

You can look at your own files to see this in action. On a PC do this (not sure what you do on a Mac, but will be similar) 1. Load File Explorer 2. Select VIEW from the menu 3. Select HIDDEN ITEMS so that you can see the hidden data files 4. Goto C:\Users\Dave\AppData\Local\PokerStars.UK (you may not be called DAVE...) 5. Open the PokerStars.log.0 file in NOTEPAD 6. In Notepad, SEARCH for updateMyCard 7. It will show your card numerically 3c for 3 of Clubs 14d for Ace of Diamonds

You can see your opponents cards only where you saw them at the table.

Here is a few example lines from the log file.

OnTableData() round -2
:::TableViewImpl::updateMyCard() 8s (0) [2A0498]
:::TableViewImpl::updateMyCard() 13h (1) [2A0498]
:::TableViewImpl::updatePlayerCard() 7s (0) [2A0498]
:::TableViewImpl::updatePlayerCard() 14s (1) [2A0498]
[2015/12/13 12:19:34]

cheers, hope this helps Dave

Upvotes: 10

Brent Morrow
Brent Morrow

Reputation: 1064

There are a few options. I've been researching it since I wanted to implement some of this functionality in a web app I'm working on. I'll use PokerStars for example, since they have, by far, the best security of any online poker site.

First, realize that there is no way for a developer to rip real time information from the PokerStars application itself. You can't access the API. You can, though, do the following:

Screen Scraping/OCR

PokerStars does its best to sabotage screen/text scraping of their application (by doing simple things like pixel level color fluctuations) but with enough motivation you can easily get around this. Google AutoHotkey combined with ImageSearch.

API Access and XML Feeds

PokerStars doesn't offer public access to its API. But it does offer an XML feed to developers who are pre-approved. This XML feed offers:

  • PokerStars Site Summary - shows player, table, and tournament counts

  • PokerStars Current Tournament data - files with information about upcoming and active tournaments. The data is provided in two files:

    • PokerStars Static Tournament Data - provides tournament information that does not change frequently, and
    • PokerStars Dynamic Tournament Data - provides frequently changing tournament information
  • PokerStars Tournament Results - provides information about completed tournaments. The data is provided in two files:

    • PokerStars Tournament Results – provides basic information about completed tournaments, and
    • PokerStars Tournament Expanded Results – provides expanded information about completed tournaments.
  • PokerStars Tournament Leaders Board - provides information about top PokerStars players ranked using PokerStars Tournament Ranking System

  • PokerStars Tournament Leaders Board BOP - provides information about top PokerStars players ranked using PokerStars Battle Of Planets Ranking System

  • Team PokerStars – provides information about Team PokerStars players and their online activity

It's highly unlikely that these sites have access to the XML feed (or an improved one which would provide all the functionality they need) since PokerStars isn't exactly on good terms with most of these sites.

This leaves two options. Scraping the network connection for said data, which I think is borderline impossible (I don't have experience with this so I'm not sure; I've heard it's highly encrypted and not easy to tinker with, but I'm not sure) and, mentioned above, screen scraping/OCR.

Option #2 is easy enough to implement and, with some work, can avoid detection. From what I've been able to gather, this is the only way they could be doing such massive data mining of PokerStars (I haven't looked into other sites but I've heard security on anything besides PokerStars/Full Tilt is quite horrendous).

[edit] Reread your question and realized I didn't unambiguously answer it.

Yes, they likely have a massive amount of servers running watching all currently running tables, tournaments, etc. Realize that there is a decent amount of money in what they're doing.

This, for instance, could be how they do it (speculation):

Said bot applications watch the tables and data mine all information that gets "posted" to the chat log. They do this by already having a table of images that correspond to, for example, all letters of the alphabet (since PokerStars doesn't post their text as... text. All text in their software is actually an image). So, the bot then rips an image of the chat log, matches it against the store, converts the data to a format they can work with, and throws it in a database. Done.

[edit] No, the data isn't sold to them by the poker sites themselves. This would be a PR nightmare if it ever got out, which it would. And it wouldn't account for the functionality of these sites, which appears to be instantaneous. OPR, Sharkscope, etc. There are, without a doubt, applications running that are ripping the data real time from the poker software, likely using the methods I listed.

Upvotes: 28

Has QUIT--Anony-Mousse
Has QUIT--Anony-Mousse

Reputation: 77485

Well, they have two choices:

  • they spider/grab the data without consent. Then they risk being shut down anytime. The poker site can easily detect such monitoring at this scale and block it. And even risk a lawsuit for breach of the terms of service, which probably disallow the use of robots.
  • they pay for getting the data directly. This saves a lot of bandwidth (e.g. not having to load the full pages, extraction, updates with html changes etc.) and makes their business much less risky (legally and technically).

Guess which one they more likely chose; at least if the site has been around for some time without being shut down every now and then.

Upvotes: 1

John Carter
John Carter

Reputation: 7005

I've thought about this, and have two theories:

The "sniffer" sites have every table open, AND:

  1. Are able to pull the hand data from the network stream. (or:)
  2. Are obtaining the hand data from the GUI (screen scraping, pulling stuff out via the GUI API).

Alternately, they may have developed/modified clients to log everything for them, but I think one of the above solutions is likely simpler.

Upvotes: 1

Related Questions