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

#1 User is offline   Kungsgeten 

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

Posted 2012-April-15, 15:02

Hi!

I recently discovered the Full disclosure system on BBO. I tried using bidedit for a while, but found it pretty slow to work with. I've created a markup language which I call Bridge Bidding Markup Language (BML for short).

BML is intended to be easy to write and easy to read. Right now I also have a program written in Python which can convert BML files to BSS (the format used by BBO), and these files can be used while playing online.

All features of the Full Disclosure system isn't implemented yet, but the most useful ones (according to me) are. I would be happy if you tried it out and gave me some thoughts. You can download the manual and the converting program from here

Just to give you an example, here's what a BML file can look like (including a basic description of a No Trump structure):

SAYC
A natural system with 5 card majors and best minor

1C; 3+!c, 11+ hcp
1D; 3+!d, 11+ hcp
1H; 5+!h, 11+ hcp
1S; 5+!s, 11+ hcp
1N; 15-17 bal
2C; ARTIFICIAL. Game-forcing or 22-24 bal
2D; Weak
2H; Weak
2S; Weak
2N; 20-21 bal

1N;
2C ARTIFICIAL. Stayman
   2D ARTIFICIAL. No 4 card major
   2H NON-FORCING. 4+!h
   2S NON-FORCING. 4+!s
2D TRANSFER. 5+!h
   2H NON-FORCING.
   3H NON-FORCING. Super accept
2H TRANSFER. 5+!s
   2S NON-FORCING.
   3S NON-FORCING. Super accept
2S ARTIFICIAL. Minor suit Stayman
2N INVITATIONAL.


Edit 2012-07-20:
BML has been updated to version 0.3. Changes include variables and support for BSS suit lengths and outcomes. The manual has also been updated and now has information on bids depending on seat and/or vulnerability.

Edit 2013-04-01:
BML has been completly rewritten and can now be found at GitHub.
1

#2 User is offline   Cthulhu D 

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

Posted 2012-April-18, 00:56

That's really good actually. I will give it a throw.
0

#3 User is offline   Kungsgeten 

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

Posted 2012-April-18, 06:03

Please do! I'll be happy to hear about your comments.
0

#4 User is offline   mycroft 

  • Secretary Bird
  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,426
  • Joined: 2003-July-12
  • Gender:Male
  • Location:Calgary, D18; Chapala, D16

Posted 2012-April-18, 11:51

One comment (about comments): your manual shows that you can use C++ -style comments (//comment).
Your continuation example uses Perl-style comments (#comment).

Are both of them legal? Can I also use C-style block comments or Python docstring-style block comments?
When I go to sea, don't fear for me, Fear For The Storm -- Birdie and the Swansong (tSCoSI)
0

#5 User is offline   Kungsgeten 

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

Posted 2012-April-18, 16:19

Ah, I'm sorry. The documentation is wrong (I just kind of wanted to "get it out there" and hopefully recieve some feedback). It uses C-style // comments. At first I used # as comments, but I figured that you may want to use # in your description of bids for some reason (like #5!s or something similar).

So currently only // as comments, and no block comments (though I guess they could be implemented).
0

#6 User is offline   Cthulhu D 

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

Posted 2012-April-24, 05:55

I've got this going. Some thoughts

A) It's really good, I like it

B) Nothing you can do, but the BBO interface for uploading FD cards is 100% made of pure ass.

C) Make the headers preceeded by a tag or something - it took me awhile to work out why the 1C bidding description was becoming the system name.

D) Number 1 feature request PLEASE OH PLEASE let tabs work for indenting bidding trees!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Or make the converter replace a tab with 8 spaces. I care not.

Otherwise it's pretty good, working a system up into it now.


Edit: Also, can you validate if the output is a legit BSS file? I guess this is partly FD's fault - it never says 'OH NOES your file is buggered right up' it just fails silently. Which is awesome when you're trying to debug stuff. Not.

Edit2: Also, what is the 'symbol' for Pass? Passes have meanings in my system, so I need to be able to define a meaning for that bid.

Feature Requests:

Allow me to define PASS or if you have tell me how

Let it read tabs as white space

Can it accept and expand the short hand

4m
4M
4x

to 4C and 4D, 4H/S and 4C/D/H/S respectively?

This is partly personal interest. If it can do that, I can paste my system notes directly from excel into the program. However, just the shorthand and pass is a massive leap forward, replacing tabs with whitespace can be done with find/replace.
0

#7 User is offline   Kungsgeten 

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

Posted 2012-April-24, 06:21

I'm glad you're using and liking it!

C) One of the purposes of BML was to make the "code" readable and easy to write. That's the reason why there's no tags. But ofcourse it could be implemented.
D) Okay, I'll look into this. Should be easy to implement.
0

#8 User is offline   Cthulhu D 

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

Posted 2012-April-24, 07:34

Got practically an entire system in and working - it's pretty good and quite fast if you doco your system in excel. I am going to change my documenting style to meet your parser haha.

Spoiler

0

#9 User is offline   mycroft 

  • Secretary Bird
  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,426
  • Joined: 2003-July-12
  • Gender:Male
  • Location:Calgary, D18; Chapala, D16

Posted 2012-April-24, 10:33

Heh, I understand Herr Kungsgeten, re: spaces only; all his editing software (and mine) has an option to do this automatically (and it does auto-indent, which means I don't have to make tabs "8 spaces", tab means "go to the next indent point", just like Remington designed it). It's SOP for Python editors, for whom tab is anathema.

Not that I don't agree with you Cthulhu; but it's a "fault of the environment" - given that for us the tools are automatic. However, don't get me started on Editor Wars...I do Have A Preference.
When I go to sea, don't fear for me, Fear For The Storm -- Birdie and the Swansong (tSCoSI)
0

#10 User is offline   Kungsgeten 

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

Posted 2012-April-24, 16:16

I've updated the bml.zip and now a tab character is interpreted as 8 spaces.

Wow! Great work Cthulhu :) Have you tested it on BBO or similar? You use some notation which I myself haven't tried (mostly related to spaces). Documenting in Excel, seems pretty cool (I use LaTeX myself). I'm thinking of writing a program which turns BML into HTML, but we'll see about that. I would also like to add some kind of feature to BML which makes it easier to document relay sequences.

Yeah mycroft, you're correct. My editor doesn't work with tabs (unless I really want them, which I do not) so I didn't think about implementing support for tab characters. As far as editor wars go; BML is written in Emacs :)
0

#11 User is offline   Cthulhu D 

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

Posted 2012-April-25, 00:18

View Postmycroft, on 2012-April-24, 10:33, said:

Heh, I understand Herr Kungsgeten, re: spaces only; all his editing software (and mine) has an option to do this automatically (and it does auto-indent, which means I don't have to make tabs "8 spaces", tab means "go to the next indent point", just like Remington designed it). It's SOP for Python editors, for whom tab is anathema.

Not that I don't agree with you Cthulhu; but it's a "fault of the environment" - given that for us the tools are automatic. However, don't get me started on Editor Wars...I do Have A Preference.


I'm working with wordpad here, I probably need to use a more sophisticated editor. I haven't used emacs since I quit programming and I haven't used VI since university.

Quote

Wow! Great work Cthulhu :) Have you tested it on BBO or similar? You use some notation which I myself haven't tried (mostly related to spaces). Documenting in Excel, seems pretty cool (I use LaTeX myself). I'm thinking of writing a program which turns BML into HTML, but we'll see about that. I would also like to add some kind of feature to BML which makes it easier to document relay sequences.


Just tested it then, works fine.

Excel is very good at this because - well, check out my notes.

https://docs.google....&hl=en_US&gid=9

Turns out if you just select the entire system description for each opening, then paste it into wordpad and do a find replace for tabs and replace them with a single space, the entire system comes across. The only problem is bids where I have used shorthand like

4m
4M
4x

