BBO Discussion Forums: BML - Markup language for Full Disclosure - BBO Discussion Forums

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3

BML - Markup language for Full Disclosure A way to create Full Disclosure (bss) files easier

#41 User is offline   skaftij 

  • PipPip
  • Group: Members
  • Posts: 33
  • Joined: 2007-July-07
  • Gender:Male
  • Location:Denmark
  • Interests:Travel, Fishing

Posted 2012-August-19, 06:01

View Postnige1, on 2012-May-12, 12:53, said:

Kungsgeten, your BML seems great. Suggestions
As well as a BML->BSS it would be useful to have a BSS -> BML program[*]Then you could offer BML to BBO as an alternative to BSS. With automatic interconversion, BBO could allow members to use either format


Yes, reverse engineering would be nice, making a BML file from FD.

View Postnige1, on 2012-May-12, 12:53, said:

Later you could write conversion programs to HTML and WBF system-card format


It would be nice not to lose comments. That happens now when you convert to FD and publish using downagain's upload.
http://bridge.downag...e/FD/public.php

View Postnige1, on 2012-May-12, 12:53, said:

OK OK yes I know: If you put a broom up your arse, you could also sweep the floor :)

Let's do that! Let's assume that the ressources are available, to enhance the parts of BBO that deal with Bidding systems development and training.
Requirements:
  • Capture explanations at the table. When playing or practising bidding online, capture explanations at the table and store in systemfile. The explanations are to be accepted/modified (see below).
  • History. When playing or practising bidding, make a cross-reference between the resulting lin file and the system. Reviewing at later stage can help remembering system. This feature can also be the fundament for statistics. Make it possible to save comments related to each deal/auction.
  • Review. Incorporate a review feature, similar to Windows Word that allows accept/reject of PD's suggestions. When changes are accepted, audit trail should be made so that changes can be tracked. The idea is to support commitment to changes.
  • Quiz. Run a bidding tool in a "quiz mode", exercising those auctions that tend to me hard to remember. Selecting auctions could be based on the auction being marked as tricky, or it could be based on historical data, that is, let the tool present bids that have not occured during online training or play.
  • Challenge the Champs. Prepare lin files with hands bid (and played) by great players for bidding pratice or play. Save result as described above.


Thanks Kungsgeten! I like BML.
If I have made this specific agreement, then I will keep the agreement.
A partner can convince me to play nearly anything, but if partner breaks agreements, then you will fairly fast reach the point, that I wont be interested in playing any longer. Stick to your agreements.
Marlowe (Uwe Gebhardt)
0

#42 User is offline   kgr 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,432
  • Joined: 2003-April-11

Posted 2012-August-23, 14:07

This:
5 card majors, 4c!d and 15-17NT
COPY COMP_Module 
(D) test
 p to play, 6c!h
 R transfer !h, will play in suit responder
(2H) test
 D competitive
 2N relay
 3c to play
 3d to play
 2s to play  (guessing partners suit)
 4D transfer !s
  4h test
 4s to play (guessing partners suit)
ENDCOPY
2D; ART. Multi Weak !h or !s, GF !c or !d, SF !h or !s, 22-23, 24-25
 PASTE COMP_Module

Results in:
*00{//48}=NYYYYYY
005=NYYYYYY008card majors, 4c!d and 15-17NT
002D=YYYYYYY008Multi Weak !h or !s, GF !c or !d, SF !h or !s, 22-23, 24-25
002DD=NYYYYYYtest
002DDP=NYYYYYYto play, 6c!h
002DDR=NYYYYYYtransfer !h, will play in suit responder
002DP2H=NYYYYYY008test
002DP2HD=NYYYYYYcompetitive
002DP2HP2N=NYYYYYY0relay
002DP2HP3C=NYYYYYY008to play
002DP2HP3D=NYYYYYY008to play
002DP2HP2S=NYYYYYY008to play  (guessing partners suit)
002DP2HP4D=NYYYYYY008transfer !s
002DP2HP4DP4H=NYYYYYY008test
002DP2HP4S=NYYYYYY008to play (guessing partners suit)

A Pass is inserted in some bidding sequence (see before 2H)

Remark: It would actually be good if not competitive modules could be copied into competitive sequences.
E.g: 1C-(D)-1H = transfer spades & then copy not competitive 1C-1S followup module.
This could be done by always requiring brackets for competitive bids. If no brackets are found then insert a pass?

Maybe this is somehow intended by the above reported "issue" :) ?
0

