-
Notifications
You must be signed in to change notification settings - Fork 0
Testing and Balance
Pan's Trial includes both automated regression testing and headless balance analysis.
The primary checked-in test file is:
tests/test_rules.py
It covers a mix of:
- core rule behavior
- phase transitions
- request resolution
- multiplayer flows
- room-server behavior
- UI smoke checks
- layout regressions
Run it with:
.\.venv\Scripts\python.exe -m pytest tests\test_rules.pyThe web-build environment can also run the same suite:
.\.venv-web\Scripts\python.exe -m pytest tests\test_rules.pyFor a quick non-UI sanity check of imports and basic setup:
python verify_foundation.pyThis verifies that the engine, UI package, and basic setup flow still initialize correctly.
The project includes a headless match simulator:
balance_testing.py
Run the default study:
python balance_testing.pyRun a custom-size study and save the results to a folder:
python balance_testing.py --games 200 --output-dir .\balance_runsBy default, the study writes:
Balancing_Testing_01.xlsxBalancing_Testing_01_Report.md
The simulation is meant to answer questions like:
- Is there an obvious starting-seat advantage?
- Do stronger agents beat weaker ones consistently?
- How often is Appeasing Pan skipped after hands run out?
- Are request types showing up in a healthy mix?
- Are the final damage totals roughly close between seats?
Because the simulator runs on the same live engine rules as the playable game, it helps turn balance discussion into measurable evidence instead of guesswork.
That makes it useful for:
- rule tuning
- fairness checks
- AI evaluation
- documenting design decisions
When changing gameplay behavior:
- Update or add engine-level tests.
- Run
tests/test_rules.py. - If the change affects fairness, run at least a small balance study.
- Rebuild the browser package if the change affects web behavior or assets.
tests/test_rules.pybalance_testing.pyBalancing_Testing_01_Report.mdFINAL_Balancing_Testing_01.xlsx