#261
|
|||
|
|||
Re: Poker Hand XML
[ QUOTE ]
In order to be a bit more productive instead of just complaining here's my take on the chat issue: <font class="small">Code:</font><hr /><pre> <round id="turn"> <deal> <card value="Qd" /> </deal> <actions> <action type="check" playerid="sbrugby" /> <action type="bet" playerid="durrr" amount="150" /> <action type="notice">durrr: zzzzzzz</action> <action type="notice">durrr: z</action> <action type="notice">Dealer: sbrugby has timed out and is given 30s to reconnect</action> <action type="notice">durrr: z</action> <action type="notice">durrr: z</action> <action type="notice">durrr: z</action> <action type="notice">(Observer)noobi: CAN SOME1 TRANSFER ME $5 PLZ?????</action> <action type="notice">Dealer: sbrugby is disconnected and is considered all-in</action> <action type="call" playerid="sbrugby" amount="150" allin="true" /> </actions> </round> </pre><hr /> [/ QUOTE ] An alternative is to have <chat> tags within the <actions> block, that way it can easily be ignored when parsing: <font class="small">Code:</font><hr /><pre> <round id="turn"> <deal> <card value="Qd" /> </deal> <actions> <action type="check" playerid="sbrugby" /> <action type="bet" playerid="durrr" amount="150" /> <chat>durrr: zzzzzzz</chat> <chat>durrr: z</chat> <chat>(Observer)noobi: CAN SOME1 TRANSFER ME $5 PLZ?????</chat> <chat>Dealer: sbrugby is disconnected and is considered all-in</chat> <action type="call" playerid="sbrugby" amount="150" allin="true" /> </actions> </round> </pre><hr /> I still don't see how this complicates anything. The parser simply ignores the <chat> tag if it is uninterested in chat. The converter either puts the chat inside <chat> tags or ignores the chat. Its just a simple matter of allowing <chat> tags in the <actions> block. |
#262
|
|||
|
|||
Re: Poker Hand XML
i think it's a good idea but next concern, but if we take chat as an action how can we handle those chats during non-actions event such as blind and during showdown?
example: PokerStars Game #11326900867: Hold'em Pot Limit ($0.10/$0.25) - 2007/08/05 - 16:53:26 (ET) Table 'Bellona IV' 9-max Seat #4 is the button Mühre5: posts small blind $0.10 Mühre5 said, "nh" jarvol: posts big blind $0.25 *** HOLE CARDS *** [....]` *** SHOW DOWN *** hessi1215: shows [As 4s] (a straight, Ace to Five) Mühre5: mucks hand hessi1215 said, "danke" hessi1215 collected $5 from pot Mühre5 said, "schwein" *** SUMMARY *** Quick solution is to move the chat at the starts of the preflop round actions list and move the last chat at the ends of the river action, but now chat will lost it's relative postion. Other siolution is to ignore that pre/post-game chat ps. i'm not complaining it's better think about all issues right now than too late. that from my quality assurance teacher [img]/images/graemlins/smile.gif[/img] |
#263
|
|||
|
|||
Re: Poker Hand XML
[ QUOTE ]
An alternative is to have <chat> tags within the <actions> block, that way it can easily be ignored when parsing [/ QUOTE ] In order to determine -which- action took place -and- do something different depending on the action we would already be checking any possible value of 'action'. A common way of doing this is a "switch". Basically you can check the contents of 'action', and then do specific things based on its value. There's a generic option called "default" (the name of this depends on which language you use) which performs the same code to anything that's not specifically specified. Ex... Check -> do this. Call -> do that. Bet -> do something. Raise -> and something else. default -> ignore it completely. "chat" or "reads" or anything not specified would be categorized as default, so it would be ignored automatically. |
#264
|
|||
|
|||
Re: Poker Hand XML
You probably started your reply before I edited. Just so it doesn't get unnoticed: I changed the call amount to "0" as it would be the case for all-in protection.
Applications could use this data to collect information on how often someone pulls their cable in big pots. This is not of much use but it is another example of keeping the format open enough for future applications/uses we aren't thinking of right now. |
#265
|
|||
|
|||
Re: Poker Hand XML
The only problem I see with putting optional/non-hand-specific data in-line is that it could get messy at some point.
If we had a <meta></meta> node that contained everything that's not necessary for the hand to play out it might be better off in the long term. An example of some chat could be like: <meta> <chat street="1" insertAt="1" id="2">wee, flopped a set.</chat> <chat street="1" insertAt="3" id="4">liar, I raise.</chat> </meta> Where street is order #, and insertAt is the line where it should be inserted at. This way an app can totally ignore the meta node if it doesn't need extra info. |
#266
|
|||
|
|||
Re: Poker Hand XML
[ QUOTE ]
i think it's a good idea but next concern, but if we take chat as an action how can we handle those chats during non-actions event such as blind and during showdown? example: PokerStars Game #11326900867: Hold'em Pot Limit ($0.10/$0.25) - 2007/08/05 - 16:53:26 (ET) Table 'Bellona IV' 9-max Seat #4 is the button Mühre5: posts small blind $0.10 Mühre5 said, "nh" jarvol: posts big blind $0.25 *** HOLE CARDS *** [....]` *** SHOW DOWN *** hessi1215: shows [As 4s] (a straight, Ace to Five) Mühre5: mucks hand hessi1215 said, "danke" hessi1215 collected $5 from pot Mühre5 said, "schwein" *** SUMMARY *** Quick solution is to move the chat at the starts of the preflop round actions list and move the last chat at the ends of the river action, but now chat will lost it's relative postion. Other siolution is to ignore that pre/post-game chat ps. i'm not complaining it's better think about all issues right now than too late. that from my quality assurance teacher [img]/images/graemlins/smile.gif[/img] [/ QUOTE ] Someone suggested having a round that takes place before the deal where players post blinds and antes. <font class="small">Code:</font><hr /><pre> <round id="predeal"> <action type="ante" playerId="player2" amount="1"/> <action type="ante" playerId="player3" amount="1"/> <action type="ante" playerId="player4" amount="1"/> <action type="postBB" playerId="player2" amount="10"/> <chat>player1: blah blah</chat> </round> </pre><hr /> I think this is a good idea even if chat is not included in the spec. As for chat during showdown, that was one thing i did'nt think of and seem to complicate things a bit. If there is no consistent way to add chat then I think it should'nt be included. |
#267
|
|||
|
|||
Re: Poker Hand XML
Generally, I care less about chat during/after showdown than chat during the hand because chat during the hand can be part of the action (think inducing bluffs).
Optimal, however, would be to include everything that is in the original HH format and that includes chat during/after showdown. |
#268
|
|||
|
|||
Re: Poker Hand XML
About version PokerHandXML 1.3.2, we don't know who is the dealer anymore , we have to bring it back this info [img]/images/graemlins/smile.gif[/img]
the markup "texasholdemhand" should be just "hand" with an attribute for type (HE, O , O8 ,STUD, RAZZ) and attribute for limit (L, NL , PL) Chat is irrelevant at this point , we can add other markup or attribute later. We have to set up a version and stick with it for now. Actual xsd for 1.3.2 <font class="small">Code:</font><hr /><pre> <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="pokerhandxml" type="pokerhandxml"/> <xs:complexType name="pokerhandxml"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="texasholdemhand" type="texasholdemhand"/> </xs:sequence> </xs:complexType> <xs:complexType name="texasholdemhand"> <xs:sequence> <xs:element name="context" type="context" /> <xs:element name="rounds" type="rounds" /> <xs:element name="results" type="results"/> </xs:sequence> </xs:complexType> <xs:complexType name="context"> <xs:sequence> <xs:element name="location"> <xs:complexType> <xs:attribute name="online" type="xs:string" /> <xs:attribute name="room" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="game"> <xs:complexType> <xs:attribute name="id" type="xs:string" /> <xs:attribute name="datetime" type="xs:string" /> <xs:attribute name="betting" type="xs:string" /> <xs:attribute name="format" type="xs:string" /> <xs:attribute name="cap" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="table" type="table" /> </xs:sequence> </xs:complexType> <xs:complexType name="table"> <xs:sequence minOccurs="1"> <xs:element name="player" type="player" /> </xs:sequence> <xs:attribute name="id" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> <xs:attribute name="seats" type="xs:int" /> </xs:complexType> <xs:complexType name="player"> <xs:attribute name="id" type="xs:string" /> <xs:attribute name="stack" type="xs:string" /> <xs:attribute name="seat" type="xs:string" /> </xs:complexType> <xs:complexType name="rounds"> <xs:sequence minOccurs="1"> <xs:element name="forced" type="forced"/> <xs:element name="round" type="round" /> </xs:sequence> </xs:complexType> <xs:complexType name="forced"> <xs:sequence> <xs:element name="smallblind" type="smallblind" /> <xs:element name="bigblind" type="bigblind" /> </xs:sequence> </xs:complexType> <xs:complexType name="smallblind"> <xs:attribute name="playerid" type="xs:float" /> </xs:complexType> <xs:complexType name="bigblind"> <xs:attribute name="playerid" type="xs:float" /> </xs:complexType> <xs:complexType name="round"> <xs:sequence> <xs:element name="deal" type="deal" /> <xs:element name="actions" type="actions" /> </xs:sequence> <xs:attribute name="id" type="xs:string" /> </xs:complexType> <xs:complexType name="deal"> <xs:sequence> <xs:element name="card" type="card" /> </xs:sequence> </xs:complexType> <xs:complexType name="card"> <xs:attribute name="playerid" type="xs:string" /> <xs:attribute name="value" type="xs:string" /> </xs:complexType> <xs:complexType name="actions"> <xs:sequence> <xs:element name="action" type="action" /> </xs:sequence> </xs:complexType> <xs:complexType name="action"> <xs:attribute name="playerid" type="xs:string" /> <xs:attribute name="type" type="xs:string" /> </xs:complexType> <xs:complexType name="results"> <xs:sequence> <xs:element name="cards" type="cards" /> <xs:element name="pots" type="pots" /> </xs:sequence> </xs:complexType> <xs:complexType name="cards"> <xs:sequence> <xs:element name="card" type="card" /> </xs:sequence> </xs:complexType> <xs:complexType name="pots"> <xs:sequence> <xs:element name="pot" type="pot" /> </xs:sequence> </xs:complexType> <xs:complexType name="pot"> <xs:attribute name="playerid" type="xs:string" /> <xs:attribute name="value" type="xs:float" /> <xs:attribute name="number" type="xs:string" /> </xs:complexType> </xs:schema> </pre><hr /> |
#269
|
|||
|
|||
Re: Poker Hand XML
Jerry,
If there is a substantial amount of people who want chat events to be included it can hardly be "irrelevant" unless you value only your own opinions and find those of other people "irrelevant". In that case a team effort project might not be the right place for you. BTW, I haven't heard any good reasons for dropping the chat information. Most seem to argue that we should take shortcuts now because it is too hard to do it right. I concede that instead of producing nothing at all it may be better to produce a marginally useful** XML now. But I think we can get it right and not take shortcuts with minimally more effort and that should be our goal. **marginally useful because it doesn't even cover the requirements of projects existing today, like hand replayers. Not to speak of unknow future uses. |
#270
|
|||
|
|||
Re: Poker Hand XML
TriggerLe, i don't said chat is irrelevant , i said that some markups could be add later , XML stands for eXstensible Markup language , so we can add markup when we need it.
I am not speaking english very well, so my sentences may seems offensive but they aren't. The chat don't bother me. But i'd like , we freeze the basics (blind, dealer , cards , value , flop , round, action ) before adding some extra markup. If we don't freeze a state for the basics, we will be discussing over and over the same things. So i'm a supporter of the baby-step approach. Sorry for bad english, Best regards. |
|
|