|
#1
|
|||
|
|||
Poker Hand XML
Anyone following the Hold'em Manager thread will understand the need for this thread. It's plain and simple. Poker Hands need an "official" XML representation. I am willing to take part in its construction and I will need your help with it. We should use this thread to share ideas and etc, until we can find a suitable XML representation of any poker hand (should work for online and offline hands - universal is key here).
I really need to go to bed but I look forward to getting spending a good chunk of time tomorrow researching XML standards, schemas, and practices. Hopefully some of you will join me in this. With the influx of poker applications as of late - this is becoming a necessity. |
#2
|
|||
|
|||
Re: Poker Hand XML
As long as this is finalized in a reasonable amount of time then HM will use whatever format is agreed upon. Hopefully this thread has legs because this really needs to happen.
rvg |
#3
|
|||
|
|||
Re: Poker Hand XML
I-Poker's looks solid. Why not settle on that since it's one less site that would need to be converted from?
|
#4
|
|||
|
|||
Re: Poker Hand XML
[ QUOTE ]
I-Poker's looks solid. Why not settle on that since it's one less site that would need to be converted from? [/ QUOTE ] I'm not a big fan of their format... I don't like how they use action ID's instead of the actual play (ie Type="1" instead of saying "posted small blind") and I also hate how they post action out of order and use an Action Number instead. for example: <action no="2" player="abc" type="2" sum="$0.50"/><action no="3" player="def" type="2" sum="$0.50"/><action no="1" player="ghi" type="1" sum="$0.25"/> This really means: ghi posted small blind of 0.25 abc posted big blind of 0.50 def posted big blind of 0.50 rvg |
#5
|
|||
|
|||
Re: Poker Hand XML
Fair points, but if you want a universal format that's easy for humans to read, then maybe xml isn't the answer?
|
#6
|
|||
|
|||
Re: Poker Hand XML
[ QUOTE ]
Fair points, but if you want a universal format that's easy for humans to read, then maybe xml isn't the answer? [/ QUOTE ] What about PokerStars? IMO it's human readable quite well. -Andrzej |
#7
|
|||
|
|||
Re: Poker Hand XML
[ QUOTE ]
<action no="2" player="abc" type="2" sum="$0.50"/><action no="3" player="def" type="2" sum="$0.50"/><action no="1" player="ghi" type="1" sum="$0.25"/> This really means: ghi posted small blind of 0.25 abc posted big blind of 0.50 def posted big blind of 0.50 [/ QUOTE ] One thing that you have to realise concerning xml is that you should never ever make any xml standard that is positional depending. If you have an action section like this: <hand> starting stack info, handnumber etc..... <preflopaction> <blind> <player1 kind=sb>$0.10</player1> <player2 kind=bb>$0.20</player2> <player3 kind=lb>$0.20</player3> The sequence of the above <player1>, <player2> and <player3> are not required to be in exactly that order, if they are it is not xml. No order is to be infered by the sequence, it has to be inferred by the attributes, in this case the kind attribute where sb is small blind, lb is live blind. |
#8
|
|||
|
|||
Re: Poker Hand XML
some questions that need to be answered:
- should it be easily readable by humans? - does filesize matter? (bloated xml tags?) - do you want to automatically validate if a HH is in a correct format? (xml schema) - do you want to be able to create other forms of representation automatically i.e. BB Code, back to PokerSites-individual Formats (XSLT) - should it only support flop/turn/river games (holdem, omaha) or others too (stud, 5 card draw?) - should it allow references to earlier defined info? i.e. one currency tag ($,€,t) on top and only numbers later or seat info earlier with Playernames, and later only use seatnumbers to identify players? - how do you deal with different information, order, detail in Pokersites own formats? - regarding the creation of real-life-hhs: how much typing do you have to do? - does tag order in XML matter to you? (what JavaNut mentioned) |
#9
|
|||
|
|||
Re: Poker Hand XML
[ QUOTE ]
One thing that you have to realise concerning xml is that you should never ever make any xml standard that is positional depending. If you have an action section like this: <hand> starting stack info, handnumber etc..... <preflopaction> <blind> <player1 kind=sb>$0.10</player1> <player2 kind=bb>$0.20</player2> <player3 kind=lb>$0.20</player3> The sequence of the above <player1>, <player2> and <player3> are not required to be in exactly that order, if they are it is not xml. No order is to be infered by the sequence, it has to be inferred by the attributes, in this case the kind attribute where sb is small blind, lb is live blind. [/ QUOTE ] Maybe this used to be true, but it's certainly not still the case, as "sequence" is one of the compositors available in the XML Schema specification. jb |
#10
|
|||
|
|||
Re: Poker Hand XML
How about something like this? I tried to keep things minimal without screwing up the readability too bad.
I tried to do the following: 1) Reduce redundancy. 2) Keep it clean and easy to follow. 3) Didn't include things that could be figured out through code (like the pot size on each street or the specific player name on each street, because we already defined that once). This is what a specific hand would look like: <font class="small">Code:</font><hr /><pre> <hand date="00/00/0000 00:00:00pm" site="Poker Stars" number="#0000000000" currency="$" type="Cash" seats="6" game="Texas Holdem" blinds="5/10"> <players> <seat position="1" name="Jack" stack="1000"> <seat position="2" name="Jill" stack="1000"> <seat position="3" name="Jim" stack="1000" holecards="Kd Qd"> <seat position="4" name="Jane" stack="1000"> <seat position="5" name="Joe" stack="1000"> <seat position="6" name="Julie" stack="1000"> </players> <action> <street order="1"> <position="1" action="Fold" value="0"> <position="2" action="Fold" value="0"> <position="3" action="Raise" value="35"> <position="4" action="Call" value="35"> <position="5" action="Fold" value="5"> <position="6" action="Fold" value="10"> </street> <street order="2" board="3d Kh Td"> <position="3" action="Bet" value="60"> <position="4" action="Call" value="60"> </street> <street order="3" board="3d Kh Td Jc"> <position="3" action="Bet" value="205"> <position="4" action="Call" value="205"> </street> <street order="4" board="3d Kh Td Jc 2d"> <position="3" action="Bet" value="525"> <position="4" action="Call" value="525"> </street> <showdown> <position="3" hand="[Kd Qd] Td 3d 2d (King-high Flush)" result="win"> <position="4" hand="[3c 3h] 3d Kh Jc (Three of a kind)" result="muck"> <award position="3" value="1660" rake="5"> </showdown> </action> </hand> </pre><hr /> As for things like play money or jackpots, this would be included in the "type" as optional data if it's included in the actual hand history. Example, a jackpot cash game could be set as: type="Cash(Jackpot)" It's also rigged to easily support other game types or table sizes. Edit: If we didn't care at all about file size and wanted to increase human readability we could introduce a new attribute to the "street" elements. It could be labeled as "alias". This alias would hold terms associated with the game. A line might look like this for holdem: <street alias="river" order="4" board="3d Kh Td Jc 2d"> |
|
|