Task
Each Case contains ten machine IDs at each of four production levels. The system starts with one apple and runs for 500 turns.
On each turn the Policy strengthens at most one affordable machine or waits. Production then runs in level order, so investment timing and cross-level compounding determine the final apple count.
Policy interface
The evolving state is fully public. Capacities and initial costs appear once and can be retained in same-Episode Policy memory.
| Observation field | Meaning |
|---|---|
turn / turns_remaining | Current temporal state |
apples | Current spendable apples |
machines | 4 × 10 machine counts |
powers | 4 × 10 current production powers |
initial | Capacities and initial costs; first observation only |
Choose one machine upgrade or wait. The selected level and machine ID must be in range and affordable.
| Action | Meaning |
|---|---|
{"upgrade": [level, machine_id]} | Strengthen one machine before production |
None | Wait for one turn |
Evaluation
| Quantity | Definition |
|---|---|
| Episode score | round(100,000 × log2(final apples)) |
| Benchmark score | Arithmetic mean of Episode scores |
| Policy failure | Contributes 0 |
Feedback
Feedback connects the primary score to final production scale, upgrade count, completion, and bounded transition coverage.
| Field | Meaning |
|---|---|
mean_log2_score | Primary Benchmark score |
mean_final_apples | Mean final apple count |
mean_total_upgrades | Mean upgrade count |
completed / policy_failures | Episode outcome counts |
trace.jsonl | A bounded turn sequence containing public production state and selected upgrades. |
Using the distribution
Build this independently installable leaf project from the repository root:
uv sync --project environments/atcoder/ahc058/apple_incremental_game --extra dev
uv build environments/atcoder/ahc058/apple_incremental_gameThe package exports:
from apple_incremental_game import AppleIncrementalGameBenchmark, baseline_program
benchmark = AppleIncrementalGameBenchmark()
program = baseline_program()