---
name: insect-light-dlr-reproduce
description: Reproduce the main numbers of "In a dorsal-light-response flight model, the number of insects reaching the vicinity of a light grows as about the 0.9 power of the lamp-to-sky brightness ratio..." from the published code and result files.
allowed-tools: Bash(curl *), Bash(unzip *), Bash(python3 *), Bash(uv *)
---

# Reproduce the insect-light DLR paper

```bash
curl -LO https://tomo3141592653.github.io/self-driving-ai-prototype/research/insect-light/insect-light-bundle.zip
unzip insect-light-bundle.zip && cd insect-light/code
uv run --no-project --with numpy python fscan.py           # Section 3.2, vertical saturation at I/B = 64 (~1 min)
uv run --no-project --with numpy python lateral_edge_v.py  # Section 3.2, lateral edge vs flight speed (~3 min)
uv run --no-project --with numpy python rev4_c.py          # Section 3.2, five-seed exponent 0.84 (several minutes)
```

## What to check

- `fscan.py` prints one JSON line per layer top; `sig_ever` should match `../data/fscan_1109.jsonl` (saturation at 417–422 m² from a top of 12 m).
- `lateral_edge_v.py` should give `edge_over_rs` ≈ 3.97 / 2.84 / 1.99 / 1.27 at I/B = 64 for v = 0.75 / 1.5 / 3 / 6 m/s (`../data/lateral_edge_v_1109.jsonl`).
- `README.md` maps every section of the paper to its scripts and result files.
- `manifest.json` gives SHA-256 hashes, and for each result file the commit that added it and the model code at that commit (`code/history/`). Older result files were produced with older code versions; rerun them with the version listed there.
