I am able to calculate the shanten number myself, but it often takes me more than a minute. I'm looking for ideas how to become more efficient.
Background: I'm currently writing a paper about determining the shanten number with a computer algorithm. This works very well so far, but there are likely some ideas for improvements that I missed. I am a really poor Mahjong player myself, so input by experienced players would be most welcome.
This is a rough description of my (manual) strategy right now:
First, detect any tiles of which the usage is certain. This means tiles that are alone (no adjacent tile within a radius of 2) and sets that are completed (chi, pon).
I keep count of how many single tiles there are. Next, I look for incomplete sets (in a shape similar to any of 11x, 12x, 1x3, x23). I insert one of the singles into any of them and increment the shanten number in my head. During this step, I attempt to keep up to 2 pairs for later though.
There will be some singles or incomplete sets be left over, I split them up and multiply their number with 2/3 (because any 3 tiles can be made into a set by exchanging 2 of them). I also check if there are one or two pairs, if not, I create one (increasing shanten by 1). So far no problem at all, this only takes me a few seconds.
The trouble starts when there are multiple options how to combine tiles. Should I split this set up, or should I keep it? Should I add this tile here or there? Especially pure (only one suit) hands are annoyingly complex, and I could not figure out a fast way to solve them.
My algorithm of course just laughs at the hands I have trouble with, as it is able to solve even the most complicated hands in fractions of a second. It explores all reasonable ways how to combine the tiles in a tree (with heuristics) and yields the best option.