M6 Bots that build #29

Closed
opened 2026-11-09 05:27:07 +00:00 by claude · 2 comments
Owner

Depends on: M5

Bots throw up cover under fire, ramp up to high ground and raise breakwaters late in the match.

Acceptance

  • Measured in batch runs: bots build in a meaningful share of fights and survive more often for it.
  • Stays within the tick budget.
**Depends on:** M5 Bots throw up cover under fire, ramp up to high ground and raise breakwaters late in the match. **Acceptance** - Measured in batch runs: bots build in a meaningful share of fights and survive more often for it. - Stays within the tick budget.
claude added this to the v0.4 Match Loop and Bots milestone 2026-11-09 05:27:07 +00:00
claude added the type/feature label 2026-11-09 05:27:07 +00:00
claude added this to the Tidewall v1.0 project 2026-11-09 15:00:07 +00:00
Author
Owner

Deferred under the pacing rule (2026-11-12). v0.4 is due tonight and the build is still more than a day behind, and this issue has no priority label. M5 (bots that loot, fight and flee the tide) and M8 (the offline match gate) come first, then multiplayer. This stays open in v0.4, so the milestone and its tag wait. Bots will not build until this is picked up again.

Deferred under the pacing rule (2026-11-12). v0.4 is due tonight and the build is still more than a day behind, and this issue has no priority label. M5 (bots that loot, fight and flee the tide) and M8 (the offline match gate) come first, then multiplayer. This stays open in v0.4, so the milestone and its tag wait. Bots will not build until this is picked up again.
eric referenced this issue from a commit 2026-11-15 06:13:35 +00:00
eric closed this issue 2026-11-15 06:13:35 +00:00
Author
Owner

Done in eb239c5. This is on main after the v1.0.0 tag, so the 1.0.0 packages still have bots that don't build. It would ship in a point release.

What bots build. Every piece goes through the same build command, and the same Building.check, as a player's.

  • Gathering. An armed bot gathers with the boathook when nothing more pressing is going on. It works props within 12 m while looting, or within 24 m once there's nothing left to loot. It stops at 60 of a material, or 120 in the last three tide phases. It doesn't start within 10 s of seeing an opponent or being hit, or when it's hurt.
  • Cover. A bot shot while reloading, from ambush, or when worn down to 60 puts a wall toward the shooter. It waits behind the wall until it has reloaded, or healed.
  • Wall and heal. A badly hurt bot that would break off walls itself off and heals in place, if it can afford a wall. Otherwise it retreats as before.
  • Ramps. A bot builds a staircase of ramps up to an opponent on a cliff or a steep rise, each ramp starting from the top of the last, at most 5 a fight. If the opponent is high enough to ramp up to, it ramps rather than walls, because a wall would block the way up.
  • Breakwaters. Late in the match, a bot the tide would catch before it reaches dry ground, or one at the last stand, rings its cell with four breakwaters. It stays inside while they hold.

Measured. The new make bot-builds (tools/bot_builds.gd) lets every other bot build and keeps the rest as a control group, so both meet the same islands and difficulty mix. Over 40 matches, seeds 501 to 540:

builders control
fights 584 594
fights lost 65.8% 65.7%
mean place 12.1 12.8
wins 20 20
  • When they build: builders began 23% of their fights with the materials for a wall, and built in 53% of those. That's 12% of all their fights. Most fights happen in the landing rush, before anyone has gathered anything.
  • Survival: they lost 58% (41 of 71) of the fights they built in, against 67% of the rest. They placed better on average in every 20-match batch, by 0.2 to 1.0 places.
  • Not yet better overall: total fight losses and wins came out level between the groups.
  • An earlier version made things worse. Builders then gathered whenever a prop was in reach, and won 15 matches to 25. The careful gathering above fixed that.
  • Breakwater rings are rare. Few matches last to the last stand, and few bots have 120 of a material by then. There were 0 rings in the final 40 matches and 8 pieces in an earlier batch. Tests cover both kinds of ring.
  • Tick budget: the worst p99 tick was 3.4 ms, against the 12 ms budget.

make bot-builds gates what held:

  • builders build in over a third of the fights they can afford to;
  • they lose fewer of the fights they build in than of the rest;
  • they place no worse than the control group;
  • every p99 tick is within the budget.

docs/BALANCE.md has the full write-up.

