Farmhand · Kaggriculture
A market-aware farming agent and reproducible evaluation lab for studying how resource allocation, worker scheduling, and opponent pressure affect decisions.
What it is
The project turns a competition environment into a place to ask concrete planning questions. More land can create more work than the available labor can service; a profitable crop on paper may be a bad decision once timing and market impact are included.
Farmhand is the custom agent. Kaggriculture's simulator and game rules come from the official environment, and the case study credits that foundation.
The loop it has to make believable
- 01
Allocate a limited budget across land, workers, crops, and animals while prices and the opponent's actions change the value of each choice.
- 02
Replay a season and trace a disappointing outcome back to idle labor, timing, crop loss, or market decisions.
How it’s built
The lab wraps raw observations in typed contracts and exposes legal-action masks. The arena executes submission-style agents through the official harness with seeded, seat-alternating games and independently loaded agent modules.
Replay diagnostics and Parquet transition datasets make strategy changes inspectable. Mechanics tests protect assumptions about yields, timing, and legal actions before those assumptions become policy logic.
Architecture
- Environment
- Official Kaggriculture harness wrapped with typed observations and legal-action masks
- Agent
- Worker hiring, crop and animal management, land decisions, fertilizer use, and marginal market-value heuristics
- Arena
- Seeded games alternate seats; fresh agent modules prevent cross-game or cross-player state leakage
- Diagnostics
- Replay tools inspect income, wasted labor, losses, and decisions across a season
- Datasets
- Typed transition records and manifests preserve the provenance of generated replays
What has to hold up
- Alternate player seats and fix seeds so comparisons are less confounded by starting position and random scenarios.
- Test mechanics and isolate agent state before attributing a result to an improved strategy.
Evaluation boundary
A local result against the starter is specific to that opponent and seed set. It does not establish leaderboard placement or strength against top competitors. No competition rank is claimed here.
The current agent is heuristic planning code. The dataset and evaluation infrastructure support future learning experiments, but they do not by themselves establish a trained reinforcement-learning policy.
Proof
VerifyRepository, checks, stack, status
- 01
Read the local README and environment audit to separate official mechanics from the custom agent.
- 02
Run the documented pytest suite and a seeded arena comparison against starter.
- 03
Use diagnose on a saved replay to inspect labor, income, and losses.
- 04
Read the roadmap's known weaknesses and compare multiple opponents before generalizing performance.
- Role
- Agent strategy, typed environment adapter, evaluation harness, and replay analysis
- Scope
- Custom planning agent and research tools around an external farming simulator
- Proof
- submission/main.py; src/kaggriculture/eval/arena.py; tests/test_arena.py and test_rules.py; docs/environment-audit.md and docs/data-model.md
- Stack
- Python, Kaggle Environments, PyArrow, Parquet, pytest
- Policy
- Programmed planning rules
- Evaluation
- Seeded, alternating seats
- Diagnostics
- Income, losses, labor
- Replay data
- Typed Parquet transitions