sibyllineX/leakhunter-viz
LeakHunter
LeakHunter is an OpenEnv-compatible reinforcement-learning environment for hidden leak detection in a pressurized water distribution network.
The agent actively probes the system:
- querying pressures
- querying pipe flows
- installing persistent sensors
- closing and opening isolation valves
- committing to a final repair
That makes LeakHunter a real partially observable decision process with coupled action-observation dynamics.
Action Space
Repair Methods
Difficulty Tiers
Easy
- 10-node linear trunk with branches, 12 pipes, 2-3 sections, budget 20, no confounder
Medium
- 24-node Y-branch with a loop, 30 pipes, 5-7 sections, budget 25, demand spike confounder
Hard
- 30-node grid block with cross-connections + tank, 44 pipes, 7-10 sections, budget 28, sensor bias confounder
Reward
Dense per-step rewards based on operational utility delta, plus terminal reward combining:
- Repair success (method-dependent)
- Localization precision
- Residual leak stopped
- Average service over episode
- Water conservation
Final score clipped to [0, 1].
Local Development
cd leakhunter
uv sync --extra dev
python -m uvicorn server.app:app --host 0.0.0.0 --port 8000 --reload
curl http://localhost:8000/healthFrom the worktree root, the package-qualified app path also works:
python -m uvicorn leakhunter.server.app:app --host 0.0.0.0 --port 8000 --reloadDocker
docker build -t leakhunter:latest -f Dockerfile .
docker run --rm -p 8000:8000 leakhunter:latestDeploy to HF Spaces
Install the optional OpenEnv tooling before pushing:
uv sync --extra openenvopenenv push --repo-id <username>/leakhunterTest Suite
cd leakhunter
python -m pytest tests/ -v --tb=short
python -m pytest tests/ -m performance -v --tb=shortFrom the parent of leakhunter/, this now works without setting PYTHONPATH:
python -m pytest leakhunter/tests/ -v --tb=shortleakhunter/tests/conftest.py inserts the leakhunter/ directory onto sys.path during test collection, so the existing bare imports like from models import ... and from server.environment import ... resolve consistently. You do not need PYTHONPATH=leakhunter for pytest anymore.
Baseline Scores
Current scripted baselines with Qwen 3.5 35B:
