Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #31  
Old 07-31-2007, 02:17 PM
advis0r advis0r is offline
Member
 
Join Date: Apr 2007
Location: Southern Germany
Posts: 99
Default Re: Poker Hand XML

i think Dates are a small problem:

http://www.w3.org/TR/NOTE-datetime (according to ISO 8601)
[ QUOTE ]
1994-11-05T08:15:30-05:00 corresponds to November 5, 1994, 8:15:30 am, US Eastern Standard Time.

1994-11-05T13:15:30Z corresponds to the same instant.

[/ QUOTE ]
personally i dislike the added T for readability, but with either 'T' or a space this should be the date format to use, which includes timezones.


we really have to get readability, parseablity etc in a priority order to be able to determine if we want XML or not.

when a application like HoldemManager converts a HH to the standardformat, should it keep the original file ?
If so, for what tasks does it use which format?
Is it a good idea to store the same information twice and having code to parse both?

if a user wants to show a hand to a friend, what format does he copy/paste into the instant messenger?

should he be required to paste a different format into a HandHistory Converter website then?
Reply With Quote
  #32  
Old 07-31-2007, 02:44 PM
rvg72 rvg72 is offline
Senior Member
 
Join Date: Jun 2005
Location: Canada
Posts: 2,342
Default Re: Poker Hand XML

[ QUOTE ]
when a application like HoldemManager converts a HH to the standardformat, should it keep the original file ?

[/ QUOTE ]

I think so... I keep both right now. Some apps will choose to not support this new format we come up with so having the original makes sense for my app anyways.

[ QUOTE ]
if a user wants to show a hand to a friend, what format does he copy/paste into the instant messenger?

[/ QUOTE ]

Either the new format which his friend can then pop into the tool of his choice or perhaps a tool is built that converts the xml represenation into an IM friendly version. I think that's where people like Tickner come in.

rvg
Reply With Quote
  #33  
Old 07-31-2007, 03:14 PM
Tickner Tickner is offline
Senior Member
 
Join Date: Mar 2006
Posts: 3,554
Default Re: Poker Hand XML

Yes, right now poker hands can be converted to text.

Also, LegoPoker is currently working on a PokerHand.org type system where users can opt to save their converted hands to a webpage and pass around the link. This will support both the new XML and the raw HHs.
Reply With Quote
  #34  
Old 07-31-2007, 03:37 PM
UnknownName3 UnknownName3 is offline
Junior Member
 
Join Date: May 2007
Posts: 13
Default Re: Poker Hand XML

It might be more useful to break down <cards> into <card> for each card dealt to each player (or community cards).

This will probably be better for supporting stud based games.
Instead of
<cards type="Pocket" player="lolourgay">C2 C8</cards>

Use:
<card hidden="N" rank="K" suit="S">
or
<card hidden="Y">

2. Is type supposed to represent an action such as [check, bet, raise, call, fold]?
Reply With Quote
  #35  
Old 07-31-2007, 04:00 PM
jaminbird jaminbird is offline
Senior Member
 
Join Date: Jan 2005
Location: The other side of the tubes
Posts: 954
Default Re: Poker Hand XML

I don't think it's necessary to be concerned with "other game" compatibility at this point. Obviously one of the elements is going to identify game type; therefore, programs that use the XML can simply parse such games according to different rules.
Reply With Quote
  #36  
Old 07-31-2007, 04:03 PM
jakrpanda jakrpanda is offline
Member
 
Join Date: Jan 2007
Posts: 53
Default Re: Poker Hand XML

[ QUOTE ]

So, one question should be, does the standard format need to be xml? There are some inherent advantages to doing it in xml but I'm not convinced either way at this point.


[/ QUOTE ]


Well the entire reason XML was created was to make a standard for describing data in a text format. Sure we could stuff more data into a smaller footprint, but if space is an issue with hand history text files then we got a big problem. We should be looking at a binary format if that's the case. I think it's a non issue.

I say the negatives of XML are outweighed by the positives. Standard parser implementations, industry standard for textual representation and data exchange, etc.
Reply With Quote
  #37  
Old 07-31-2007, 04:07 PM
pokergrader pokergrader is offline
Senior Member
 
Join Date: Apr 2005
Posts: 3,792
Default Re: Poker Hand XML

The more I think about it you are right. XML is probably the way to go. And the XML parsers for C++ and Java are just so fast and easy to use.

And as far as human readability is concerned, shortly after this is finalized I'm sure somebody will make something that will convert from the PokerHandXML to BBCode or Pokerstars/FT/PartyPoker format, so that doesn't even need to be an issue.

Because to me the creation of PokerHandXML isn't about human readability at all, it is a way to open the door for developers to write poker applications without having to write 15 different parsers.
Reply With Quote
  #38  
Old 07-31-2007, 04:39 PM
jakrpanda jakrpanda is offline
Member
 
Join Date: Jan 2007
Posts: 53
Default Re: Poker Hand XML

I'm working on a first draft using some hand history files I have. I figure maybe I can keep the ball rolling by posting this when I'm done.

But after looking at the iPoker XML format posted I have a question - do we need to have entries for cards that are dealt to other players and never exposed to us?

They have entries for each player's hole cards, yet only one entry has actual values and the others simply have xx because they are unknown. I think these are irrelevant, but is there a case I'm missing where these would be known up front?
Reply With Quote
  #39  
Old 07-31-2007, 05:21 PM
jakrpanda jakrpanda is offline
Member
 
Join Date: Jan 2007
Posts: 53
Default Re: Poker Hand XML

I had some free time today, so here is a very rough draft below.


<font class="small">Code:</font><hr /><pre>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;pokerhand&gt;

&lt;gameinformation&gt;
&lt;gametype&gt;Texas Hold-em&lt;/gametype&gt;
&lt;gamestakes&gt;$1.00+$0.20&lt;/gamestakes&gt;
&lt;gamenumber&gt;11082740019&lt;/gamenumber&gt;
&lt;tournamentnumber&gt;56210298&lt;/tournamentnumber&gt;
&lt;tablenumber&gt;56210298 1&lt;/tablenumber&gt;
&lt;datetime&gt;Tuesday, 2007-07-31T11:38-5&lt;/datetime&gt;
&lt;/gameinformation&gt;

&lt;seats&gt;
&lt;seat number="1" player="player1" chips="1500" button="true"/&gt;
&lt;seat number="2" player="player2" chips="1500" button="false"/&gt;
&lt;seat number="3" player="player3" chips="1500" button="false"/&gt;
&lt;seat number="4" player="player4" chips="1500" button="false"/&gt;
&lt;seat number="5" player="player5" chips="1500" button="false"/&gt;
&lt;seat number="6" player="player6" chips="1500" button="false"/&gt;
&lt;seat number="7" player="player7" chips="1500" button="false"/&gt;
&lt;seat number="8" player="player8" chips="1500" button="false"/&gt;
&lt;seat number="9" player="player9" chips="1500" button="false"/&gt;
&lt;/seats&gt;

&lt;blinds&gt;
&lt;smallblind&gt;10&lt;/smallblind&gt;
&lt;bigblind&gt;20&lt;/bigblind&gt;
&lt;/blinds&gt;

&lt;round number="1"&gt;
&lt;cards&gt;
&lt;card id="1" player="player1" pocket="true" value="As"/&gt;
&lt;card id="2" player="player1" pocket="true" value="Ac"/&gt;
&lt;/cards&gt;
&lt;actions&gt;
&lt;action order="1" player="player4" type="bet" wager="40"/&gt;
&lt;action order="2" player="player5" type="fold"/&gt;
&lt;action order="3" player="player6" type="fold"/&gt;
&lt;action order="4" player="player7" type="raise" wager="80"/&gt;
&lt;action order="5" player="player8" type="fold"/&gt;
&lt;action order="6" player="player9" type="fold"/&gt;
&lt;action order="7" player="player1" type="raise" wager="120"/&gt;
&lt;action order="8" player="player2" type="fold"/&gt;
&lt;action order="8" player="player3" type="fold"/&gt;
&lt;action order="8" player="player4" type="fold"/&gt;
&lt;action order="9" player="player7" type="call" wager="40"/&gt;
&lt;/actions&gt;
&lt;/round&gt;

&lt;round number="2"&gt;
&lt;cards&gt;
&lt;card id="1" pocket="false" value="Ah"/&gt;
&lt;card id="2" pocket="false" value="5c"/&gt;
&lt;card id="3" pocket="false" value="Th"/&gt;
&lt;/cards&gt;
&lt;actions&gt;
&lt;action order="1" player="player1" type="bet" wager="1380"/&gt;
&lt;action order="2" player="player7" type="fold"/&gt;
&lt;/actions&gt;
&lt;/round&gt;

&lt;summary&gt;
&lt;totalpot&gt;280&lt;/totalpot&gt;
&lt;rake&gt;0&lt;/rake&gt;
&lt;seats&gt;
&lt;seat number="1"&gt;player1 won (160)&lt;/seat&gt;
&lt;seat number="2"&gt;player2 folded before the flop&lt;/seat&gt;
&lt;seat number="3"&gt;player3 folded before the flop&lt;/seat&gt;
&lt;seat number="4"&gt;player4 folded before the flop&lt;/seat&gt;
&lt;seat number="5"&gt;player5 folded before the flop&lt;/seat&gt;
&lt;seat number="6"&gt;player6 folded before the flop&lt;/seat&gt;
&lt;seat number="7"&gt;player7 folded on the flop&lt;/seat&gt;
&lt;/seats&gt;

&lt;/summary&gt;

&lt;/pokerhand&gt;
</pre><hr />


Any input? Anything missing? I may find more interesting things as I play out some hands and alter the format. It's just a start. I also can supply an XSD to validate this if anyone wants it.

A note on the XML above - if an attribute was "optional" and offered no value I removed it. For instance the flop cards don't have a player because they are community cards. One could use this attribute to say player="community" but that's probably something best left to the implementors and their specific cases.
Reply With Quote
  #40  
Old 07-31-2007, 05:34 PM
mikechops mikechops is offline
Senior Member
 
Join Date: Aug 2005
Posts: 2,168
Default Re: Poker Hand XML

I think you could probably coactenate the card values so hole cards were ... value = "Ac Ad" instead of two separate lines. Similarly for the flop.

The button could be a separate line in the seats node. It seems a little wasteful to have an atribute for each player saying whether or not he was the dealer.

I think it's worth having each players profit/loss from the hand for validation purposes. I'd say this is more important than when they actually folded.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.