Sema: An Executable Reconstruction of Match Composition
Sema tests how to select non-overlapping match proposals and check fairness over time. Replaying the same recorded inputs and seed produces the same decisions. The project also examines the limits of approximate search.
Question
Which matching rules and tradeoffs can a public model explain without reproducing a proprietary system?
Main idea
The implementation should enforce the conditions that must always hold and include cases that expose incorrect behavior. Results should show the search limits and which conclusions the checks support. Product-specific policies still need separate decisions and validation.
About this draft
Sources and scope
Sources
The project uses matching problems drawn from systems work. It includes tests of the matching rules, a reference that tries every combination for small inputs, decision replay, and search with explicit limits.
Limits
This project models a class of matching problems. It does not reproduce an employer's system, demonstrate production performance, or establish results for a specific game. It does not establish that its default policy is optimal in an actual game.
Outline
What the article will cover
- 01
Explain what the model covers
The project models a class of allocation problems. It does not reproduce a private system or prescribe one policy for all games.
Example or checkSeparate supported conclusions from assumptions before discussing architecture or performance.
- 02
Find proposals that cannot be selected together
Proposals may share a ticket or a backfill slot. Represent each proposal as a node and link proposals that share these resources. Selecting one then rules out the linked proposals.
Example or checkShow one batch. Check that the selected proposals do not overlap, separately from how the candidates are ranked.
- 03
Compare the selection priorities
Filling existing matches, waiting time, how much demand is served, and match quality are different goals. A single score does not automatically capture their priorities.
Example or checkExplain the chosen comparison: criteria in priority order (lexicographic), or alternatives where improving one criterion would worsen another (Pareto). Show the decisions and rejected alternatives.
- 04
Check the result against all combinations
With the same limits, indexed and linear candidate search must return the same candidates in the same order. They must also agree on whether the candidate list was cut short. For small inputs, compare a search that checks every combination with the exhaustive reference. The results must be equivalent under the same criteria. If search stops early, report how its result compares with the reference.
Example or checkCompare the main selection path with exhaustive enumeration. Also generate varied inputs and compare both implementations on the same cases.
- 05
Report where the search stopped
When a search reaches its configured limit, the result must say so. It must not claim an optimum that the search has not established.
Example or checkReport the budget and the search branches left unexplored. Include the replay seed and best alternatives found.
- 06
Leave game-specific choices to the product team
The system can enforce conditions that must always hold and show the tradeoffs between goals. Product teams must choose what makes a good match.
Example or checkList the settings that need experiments, domain decisions, and real outcome data.
Before publication
What still needs checking
Matching rules
Use small cases to check overlap, requests that keep being skipped, backfill, outdated inputs, and simultaneous reservations.
Comparison with all combinations
For small inputs, enumerate every combination and compare the alternatives that cannot improve on one criterion without worsening another (Pareto). Use this reference to check searches with fixed limits.
Decision replay
Record the input, seed, and decisions so that the same batch result can be reproduced and inspected.
What the checks establish
For each conclusion, state whether code verifies it, an example illustrates it, or a product-specific decision is still needed.