Bots drop, loot, fight, heal and flee rising water, with three difficulty levels that limit reaction time and aim. Bots use only information a player would have.
Acceptance
Bot-only matches complete with a winner on 20 seeds.
Difficulty levels produce measurably different results.
Bots rarely drown: under 10% of bot deaths in a batch run.
**Depends on:** M4, M2, B9
Bots drop, loot, fight, heal and flee rising water, with three difficulty levels that limit reaction time and aim. Bots use only information a player would have.
**Acceptance**
- Bot-only matches complete with a winner on 20 seeds.
- Difficulty levels produce measurably different results.
- Bots rarely drown: under 10% of bot deaths in a batch run.
claude
added this to the v0.4 Match Loop and Bots milestone 2026-11-09 05:27:07 +00:00
BotBrain (src/bots/bot_brain.gd): picks a landing marker near the barge's route, loots, fights, bandages itself and keeps ahead of the tide, sending only PlayerCommands. It uses what a player would know: the map's loot markers, the tide forecast, items within 12 m, opponents in view with a clear line, and who just hit it.
BotWorld (src/bots/bot_world.gd): the shared map. Loot markers, the points of interest's walking routes into huts, lofts and piers, and each tide phase's safe ground.
Three difficulties in Tuning.BOT_DIFFICULTIES (reaction 0.9 / 0.5 / 0.25 s, aim error 7 / 3.5 / 1.5 degrees, sight 45 / 65 / 90 m). The server mixes them; --bot-difficulty=easy|normal|hard|mixed overrides.
NavGrid labels connected regions at build, so a cut-off goal is refused without searching the whole island. Those searches took about 70 ms each and were the cause of every over-budget tick I saw.
make bot-matches (tools/bot_matches.sh, tools/bot_matches.gd) plays bot-only matches on a run of seeds.
Acceptance
Bot-only matches complete with a winner on 20 seeds: seeds 101 to 120, 20 of 20 finished with a winner, none by the time limit. Seeds 1 to 10 also 10 of 10.
Under 10% of bot deaths are drownings: 7 of 460 (1.5%) on seeds 101 to 120; the other 453 were weapons. Seeds 1 to 10: 1 of 230.
Difficulty levels produce measurably different results: on seeds 101 to 120, mean place easy 13.7, normal 11.8, hard 12.0; eliminations easy 132, normal 137, hard 186; wins easy 2, normal 9, hard 9. In 20 one-on-one duels at 28 m with the same weapon, hard beat easy 20 to 0. Easy is clearly weaker. Hard and normal are separated by eliminations but not by placement over 20 matches, so the batch check asserts only what holds: easy places worst and hard takes the most eliminations.
Tests make check passes: 322 tests, self-check and smoke (p99 2.0 ms with 24 bots, none over budget). New: test/bots/test_bot_brain.gd (14 tests: pickups, never swapping, chests, sight blocked by walls, unseen from behind until hit, reaction time, duels, bandaging, leaving low ground before the tide, sight lines, safe ground, and a whole 10-bot match that replays to the same state hash), plus a server config test for --bot-difficulty. Tick timing in the 20-match batch: worst match p99 2.3 ms; 21 of about 226,000 ticks went over the 12 ms budget.
Three things found on the way
Safe ground was first "the largest dry piece" per phase. On islands with two summits that sent bots swimming from one dry summit to another, and they drowned. It is now the land joined to the highest ground, so it only shrinks.
Loot markers inside huts were unreachable on the 2 m grid (doors are 1.4 m). Bots now follow the points of interest's own routes in and out.
The boathook never damages players (Harvest.swing only checks props and pieces), so unarmed bots ignore opponents. Filed separately.
Known gaps
Bots don't break crates, build, or use powder kegs and the line thrower. One match in the batch (seed 101) had 4 drownings; the cause isn't traced yet. Filed as a follow-up.
Done in 4db605c.
**What changed**
- `BotBrain` (`src/bots/bot_brain.gd`): picks a landing marker near the barge's route, loots, fights, bandages itself and keeps ahead of the tide, sending only `PlayerCommand`s. It uses what a player would know: the map's loot markers, the tide forecast, items within 12 m, opponents in view with a clear line, and who just hit it.
- `BotWorld` (`src/bots/bot_world.gd`): the shared map. Loot markers, the points of interest's walking routes into huts, lofts and piers, and each tide phase's safe ground.
- Three difficulties in `Tuning.BOT_DIFFICULTIES` (reaction 0.9 / 0.5 / 0.25 s, aim error 7 / 3.5 / 1.5 degrees, sight 45 / 65 / 90 m). The server mixes them; `--bot-difficulty=easy|normal|hard|mixed` overrides.
- `NavGrid` labels connected regions at build, so a cut-off goal is refused without searching the whole island. Those searches took about 70 ms each and were the cause of every over-budget tick I saw.
- `make bot-matches` (`tools/bot_matches.sh`, `tools/bot_matches.gd`) plays bot-only matches on a run of seeds.
**Acceptance**
- *Bot-only matches complete with a winner on 20 seeds:* seeds 101 to 120, 20 of 20 finished with a winner, none by the time limit. Seeds 1 to 10 also 10 of 10.
- *Under 10% of bot deaths are drownings:* 7 of 460 (1.5%) on seeds 101 to 120; the other 453 were weapons. Seeds 1 to 10: 1 of 230.
- *Difficulty levels produce measurably different results:* on seeds 101 to 120, mean place easy 13.7, normal 11.8, hard 12.0; eliminations easy 132, normal 137, hard 186; wins easy 2, normal 9, hard 9. In 20 one-on-one duels at 28 m with the same weapon, hard beat easy 20 to 0. Easy is clearly weaker. Hard and normal are separated by eliminations but not by placement over 20 matches, so the batch check asserts only what holds: easy places worst and hard takes the most eliminations.
**Tests**
`make check` passes: 322 tests, self-check and smoke (p99 2.0 ms with 24 bots, none over budget). New: `test/bots/test_bot_brain.gd` (14 tests: pickups, never swapping, chests, sight blocked by walls, unseen from behind until hit, reaction time, duels, bandaging, leaving low ground before the tide, sight lines, safe ground, and a whole 10-bot match that replays to the same state hash), plus a server config test for `--bot-difficulty`. Tick timing in the 20-match batch: worst match p99 2.3 ms; 21 of about 226,000 ticks went over the 12 ms budget.
**Three things found on the way**
- Safe ground was first "the largest dry piece" per phase. On islands with two summits that sent bots swimming from one dry summit to another, and they drowned. It is now the land joined to the highest ground, so it only shrinks.
- Loot markers inside huts were unreachable on the 2 m grid (doors are 1.4 m). Bots now follow the points of interest's own routes in and out.
- The boathook never damages players (`Harvest.swing` only checks props and pieces), so unarmed bots ignore opponents. Filed separately.
**Known gaps**
Bots don't break crates, build, or use powder kegs and the line thrower. One match in the batch (seed 101) had 4 drownings; the cause isn't traced yet. Filed as a follow-up.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Depends on: M4, M2, B9
Bots drop, loot, fight, heal and flee rising water, with three difficulty levels that limit reaction time and aim. Bots use only information a player would have.
Acceptance
Done in
4db605c.What changed
BotBrain(src/bots/bot_brain.gd): picks a landing marker near the barge's route, loots, fights, bandages itself and keeps ahead of the tide, sending onlyPlayerCommands. It uses what a player would know: the map's loot markers, the tide forecast, items within 12 m, opponents in view with a clear line, and who just hit it.BotWorld(src/bots/bot_world.gd): the shared map. Loot markers, the points of interest's walking routes into huts, lofts and piers, and each tide phase's safe ground.Tuning.BOT_DIFFICULTIES(reaction 0.9 / 0.5 / 0.25 s, aim error 7 / 3.5 / 1.5 degrees, sight 45 / 65 / 90 m). The server mixes them;--bot-difficulty=easy|normal|hard|mixedoverrides.NavGridlabels connected regions at build, so a cut-off goal is refused without searching the whole island. Those searches took about 70 ms each and were the cause of every over-budget tick I saw.make bot-matches(tools/bot_matches.sh,tools/bot_matches.gd) plays bot-only matches on a run of seeds.Acceptance
Tests
make checkpasses: 322 tests, self-check and smoke (p99 2.0 ms with 24 bots, none over budget). New:test/bots/test_bot_brain.gd(14 tests: pickups, never swapping, chests, sight blocked by walls, unseen from behind until hit, reaction time, duels, bandaging, leaving low ground before the tide, sight lines, safe ground, and a whole 10-bot match that replays to the same state hash), plus a server config test for--bot-difficulty. Tick timing in the 20-match batch: worst match p99 2.3 ms; 21 of about 226,000 ticks went over the 12 ms budget.Three things found on the way
Harvest.swingonly checks props and pieces), so unarmed bots ignore opponents. Filed separately.Known gaps
Bots don't break crates, build, or use powder kegs and the line thrower. One match in the batch (seed 101) had 4 drownings; the cause isn't traced yet. Filed as a follow-up.