This runbook covers TODOS.phase-72.72.12.1.6: a game mechanics A/B testing
framework that splits players into deterministic groups, measures engagement and
retention per variant, and reports statistical significance.
The service package is @v2/game-mechanics-ab-testing at
apps/v2/game-mechanics-ab-testing/. Its contract is
V2/ue/Content/V2/LiveOps/GameMechanicsABTesting_V2_Contract.json and the
validation gate is V2/ue/Tools/check-v2-game-mechanics-ab-testing.py.
Framework Surface#
Primary package API:
assignV2GameMechanicsABVariantbuildV2GameMechanicsABTestingSurface
Experiment definitions include experiment ID, mechanic key, assignment salt, minimum sample size, confidence threshold, and weighted variants. Each variant has an ID, display name, weight, control marker, and mechanic config.
Measurement Flow#
- Assign players by hashed
accountIdHash, experiment ID, and assignment salt. - Emit
v2.game_mechanic.exposedwhen a player sees the mechanic variant. - Emit
v2.game_mechanic.engagement_recordedwith a non-negative engagement value. - Emit
v2.game_mechanic.retainedwhen retention criteria are met. - Build the surface to produce variant measurements and significance rows for engagement and retention.
The framework validates at least two variants, exactly one control, weights summing to 100, positive sample sizes, confidence thresholds between 0 and 1, supported event names, ISO timestamps, and non-negative engagement values.
Release Gates#
Required gates:
game-mechanics-ab-testing-packagegame-mechanics-ab-testing-assignmentgame-mechanics-ab-testing-measurementgame-mechanics-ab-testing-significancegame-mechanics-ab-testing-validationgame-mechanics-ab-testing-ci-wired
Verification#
pnpm --filter @v2/game-mechanics-ab-testing test
pnpm --filter @v2/game-mechanics-ab-testing typecheck
python3 V2/ue/Tools/check-v2-game-mechanics-ab-testing.py
python3 V2/ue/Tools/check-v2-ci-workflow.py
python3 V2/tools/validate-v2-docs.py