#43 User is offline   Kungsgeten 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 943
  • Joined: 2012-April-15
  • Gender:Male

Posted 2012-August-24, 02:54

Quote

It would be nice not to lose comments. That happens now when you convert to FD and publish using downagain's upload.
http://bridge.downag...e/FD/public.php

What do you mean by comments? Do you mean comments started with // ? In that case, those are not parsed when converting to BSS, so the BSS file does not know about them.

kgr: A problem I can see in the BML you posted is that you only have one "header row" describing the system. There should be two rows; the first sets the name of the system and the second gives a description. To always require parantheses when the opponents bid might be a good idea! Right now I'm working on a website designed for bid training, but I'll look into it later. Here's how I would (probably) write the code you posted:

Short club
5 card majors, 4c!d and 15-17NT

COPY COMP_Module 
(D) test
 p to play, 6c!h
 R transfer !h, will play in suit responder
(2H) test
 D competitive
 2N relay
 3c to play
 3d to play
 2s to play  (guessing partners suit)
 4D transfer !s
  (P) // I guessed there should be a pass here
    4h test
 4s to play (guessing partners suit)
ENDCOPY
2D; ART. Multi Weak !h or !s, GF !c or !d, SF !h or !s, 22-23, 24-25
 PASTE COMP_Module

0

#44 User is offline   skaftij 

  • PipPip
  • Group: Members
  • Posts: 33
  • Joined: 2007-July-07
  • Gender:Male
  • Location:Denmark
  • Interests:Travel, Fishing

Posted 2012-August-24, 03:17

View PostKungsgeten, on 2012-August-24, 02:54, said:

What do you mean by comments? Do you mean comments started with // ? In that case, those are not parsed when converting to BSS, so the BSS file does not know about them.


Yes of course, please disregard. I was mixing up BSS and BML.
If I have made this specific agreement, then I will keep the agreement.
A partner can convince me to play nearly anything, but if partner breaks agreements, then you will fairly fast reach the point, that I wont be interested in playing any longer. Stick to your agreements.
Marlowe (Uwe Gebhardt)
0

#45 User is offline   kgr 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,432
  • Joined: 2003-April-11

Posted 2012-August-27, 14:50

View PostKungsgeten, on 2012-August-24, 02:54, said:

kgr: A problem I can see in the BML you posted is that you only have one "header row" describing the system. There should be two rows; the first sets the name of the system and the second gives a description. To always require parantheses when the opponents bid might be a good idea! Right now I'm working on a website designed for bid training, but I'll look into it later. Here's how I would (probably) write the code you posted:
..

here is complete in and output:
Input:
Test
5 card majors, 4c!d and 15-17NT
COPY COMP_Module 
(D) test
 p to play, 6c!h
 R transfer !h, will play in suit responder
(2H) test
 D competitive
 2N relay
 3c to play
 3d to play
 2s to play  (guessing partners suit)
 4D transfer !s
  4h test
 4s to play (guessing partners suit)
ENDCOPY
2D; ART. Multi Weak !h or !s, GF !c or !d, SF !h or !s, 22-23, 24-25
 PASTE COMP_Module

