Skip to main content

CodeChef · June Challenge 2018 · WAREHOUS

Warehouseman

Compile a complete forklift instruction program that stores arriving shipments and retrieves them in numeric order.

01

Task

Each Case provides a 6–20 by 6–20 warehouse and the complete public shipment arrival permutation. The forklift must store every arrival, retrieve shipments in numeric order, and return to the entrance.

The Policy emits the whole instruction program at once. The Environment parses, validates, and executes it atomically under the 500,000-character limit.

02

Policy interface

Warehouseman is a constructive one-step task. The initial observation contains every public input needed to synthesize the complete solution.

Observation fieldMeaning
rows / columnsWarehouse dimensions in the inclusive range 6–20
arrivalsComplete shipment arrival permutation
instruction_limitMaximum output length: 500,000 characters

Return one ASCII instruction string using movement, pickup, drop-off, load, and unload operations.

ActionMeaning
N W S EMove the forklift
P DPick up an arrival or deliver a shipment
LN LW LS LELoad a neighboring stored shipment
UN UW US UEUnload into a neighboring cell
03

Evaluation

QuantityDefinition
CompletionStore all arrivals, retrieve in numeric order, and return to the entrance
Benchmark scoreMean official normalized instruction cost
Policy failureContributes bounded cost 1,000,000
04

Feedback

Feedback reports normalized cost, instruction length, completed solutions, failures, and diagnostic coverage.

FieldMeaning
mean_normalized_costPrimary Benchmark score
mean_instruction_charactersMean output length for completed solutions
completed / policy_failuresEpisode outcome counts
diagnostic_episodesNumber of Episodes represented in diagnostics
diagnostics.jsonlBounded per-Episode completion and cost diagnostics without raw arrival permutations or instruction strings.
05

Using the distribution

Build this independently installable leaf project from the repository root:

uv sync --project environments/codechef/june18/warehouseman --extra dev
uv build environments/codechef/june18/warehouseman

The package exports:

from warehouseman import WarehousemanBenchmark, baseline_program

benchmark = WarehousemanBenchmark()
program = baseline_program()