Task
Each Case is a 20–40 cell square forest with an entrance, a flower, fixed trees, and an adventurer. Before every adventurer move, the Policy may place permanent Treants on cells that have not yet been revealed.
A placement set is applied atomically. It must leave both the entrance and the current adventurer position connected to the flower. The adventurer then reveals sight lines and follows a deterministic shortest path toward a private target.
Policy interface
The first observation publishes the static forest. Later observations publish only the evolving public state; same-Episode Policy memory can retain the map and prior placements.
| Observation field | Meaning |
|---|---|
turn | Current turn index |
adventurer | Current adventurer coordinate |
newly_revealed | Cells revealed by the preceding move |
revealed_cells / placed_treants | Public progress counters |
initial | Size, entrance, flower, and fixed trees; first observation only |
Return one atomic placement set. An empty set advances the adventurer without placing a Treant.
| Action | Meaning |
|---|---|
{"placements": [[row, column], ...]} | Place distinct Treants on valid unseen empty cells |
{"placements": []} | Place nothing this turn |
Evaluation
| Quantity | Definition |
|---|---|
| Episode contribution | Valid adventurer movement count, capped at 2,048 |
| Benchmark score | Arithmetic mean of Episode contributions |
| Policy failure | Contributes 0 |
Feedback
Feedback summarizes delay, placements, terminal outcomes, failures, and trace coverage across the evaluated Cases.
| Field | Meaning |
|---|---|
capped_mean_turns | Primary Benchmark score |
mean_placed_treants | Mean number of permanent placements |
flower_reached / turn_cap_reached | Terminal outcome counts |
policy_failures | Failed Episode count |
trace.jsonl | A bounded semantic trace of public observations, placement sets, and terminal outcomes. |
Using the distribution
Build this independently installable leaf project from the repository root:
uv sync --project environments/atcoder/ahc054/treants_forest --extra dev
uv build environments/atcoder/ahc054/treants_forestThe package exports:
from treants_forest import TreantsForestBenchmark, baseline_program
benchmark = TreantsForestBenchmark()
program = baseline_program()