Output:
*00{Test}=NYYYYYY5 card majors, 4c!d and 15-17NT
002D=YYYYYYY008Multi Weak !h or !s, GF !c or !d, SF !h or !s, 22-23, 24-25
002DD=NYYYYYYtest
002DDP=NYYYYYYto play, 6c!h
002DDR=NYYYYYYtransfer !h, will play in suit responder
002DP2H=NYYYYYY008test
002DP2HD=NYYYYYYcompetitive
002DP2HP2N=NYYYYYY0relay
002DP2HP3C=NYYYYYY008to play
002DP2HP3D=NYYYYYY008to play
002DP2HP2S=NYYYYYY008to play  (guessing partners suit)
002DP2HP4D=NYYYYYY008transfer !s
002DP2HP4DP4H=NYYYYYY008test
002DP2HP4S=NYYYYYY008to play (guessing partners suit)

0

#46 User is offline   kgr 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,432
  • Joined: 2003-April-11

Posted 2012-August-30, 07:59

Hello Kungsgeten,
The reason for the issue reported in my previous post is:
- _contested is set to False when ';' in bid
- copies are set apart until paste, but '(' are already removed.
=> <a paste of a contested auction after an initial bid containing ";"> does not work because the program will not know it is contested.
Note: It works if I include the contested overcall immediately after the initial bid iso in the COPY section.
Suggestion:
It would be ideal if there would be a way to switch off the contested flag in the bml language. F.i. add a parameter in the COPY command (NO_CONTESTED). This could then insert 'P' for the definitions in this COPY section instead of assuming that it is still contested.
I could then COPY the same RKC module (with NO_CONTESTED) after a contested or an uncontested auction.
Thanks,
Koen
0

#47 User is offline   Kungsgeten 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 943
  • Joined: 2012-April-15
  • Gender:Male

Posted 2012-September-01, 04:12

Thank you for the information on this issue! For the next update of BML I'll try to look into contested auctions. I haven't used that part of BML very much myself.
0

#48 User is offline   shingkit 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 149
  • Joined: 2011-August-02
  • Gender:Male
  • Location:Beijing, China

Posted 2012-September-26, 01:40

I love this application Kungsgeten! Thanks a lot for developing and sharing this useful program. You are genius!

One suggestion: There is a step function in the BML and that if i understand it correctly, it include Notrump as a step. It would be great if we have another step function which exclude notrump (or even a specified suit as a step). That will be useful as some conventions (such as Walsh Asking Bids) might exclude notrump as step when answering about 1st and 2nd round controls. If that function is available, the length of the coding could be reduced quite a bit i imagine.

For example, if STEPXN is available,

COPY Walsh Asking
1STEPXN Shows no control
2STEPXN Shows second round control (Singleton or KQ)
3STEPXN Shows first round control (Void or A)
4STEPXN Shows absolute control
NSTEPXN Cheapest call in notrump. Promises the King of the Asking Bid suit at least doublteon
ENDCOPY


Thanks again for the great stuff ! :rolleyes:
0

#49 User is offline   Kungsgeten 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 943
  • Joined: 2012-April-15
  • Gender:Male

Posted 2012-September-27, 14:51

Thanks for the kind words and great suggestion shinkit! I'll see if I can add this to the next update. I got inspired from your post and have thoughts about adding more "generalized" (cant find the word) bids instead of absolute bids. For instance this syntax could be used:

1H;
NS   Any new suit (would match 1S, 2C, 2D)
NS-  New suit at the same level (would match 1S)
NS+  New suit at the level above, but no jump shift (would match 2C and 2D)
JS   Any suited jump shift, !suit variable could be used to show the suit symbol
JS+  Jump shift to the level directly above the bid, in this case only 2S would be matched
JS++ Jump shift to the level two higher than the bid, in this case 3C and 3D would be matched
DJS  Any double jump shift, as above !suit could be used
SR   Simple raise, in this case 2H
DR   Double raise
TR   Triple raise
NT   cheapest nt bid available (1NT in this case)
JNT  jumping nt (2NT in this case)