Those obviously don't work. It would be great if the parser did understand them or something similar. I also hate that the parser doesn't understand that 1NT = 1N, but that's easy to find replace again as well.

So I'm going to redevelop my notes to expand out the shorthand, but it works very nicely.

Edit: Is P the bid for pass?
0

#12 User is offline   Kungsgeten 

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

Posted 2012-April-25, 08:13

Looks like a good way to document stuff! Instead of 4m you could write 4CD (and 4HS instead of 4M), but the continuations may become weird (see manual).

P is the notation for pass, that is correct. However, BSS do not accept pass as an opening bid, so if you want to make a bid mean something in third hand (or have a forcing pass system or similar) you have to define the position in which the bids work. By default the bids are applied to all positions, but you can for instance write pos=34 to apply the meaning of the bid when opener (other bid than pass) has opened in third or fourth position.

In short: P is for pass, D is for double and R is for redouble.
0

#13 User is offline   Cthulhu D 

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

Posted 2012-April-25, 18:03

View PostKungsgeten, on 2012-April-25, 08:13, said:

Looks like a good way to document stuff! Instead of 4m you could write 4CD (and 4HS instead of 4M), but the continuations may become weird (see manual).


That's beautiful - I'd read the manual but hadn't put 2 and 2 together. All my 4x etc are at the tail end of sequences so I can definitely do this.

Quote

P is the notation for pass, that is correct. However, BSS do not accept pass as an opening bid, so if you want to make a bid mean something in third hand (or have a forcing pass system or similar) you have to define the position in which the bids work. By default the bids are applied to all positions, but you can for instance write pos=34 to apply the meaning of the bid when opener (other bid than pass) has opened in third or fourth position.

In short: P is for pass, D is for double and R is for redouble.


Oh it's mostly to handle stuff like garbage stayman sequences so 1NT-2C-2H pass tells you stuff about responders hand. But sweet that works.

Fantastic, will produce a new iteration this weekend.
0

#14 User is offline   jkljkl 

  • PipPipPip
  • Group: Full Members
  • Posts: 69
  • Joined: 2004-April-01
  • Gender:Male
  • Location:Germany, NRW

Posted 2012-May-06, 02:31

My first 30 min

View PostKungsgeten, on 2012-April-18, 06:03, said:

I'll be happy to hear about your comments.


Cannot comment yet, I just can say that this python thing is not so simple to master for a non-programmer. Maybe my stumbling can be of help for future user with my knowledge level.

OS Win7 64Bit Home Premium

Tried to start bml2bss.exe
Result: A Pop-Up window flashed up an disappeared within ms, no idea of what was written in it.

Ok, so maybe that is that dll thing. So I went to the MS Homepage and installed Microsoft Visual Studio C++ 2010 Express

Tried to start bml2bss.exe
Result: As before, no improvement

Well, the Pop-Up window has a black background as the DOS-Prompt, so lets try to start it there manually to see if I can discover something else.

Started the DOS-prompt, cd till I was in the right folder, started the bml2bss.exe an got:

What's the name of the file you want to convert?
Traceback <most recent call last>:
 File "bmlsbss.py", line 293, in <module>
IOError: [Errno 2] No such file or directory: 'test.txt'

c:\Users\stefan\Desktop\bml\bml2bss_exe>


Then I created an empty dummy file test.txt. Now I do not longer get the error, just the question
What's the name of the file you want to convert?

c:\Users\stefan\Desktop\bml\bml2bss_exe>


If now I point for instance to sayc.bml I get a message that windows does not know which program should handle a *.bml file.

Linking the bml-file-format to the bml2bss.exe didn't help. Again a Pop-Up window coming and disappearing within ms.

ciao
stefan
0

#15 User is offline   jkljkl 

  • PipPipPip
  • Group: Full Members
  • Posts: 69
  • Joined: 2004-April-01
  • Gender:Male
  • Location:Germany, NRW

Posted 2012-May-06, 03:19

Sorry for continuing OT about python:

After the above mentioned failure, I started plan B.

Went to python.org, and installed python on my machine (will maybe post later the process).

