ADR-005: Category Balancing via Least-Played Selection¶
Status: Accepted Date: 2026-03-16 Context: The game has four scenario categories (governance, resource-allocation, team-dynamics, values-culture). Without active balancing, the AI tends to generate governance scenarios disproportionately, and players' profiles develop deep patterns in one category but thin data in others.
Decision¶
When starting a new session, the system:
- Aggregates
categoriesPlayedacross all participants' past sessions - Finds the category with the fewest plays across all four categories
- If there are ties among least-played categories, randomly picks one
- Passes that category as
targetCategoryto the scenario generator, which forces generation in that category
This runs in src/app/api/sessions/start/route.ts (lines 108-144).
Rationale¶
Category coverage contributes to model confidence (15% weight in the confidence formula — each category touched adds 0.04, up to 0.15 max). But beyond the confidence score, diverse category exposure produces a more robust player profile. A profile built only on governance scenarios can't predict behavior in team dynamics or resource allocation contexts.
When all players share the same sector background (e.g., "DAOs & crypto"), the AI also tends to generate scenarios in that sector. A separate fix tells Claude to generate in a different organizational context when sectors are homogeneous, preventing repetitive domain-specific scenarios.
Alternatives Considered¶
- Random category selection: Simple but could result in long stretches of the same category by chance.
- Weighted random (favor underplayed): More sophisticated but adds complexity without clear benefit over the deterministic least-played approach.
- Player-chosen categories: Lets players pick, but they'd likely gravitate toward familiar territory, defeating the purpose.
- No balancing (let Claude decide): Claude defaults to governance for DAO-related player contexts, creating the exact imbalance we're trying to avoid.
Consequences¶
- Players will naturally build balanced profiles over time without any manual intervention.
- The system may feel "forced" if a player specifically wants governance scenarios but keeps getting team-dynamics. Currently no opt-out mechanism.
- In multiplayer, category balancing considers all participants' histories, which means each player benefits from the group's diversity of experience.
Key files:
- src/app/api/sessions/start/route.ts — category aggregation and least-played selection (lines 108-144)
- src/lib/ai/scenario-generator.ts — accepts category parameter and sector-diversity instructions