With this syntax, a natural 4 card major opening system could use something like this for all the openings of one of a suit:
COPY one_suit_response
NS-  Forcing               // 1/1
NT   Negative, 6-11 hcp
NS+  Game forcing          // 2/1 GF
SR   4+!suit, 6-9 hcp
DR   4+!suit, 10-12 hcp
TR   PRE.
JNT  4+!suit, game forcing        // Jacoby 2NT
JS+  Weak Jump Shift, 6!suit, 3-5 hcp
JS++ Limit Jump Shift, 6!suit, 9-11 hcp
DJS  4+ support, void !suit  // Void splinter
ENDCOPY

0

#50 User is offline   kgr 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,432
  • Joined: 2003-April-11

Posted 2012-September-30, 06:42

Is it possible in bml to use twice the same bid for opps.
E.g:
- when you have a different defense to 1NT when it is strong or when it is weak.
- different defense if opps open 2D weak or 2D multi.

Is it possible in bss?
0

#51 User is online   0 carbon 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 537
  • Joined: 2009-January-19
  • Gender:Male

Posted 2012-November-05, 17:39

As well as m (eg 2m) for minors and M for majors, would be a good short form to have an abbreviation for a suit bid (vs NT) eg "T" (for tie, as suits should be worn with ties....)
0

#52 User is offline   nige1 

  • 5-level belongs to me
  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 9,128
  • Joined: 2004-August-30
  • Gender:Male
  • Location:Glasgow Scotland
  • Interests:Poems Computers

Posted 2013-February-07, 16:47

How's it going Kungsgeten? As an admirer of your work, I wish we could rekindle interest in your projects.
What do you think of kgr's bml2Html project?
Between you, you have extended and simplifed fred's Full Disclosure idea. Is there any prospect of incorporating your accomplishments into BBO?

0

#53 User is offline   Kungsgeten 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 943
  • Joined: 2012-April-15
  • Gender:Male

Posted 2013-February-11, 03:24

Its kind of standing still right now. I've had a lot of work and not much time for spare time projects (except for playing bridge, ofcourse) ;)

However I've started to rewrite the Python BML code, to incorporate some of the ideas I've written about in this thread. I think it'll be better than the previous version, but it is possible that some existing BML-files will need to be rewritten.

I think kgr's project is cool, although kind of similar to this: http://bridge.downagain.be/FD/

The problem with BML is that is kind of inefficient to parse. It is made to be easy to read and write for humans, not computers. With the new program I'm writing, however, I try to have a more general approach. A data structure is created from the BML file, containing the bids and metadata. This data structure can then be converted into various formats (BSS etc). I don't know yet if I'll succeed with this, but we'll see.

I do not know if fred is aware of the BML project, but perhaps I could contact him. FD seems to be a bit "forgotten", since it is so cumbersome to get your system into the web client.
0

#54 User is offline   benfinns 

  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 2013-March-19

Posted 2013-March-19, 13:50

Hi Kungsgeten,

The BML is fantastic! I am converting my bidding system to BML.

A suggestion: Why not allow parameters to be added when including a module? For example, I would to write:
INCLUDE multi.bml !SEAT=12 !VUL=00


This would allow me to reuse modules more efficiently without needing separate modules depending on seat and vulnerability.

Just my 2 cents
0

#55 User is offline   Kungsgeten 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 943
  • Joined: 2012-April-15
  • Gender:Male

Posted 2013-March-26, 08:43

I've begun to rewrite BML. The focus this time around is for BML to be not only a way to generate BSS-files, but also complete system documents! The goal is still to make the "code" highly readable and easy to write. My first goal is to have three export formats: BSS, html and LaTeX. There will be some new features, many which are suggested in this thread, but I haven't implemented all the old ones yet. Here's an example of the current syntax (inspired by org-mode in the text editor Emacs):