Now I want to start with python the bml2bss.py But this file seems not to be included in the zipfile that I downloaded.

Where can I find the bml2bss.py?

ciao
stefan
0

#16 User is offline   Cthulhu D 

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

Posted 2012-May-06, 17:41

Yeah you need to run everything from the dos prompt (not really the dos prompt any more, but you know, close enough). There is no GUI on the thing.

Also the files need to be called test.bml (or randomname.bml etc) otherwise it doesn't work.

Not sure if that will fix all your problems though.
0

#17 User is offline   jkljkl 

  • PipPipPip
  • Group: Full Members
  • Posts: 69
  • Joined: 2004-April-01
  • Gender:Male
  • Location:Germany, NRW

Posted 2012-May-07, 08:45

View PostCthulhu D, on 2012-May-06, 17:41, said:

Yeah you need to run everything from the dos prompt (not really the dos prompt any more, but you know, close enough). There is no GUI on the thing.

Also the files need to be called test.bml (or randomname.bml etc) otherwise it doesn't work.

Not sure if that will fix all your problems though.


Well it didn't fix all my problems, but at least it solved my problems with this program.

Thank you
stefan
0

#18 User is offline   antonylee 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 499
  • Joined: 2011-January-19
  • Gender:Male

Posted 2012-May-07, 20:39

Hi, any chance you could provide a .pyc version? Not everybody runs on windows :-) Of course I would be very excited it it was open-sourced but I perfectly understand if you don't want to.
0

#19 User is offline   Kungsgeten 

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

Posted 2012-May-12, 09:19

Hi! I'm sorry that I haven't replied earlier. I'm even more sorry that I managed to upload a version which was wrong. The problems should be fixed now if you download the .zip-file again.

antonylee: I forgot to include the .py-file in the last version of the zip-file. It is there now.

Download bml2bss from here
0

#20 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 2012-May-12, 12:53

View PostKungsgeten, on 2012-April-15, 15:02, said:

I recently discovered the Full disclosure system on BBO. I tried using bidedit for a while, but found it pretty slow to work with. I've created a markup language which I call Bridge Bidding Markup Language (BML for short). BML is intended to be easy to write and easy to read. Right now I also have a program written in Python which can convert BML files to BSS (the format used by BBO), and these files can be used while playing online. All features of the Full Disclosure system isn't implemented yet, but the most useful ones (according to me) are. I would be happy if you tried it out and gave me some thoughts. You can download the manual and the converting program from www.snortingmaradonas.se/erik/bml.zip
Just to give you an example, here's what a BML file can look like (including a basic description of a No Trump structure):
SAYC
A natural system with 5 card majors and best minor
1C; 3+!c, 11+ hcp
1D; 3+!d, 11+ hcp
1H; 5+!h, 11+ hcp
1S; 5+!s, 11+ hcp
1N; 15-17 bal
2C; ARTIFICIAL. Game-forcing or 22-24 bal
2D; Weak
2H; Weak
2S; Weak
2N; 20-21 bal
1N;
2C ARTIFICIAL. Stayman
   2D ARTIFICIAL. No 4 card major
   2H NON-FORCING. 4+!h
   2S NON-FORCING. 4+!s
2D TRANSFER. 5+!h
   2H NON-FORCING.
   3H NON-FORCING. Super accept
2H TRANSFER. 5+!s
   2S NON-FORCING.
   3S NON-FORCING. Super accept
2S ARTIFICIAL. Minor suit Stayman
2N INVITATIONAL.
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
  • Later you could write conversion programs to HTML and WBF system-card format
  • Allow WBF abbreviations (e.g. ART for Artificial, INV for invitational) with automatic expansion on display.
  • Allow generic descriptions (e.g. for raises, splinters) so a program could use BML to automatically bid hands (c.f. COBRA).
  • OK OK yes I know: If you put a broom up your arse, you could also sweep the floor :)

0

  • 3 Pages +
  • 1
  • 2
  • 3


Fast Reply

  

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