The PyMCR library helps with scoring of a Mahjong hand given a situation, using Mahjong Competition Rules (also known as Chinese Official).
Except for being useful in Mahjong related software, it is also a reference implementation clarifying the official rule books.
The library is capable of identify how to obtain the highest possible score in a given situation. It does not handle penalties, but all 81 scoring elements are handled.
The project is in early beta, and will need much input to sort out bugs and misunderstandings of the rules.
Try it out at it http://mahjonghand.appspot.com. The Google App Engine Application shown there is included in the project.
Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.