* Sjöman 5542

  Transfer 5542 as played by Erik Sjöstrand and Lennart Kjellman.

  1C  Natural / 11--13 bal / 17--19 bal
  1D  4+!d, unbalanced, 11+ hcp
  1HS 5+ suit, 11+ hcp
  1N  14--16, may be semibal
  2C  Multi. GF / 20--21 bal / Weak (5)6+!d / Weak (5)6+!s
  2D  Flannery. 5+!h, 4!s, 11--16 hcp
  2HS 6+ suit, 10--13 hcp
  2N  22--24 bal

  Yes, it is correct that no traditional weak opening in hearts is
  available.

** The 2!c multi

   Opening 2!c shows one of the following:

   1. Any GF
   2. 20--21 balanced
   3. Weak with 5+!d or 5+!s, about 5--9 hcp

   The weak alternatives should normaly show a 6 suiter, but may be a
   five card suit if appropriate.

   2C--
   2D Non-forcing relay
     2H Weak spades / GF with hearts / 25--27 bal
       2S Non-forcing relay
         2N 25--27 bal
         3C GF transfer. Hearts + diamonds
         3D GF transfer. Hearts one-suiter
         3H GF transfer. Hearts + spades
         3S GF transfer. Hearts + clubs
         3N GF with hearts. Non-forcing.
     2N 20--21 bal
   2H Forcing relay
     2S Any hand with spades
       2N Feature ask
     2N GF hand
     3C Max with diamonds
     3D Min with diamonds
   2S Preemptive, 3+!d


The HTML output for the code above (right now, still early development) looks like this: bml2html

The text in the paragraphs will not be exported to BSS (when the BSS export feature is reimplemented), only the bidtables.
0

#56 User is offline   Kungsgeten 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 943
  • Joined: 2012-April-15
  • Gender:Male

Posted 2013-March-31, 15:13

The new, completely rewritten, version of BML can be found at GitHub!
1

#57 User is offline   skaftij 

  • PipPip
  • Group: Members
  • Posts: 33
  • Joined: 2007-July-07
  • Gender:Male
  • Location:Denmark
  • Interests:Travel, Fishing

Posted 2013-March-31, 15:35

Interesting!
If I have made this specific agreement, then I will keep the agreement.
A partner can convince me to play nearly anything, but if partner breaks agreements, then you will fairly fast reach the point, that I wont be interested in playing any longer. Stick to your agreements.
Marlowe (Uwe Gebhardt)
0

#58 User is offline   nige1 

  • 5-level belongs to me
  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 9,128
  • Joined: 2004-August-30
  • Gender:Male
  • Location:Glasgow Scotland
  • Interests:Poems Computers

Posted 2013-April-01, 10:46

View PostKungsgeten, on 2013-March-31, 15:13, said:

The new, completely rewritten, version of BML can be found at GitHub!
I hope BBO takes advantage of Kungsgeten's clever stuff -- by incorporating FD into the web-client -- or basing an alternative disclosure system directly on BML.
0

#59 User is offline   Cthulhu D 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 1,169
  • Joined: 2011-November-21
  • Gender:Not Telling
  • Location:Australia
  • Interests:Overbidding

Posted 2013-June-25, 21:27

View Postnige1, on 2013-April-01, 10:46, said:

I hope BBO takes advantage of Kungsgeten's clever stuff -- by incorporating FD into the web-client -- or basing an alternative disclosure system directly on BML.


Yeah, for sure - this is so easy to write compared to FD which is impossible to manage as a human being. I can quite quickly author openings + responses and that's about 85% of your disclosure burden right there.
0

#60 User is offline   pintu123 

  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 2012-July-04
  • Gender:Male

Posted 2015-February-25, 13:57

Hi,
The bml.py close soon after opening. I tried it in cmd prompt but it is not working.
Need help.
0

  • 3 Pages +
  • 1
  • 2
  • 3


Fast Reply

  

4 User(s) are reading this topic
0 members, 4 guests, 0 anonymous users