A minor mahjong evaluation program for fun.
The scoring is based on the Zung Jung scoring system, but includes hands that are not included in the Zung Jung scoring system as well.
The patterns are split into 13 broad category. Within each category [0] are families [0.0] of patterns [0.0.0]. When scoring, you can match patterns across multiple families, but only one pattern match from each family, so pick the highest points pattern match from that family! For example, suppose a hand satisfies Self Drawn : 5
and Three Quartets : 120
, then lesser patterns such as One Quartets : 5
and Two Quartet : 20
from the same family in Triplets and Quartets
category do not get counted, unless specifically noted otherwise.
Hands may satisfies patterns from multiple families, thus scoring the sum of points from each individual patterns. However, this additive scoring caps at a maximum of 320 points limit. There are quite a few patterns, called Limit Hands
, that rewards points at or beyond this 320 points limit. However, they are their own cap - creating a hand that satisfies multiple limit patterns will simply score the highest point value among them. For example, a hand satisfying All Honor Triplets : 320
and Big Four Winds : 400
will simply reward the higher value of 400 point.
Basic minimal winning hand that doesn't satisfy any patterns other than having bonus tiles.
The hand contains 4 sequences; no triplets / quartets.
A regular hand which is concealed, without melding any exposed sets before winning. Winning on discard is okay. Concealed quartets are okay.
Self draw the winning tile to complete the hand.
A hand consists entirely of middle number [simple] tiles (2 to 8); no terminals nor honors.
A hand consisting of all 5 tile types.
Declares mahjong accidentally when the hand is not ready.
A hand consisting of 4 set of triplets / quartets; no sequences.
The hand contains two concealed triplets / concealed quartets.
The hand contains three concealed triplets / concealed quartets.
The hand contains four concealed triplets / concealed quartets.
Note: Four Concealed Triplets
is always Concealed Hand
, so it scores at least 125+5=130 points.
The hand contains one quartets. (Irrespective of whether it is exposed or concealed; same below.)
The hand contains two quartets.
The hand contains three quartets.
The hand contains four quartets.
Identical sets are sets in the same suit in the same numbers. Obviously, only sequences can be identical.
Two sequences in the same suit in the same numbers.
The hand contains two groups of Two Identical Sequences
.
Three sequences in the same suit in the same numbers.
Four sequences in the same suit in the same numbers.
Similar Sets are sets in the same numbers across 3 different suits.
Note: all 3 suits must be present; 2-suits patterns are not recognized.
Three sequences in the same numbers across three different suits.
Two triplets / quartets in the same number in two different suits, and the pair of eyes in the same number in the third suit.
Three triplets / quartets in the same number across three different suits.
Consecutive sets are sets in the same suit in consecutive numbers. The patterns here require three or more such sets.
Three sequences in consecutive number in the same suit with either
increment by 1 step: (n)(n+1)(n+2) (n+1)(n+2)(n+3) (n+2)(n+3)(n+4)
increment by 2 step: (n)(n+1)(n+2) (n+2)(n+3)(n+4) (n+4)(n+5)(n+6)
A 123
sequence, a 456
sequence, and a 789
sequence, all in the same suit.
Note: the hand must contain exactly the three sequences listed above.
Two of Three Consecutive Sequences
in the same suit that either
diverges at the start: (n)(n+1)(n+2) (n+1)(n+2)(n+3) (n+2)(n+3)(n+4) (n+4)(n+5)(n+6)
converges at the end : (n)(n+1)(n+2) (n+2)(n+3)(n+4) (n+3)(n+4)(n+5) (n+4)(n+5)(n+6)
Note: this hand is always All Sequences
, so it scores at least 50+5=55 points.
Example: sequences #1,2,3 and #1,3,4 makes 2 Three Consecutive Sequences
Example: sequences #1,2,4 and #2,3,4 makes 2 Three Consecutive Sequences
Four sequences in consecutive number in the same suit with either
Note: this hand is always All Sequences
, so it scores at least 100+5=105 points.
increment by 1 step: (n)(n+1)(n+2) (n+1)(n+2)(n+3) (n+2)(n+3)(n+4) (n+3)(n+4)(n+5)
increment by 2 step: (n)(n+1)(n+2) (n+2)(n+3)(n+4) (n+4)(n+5)(n+6) (n+6)(n+7)(n+8)
Three triplets / quartets in consecutive numbers in the same suit.
Four triplets / quartets in consecutive numbers in the same suit.
Note: this hand is always All Triplets
, so it scores at least 200+30=230 points.
Hand consist of Three Consecutive Triplets
with a sequence of the same three remaining tiles.
The hand consists entirely of number tiles in one suit, plus honor tiles.
The hand consists entirely of number tiles in one suit.
A 9-way call hand, with 1112345678999
in one suit in your hand, and winning on any one tile in the same suit.
Note: pure version only, impure version doesn't count. That is, the pattern must be completed, you have to be 9-way calling.
Example: 1112245678999 on hand, and self draws a 3, then the player must discard the extra 2 in order to to qualify as 9-way calling. Otherwise, it's only Pure One-Suit
.
with 1 => 111 123 456 789 99
with 2 => 111 22 345 678 999
with 3 => 11 123 345 678 999
with 4 => 111 234 456 789 99
with 5 => 111 234 55 678 999
with 6 => 11 123 456 678 999
with 7 => 111 234 567 789 99
with 8 => 111 234 567 88 999
with 9 => 11 123 456 789 999
Terminals are the 1 and 9 numbered suit tiles. The greater patterns only consider triplets of terminal tiles, while the lesser patterns also involve 123
and 789
sequences.
A sequece of 123 and 789 in the same suit.
A triplet / quartet of 1s and 9s in the same suit.
The hand consists of the pattern 111 123 789 999
in a suit.
Note: this always includes Two-Tailed Terminal Sequences
and Two-Tailed Terminal Triplets
, so it scores is 100 + 5 + 15 = 120
Every of the 4 sets in the hand, as well as the pair of eyes, includes a terminal tile or an honor tile.
Every of the 4 sets in the hand, as well as the pair of eyes, includes a terminal number tile.
An All Triplets
or Seven Pairs
hand which consists entirely of terminal and honor tiles.
Note: not applicable to a Thirteen Orphans
hand.
Combination of Pure One-Suit
and Pure Lesser Terminals
.
Note: with Two Identical Sequences Twice
- 11 123 123 789 789
or 123 123 789 798 99
or with Three Identical Sequences
- 11 123 789 789 789
or 123 123 123 789 99
or using up all 8 terminal tiles of one suit - 11 123 123 789 999
or 111 123 789 789 99
count Four Identical Sequences
otherwise - 11 789 789 789 789
or 123 123 123 123 99
The hand consists entirely of terminal tiles.
Honor tiles are the wind and dragon tiles.
A triplets / quartets of a wind tile.
Note: Seat wind
and Prevailing Wind
are not recognized.
Two triplets / quartets of Winds, plus a pair of Winds as the pair of eyes.
Note: this hand always includes 2 Wind Triplet
s, so it scores at least 30+5+5=40 points.
Three triplets / quartets of Winds.
Note: this hand always includes 3 Wind Triplet
s, so it scores at least 120+5+5+5=135 points.
Three triplets / quartets of Winds, plus a pair of Winds as the pair of eyes.
Four triplets / quartets of Winds.
A triplets / quartets of a dragon tile.
Two triplets / quartets of Dragons, plus a pair of Dragons as the pair of eyes.
Note: this hand always includes two Dragon Triplet
s, so it scores at least 40+10+10=60 points.
Three triplets / quartets of Dragons.
Note: this hand always includes three Dragon Triplet
s, so it scores at least 130+10+10+10=160 points.
The hand consists entirely of honor tiles.
The hand consists of pairs of all seven honor tiles.
The hand consists of tiles from the set 2, 3, 4, 6, 8 bamboo and the green dragon tile.
The hand consists of tiles from the set 1, 3, 5, 7 bamboo and the red dragon tile.
Thirteen Orphans
hand does not count for Concealed Hand
, All Types
, nor Mixed Greater Terminals
.
Among the 13 types of terminals and honors, the hand contains one pair of one type, and one tile each of the other 12 types.
Note: the hand scores 320 instead if it is a 13 wait situation where the pair of eyes is not initially complete.
Example: => wait for to complete pattern
Seven pairs hand are hands that consists of seven pairs. A Seven Pairs hand cannot count those patterns which specifically require sequences, triplets, or quartets, but it can count for other patterns without such requirements.
Note: Four identical tiles can count as two pairs as long as quartet is not declared.
The hand consists of seven pairs.
Note: Seven Pairs
is always Concealed Hand
, so it scores at least 30+5=35 points.
The hand consists of seven consecutive pairs, from 1-7, 2-8, or 3-9.
Lucky bonuses for winning on rare opportunities.
Self Drawn
win on the seabed
tile (the last tile in the wall, excluding the king's tiles).
Winning on a discarded riverbed
tile (the last discard by the player who has drawn the seabed tile).
Self Drawn
win on a supplement
tile after declaring a quartet.
Note: if the supplement tile is also the seabed tile, both patterns can be counted.
Self Drawn
win on a supplement
tile after drawing a bonus tile.
Note: if the supplement tile is also the seabed tile, both patterns can be counted.
Winning by robbing a quartet promotion. As for concealed quartet, only Thirteen Orphans
hand can rob a concealed quartet.
East winning with his initial 14-tile hand.
Note: does not count if East has made a concealed quartet.
A non-East player calling with his initial 13-tile hand, and winning on East's very first discard.
Note: does not count if East has made a concealed quartet.
Flowers tiles only provide bonus points, they do NOT contribute to having the minimum requirements to win.
Each flower or season bonus tile is worth 2 points unless completing the set.
A complete set of all 4 Flower tiles.
A complete set of all 4 Season tiles.
Note: 15 -> 20 for season quartet.
A complete set of all 8 bonus tiles.