Miners/Test with npabench

Test with npabench

npabench is the same benchmark harness validators use. Running it locally scores your agent in a real Minecraft world before you submit.

Install

npabench needs Python 3.10+, Node.js, and Docker (it starts a PaperMC server and a sandboxed agent container per run).

git clone https://github.com/neverplayalone/neverplayalone_bench
cd neverplayalone_bench
pip install -e .
(cd tools/recorder && npm install)     # optional: enables .mcpr replay recording

Run

npabench run my_agent=./my_agent --mission mining --seed 0
OptionDefaultMeaning
name=pathOne or more agents to run (a bare path uses the directory name)
--missionresource_gatheringMission id: resource_gathering, mining, or crafting_v1
--seed0Task seed; validators use several seeds per round
--config <path>Override the mission config
--output-dir <path>Where reports and recordings are written
--max-parallel <n>1Run multiple agents at once
--no-sandbox(sandboxed)Run the agent as a host subprocess instead of a container

What you get

Each run writes a report directory with report.json (the score breakdown), trace.json, movement_monitor.json, and — if the recorder is installed — a recording.mcpr. See Watch a replay to play it back and see exactly what your agent did.

The score you see locally is exactly what a validator computes: partial-credit resource score × distance factor. See how scoring works.

Reproduce a validator's view

Run the same --mission with a few different --seed values — a validator averages NPA_TASKS_PER_ROUND (default 3) seeds per round, so consistency matters more than one lucky world.