Wiki

Coverage Mask

Q: What is a coverage mask? A: A coverage mask is a bit representation of which score states a leg covers, used to speed up candidate combination filtering.

浏览量加载中…

Coverage Mask

Q: What is a coverage mask?

A: A coverage mask is an engineering shortcut.

The payout matrix tells us which score states a leg covers. If the program scans the full matrix every time, combination search becomes slower. A mask compresses coverage into bits.

If a score state is covered, mark it as 1. If not, mark it as 0.

For example:

\[ S={0:0,0:1,1:0,1:1} \]

A home-win leg only covers 1:0:

Score 0:0 0:1 1:0 1:1
Home mask 0 0 1 0

A draw leg covers 0:0 and 1:1:

Score 0:0 0:1 1:0 1:1
Draw mask 1 0 0 1

Candidate legs can be merged with bitwise OR:

\[ \text{mask}(L_1)\lor\text{mask}(L_2)\lor\cdots\lor\text{mask}(L_n) \]

If the merged mask equals the full score mask, the combination covers all score states at the rule level.

The mask does not change the logic. It only makes impossible combinations cheaper to reject.