View unanswered posts | View active topics It is currently Fri Dec 14, 2018 5:27 am



Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
 MCR Mahjong Hand Score Calculator 
Author Message
Registrerad användare

Joined: Tue Apr 22, 2008 12:37 pm
Posts: 36
Reply with quote
Post MCR Mahjong Hand Score Calculator
Hi all,

I have just uploaded the MCR Mahjong Hand Score Calculator (http://mahjonghand.appspot.com). It can calculate the score of any situation in a game of Competition Rules Mahjong (also called Official International Rules).

Any feedback or help on the rules, the interface or the ugly look on the page is appreciated.


Mon Sep 22, 2008 3:45 am
Profile
Styrelsen Göteborg Styrelsen Förbundet
User avatar

Joined: Wed Feb 20, 2008 4:30 pm
Posts: 487
Location: Göteborg
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
Nice, seems it works just fine now!

there's an issue with the interface though: the calculate button sends you to .../form?sit=... rather than just .../?sit=...

--

Played around with it a bit, here are two things worth noticing:

http://mahjonghand.appspot.com/?sit=h+1 ... =Calculate (From our old wait thread)
Gives you a point for wait in the first arrangement even though there is a way to arrange the stones where no wait applies (grouping 2). I think that is wrong according to the current wait rules, but I am not sure.


The other issue is that it doesn't check your melded tiles, so http://mahjonghand.appspot.com/?sit=h+7 ... =Calculate gives you a valid hand but with no tile hog... the hand has three errors: 578 chow, one tile missing, pair melded before going out.
Naturally that doesn't matter if you just enter the tiles correctly, but errors do always happen and it would certainly be neat if the code checked that you had fourteen tiles total (plus the number of kongs and flowers) and that whatever you have out can have been correctly melded, and otherwise gives a warning or error :)


Mon Sep 22, 2008 11:20 pm
Profile
Registrerad användare

Joined: Tue Apr 22, 2008 12:37 pm
Posts: 36
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
Thank you very much for the feedback.

I've fixed the first bug you reported, now you can use the Calculate-button. It seems like the local version of Google App Engine is a bit different from the 'cloud' one. I should really have noticed that one myself. Thank you for reporting it.

Hmmm. The second one is a bit tricky. I would like to wait for a while and hear what some rules experts have to say on that. Some rules doesn't really 'fit', and they will kind of break the structure of the code. I want to be sure to not break it if I don't have to.

I did think of validating the melded sets, but I have forgotten. Good thing that you brought it up again. I made an issue of it at http://code.google.com/p/py-mcr/issues/list. Thank you.

I will try to assemble a list of tricky situations and post it somewhere for experts to have a look at. All suggestions are welcome. The current list is at http://code.google.com/p/py-mcr/wiki/TrickySituations.


Tue Sep 23, 2008 1:04 am
Profile
Registrerad användare

Joined: Tue Apr 22, 2008 12:37 pm
Posts: 36
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
I've just fixed the bug that Jonas reported. Now all melded and concealed sets are verified, and the number of tiles are counted.

I would appreciate if more people try it out and try to find ways to break it. Any feedback on anything is welcome.


Sun Sep 28, 2008 8:54 pm
Profile
Registrerad användare

Joined: Wed Jun 17, 2009 2:15 pm
Posts: 1
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
Hi, Oscar!

Your calculator is very useful, thanks a lot for the effort.

I'm trying to adapt it for a PocketPC. But unfortunately, there is no documentation on your project, and I have very little experience in Python.

Could you please tell me, is there a simple method which takes an input string like (m 333d h 1116667772d w 2d) and returns just a maximum scoring for this hand in plain text? I need to use minimum amount of system functions and libraries as there is limited support for Python on PocketPC.

Thanks in advance!


Wed Jun 17, 2009 2:22 pm
Profile
Registrerad användare

Joined: Fri Apr 06, 2012 4:02 am
Posts: 1
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
hi, it is a extremely nice calculator. I am wondering how can I use the code to estimate the random hand is a win hand or not? I mean which function in the py-mcr should I call to tell if a hand is a win hand? Thanks


Fri Apr 06, 2012 4:07 am
Profile
Registrerad användare

Joined: Mon Dec 24, 2012 7:09 pm
Posts: 4
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
Thanks for making this useful tool available.

I think its scoring is incomplete (or my situation string is defective) for
v Dgg h Dg Wss d1122448899 w Dg self_draw
It scores 24 points for Seven Pairs, 6 points for Half Flush, 4 points for Fully Concealed Hand, but does not award 4 points for Last Tile ("v Dgg" indicates two Green Dragons were visible discards, the report page shows that part of the coding was recognized).


Mon Dec 24, 2012 7:25 pm
Profile
Styrelsen Göteborg Styrelsen Förbundet
User avatar

Joined: Wed Feb 20, 2008 4:30 pm
Posts: 487
Location: Göteborg
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
Dick-mt wrote:
Thanks for making this useful tool available.

I think its scoring is incomplete (or my situation string is defective) for
v Dgg h Dg Wss d1122448899 w Dg self_draw
It scores 24 points for Seven Pairs, 6 points for Half Flush, 4 points for Fully Concealed Hand, but does not award 4 points for Last Tile ("v Dgg" indicates two Green Dragons were visible discards, the report page shows that part of the coding was recognized).


Last tile requires three tiles shown, so it's not possible to get that on seven pairs or single wait.

A hand with a last tile will have either three tiles visible elsewhere, or in revealed part of hand, or both. See this hand: http://mahjonghand.appspot.com/?sit=v+d11+m+d123+h+Dggg+Wss+d23234+w+d1+self_draw&calc=Calculate.

There, 4 points for last tile is awarded :)


Tue Dec 25, 2012 5:51 pm
Profile
Registrerad användare

Joined: Mon Dec 24, 2012 7:09 pm
Posts: 4
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
Thanks for your example. On the other hand, I plan to research this further because I've found at least one authority who supports my current view of "Last Tile".

Here are two discrepancies which I think are not controversial.

v Dgg m c999 Wnnn h b666 d999 Dg w Dg
omits 3 points for the pungs of terminals and honors

m c888 m b666 d999 h Dggg c3 w c3
shows 3-character tile for each of Dragon Pung, Single Wait, Pung of Terminal
(i.e., scoring is OK, but image display is wrong).

Thanks, again, for this useful tool.


Wed Dec 26, 2012 5:07 pm
Profile
Registrerad användare

Joined: Mon Dec 24, 2012 7:09 pm
Posts: 4
Reply with quote
Post Re: MCR Mahjong Hand Score Calculator
After investigating MCR Last Tile further, I now accept that explicit wording in the OIRB (p10)
Quote:
the first three tiles of its kind are in the discard piles or are used in claimed sets

has not been superseded by more recent and vaguer language. Some posts (between 24-Dec and 29-Dec 2012) by me, Tom, and Ray at the Sloperama bulletin board (http://sloperama.com/majexchange/bulletinbd.htm) have further details.

All but one of the bugs reported in Lasker's Oct-2009 posting are still present. Has work on this software stopped? If not, then I can post some further bug-reports and submit suggestions for improving usability of the http://mahjonghand.appspot.com/ website. OTOH, if bug-fixes and development will resume only if somebody new takes over, then I will just settle for reporting stuff on the Sloperama bulletin board.


Sun Dec 30, 2012 1:24 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.