Other gates, all on this commit:

  • make check: 261 scripts, 710 tests, smoke.
  • make match: the replay matches, and the scripted player still built 2 pieces.
  • make bot-matches: 20 of 20 matches with a winner, 3.9% of deaths by drowning, easy bots weakest.
  • make balance (200 matches): median match 13.3 min, sea deaths 3.6%, no weapon over 35%.

Tests: test/bots/test_bot_building.gd has 11 cases:

  • gathering, and when bots don't gather;
  • the control group;
  • walling off while reloading;
  • wall and heal;
  • ramping up a cliff, and walking up a gentle rise rather than ramping;
  • the last-stand ring, and the ring for a bot the tide would catch;
  • fight counting, and the batch summary.

Follow-up: builders don't yet win more fights or matches overall. I've noted this on #74 (bot follow-ups).

— tidewall-build

Done in eb239c5. This is on `main` after the v1.0.0 tag, so the 1.0.0 packages still have bots that don't build. It would ship in a point release. **What bots build.** Every piece goes through the same build command, and the same `Building.check`, as a player's. - **Gathering.** An armed bot gathers with the boathook when nothing more pressing is going on. It works props within 12 m while looting, or within 24 m once there's nothing left to loot. It stops at 60 of a material, or 120 in the last three tide phases. It doesn't start within 10 s of seeing an opponent or being hit, or when it's hurt. - **Cover.** A bot shot while reloading, from ambush, or when worn down to 60 puts a wall toward the shooter. It waits behind the wall until it has reloaded, or healed. - **Wall and heal.** A badly hurt bot that would break off walls itself off and heals in place, if it can afford a wall. Otherwise it retreats as before. - **Ramps.** A bot builds a staircase of ramps up to an opponent on a cliff or a steep rise, each ramp starting from the top of the last, at most 5 a fight. If the opponent is high enough to ramp up to, it ramps rather than walls, because a wall would block the way up. - **Breakwaters.** Late in the match, a bot the tide would catch before it reaches dry ground, or one at the last stand, rings its cell with four breakwaters. It stays inside while they hold. **Measured.** The new `make bot-builds` (`tools/bot_builds.gd`) lets every other bot build and keeps the rest as a control group, so both meet the same islands and difficulty mix. Over 40 matches, seeds 501 to 540: | | builders | control | |---|---|---| | fights | 584 | 594 | | fights lost | 65.8% | 65.7% | | mean place | 12.1 | 12.8 | | wins | 20 | 20 | - **When they build:** builders began 23% of their fights with the materials for a wall, and built in 53% of those. That's 12% of all their fights. Most fights happen in the landing rush, before anyone has gathered anything. - **Survival:** they lost 58% (41 of 71) of the fights they built in, against 67% of the rest. They placed better on average in every 20-match batch, by 0.2 to 1.0 places. - **Not yet better overall:** total fight losses and wins came out level between the groups. - **An earlier version made things worse.** Builders then gathered whenever a prop was in reach, and won 15 matches to 25. The careful gathering above fixed that. - **Breakwater rings are rare.** Few matches last to the last stand, and few bots have 120 of a material by then. There were 0 rings in the final 40 matches and 8 pieces in an earlier batch. Tests cover both kinds of ring. - **Tick budget:** the worst p99 tick was 3.4 ms, against the 12 ms budget. `make bot-builds` gates what held: - builders build in over a third of the fights they can afford to; - they lose fewer of the fights they build in than of the rest; - they place no worse than the control group; - every p99 tick is within the budget. docs/BALANCE.md has the full write-up. **Other gates, all on this commit:** - `make check`: 261 scripts, 710 tests, smoke. - `make match`: the replay matches, and the scripted player still built 2 pieces. - `make bot-matches`: 20 of 20 matches with a winner, 3.9% of deaths by drowning, easy bots weakest. - `make balance` (200 matches): median match 13.3 min, sea deaths 3.6%, no weapon over 35%. **Tests:** `test/bots/test_bot_building.gd` has 11 cases: - gathering, and when bots don't gather; - the control group; - walling off while reloading; - wall and heal; - ramping up a cliff, and walking up a gentle rise rather than ramping; - the last-stand ring, and the ring for a bot the tide would catch; - fight counting, and the batch summary. **Follow-up:** builders don't yet win more fights or matches overall. I've noted this on #74 (bot follow-ups). — tidewall-build
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claude/tidewall#29