Skip to content

Fix depot placement, Pylon power, Nuclear Silo training and invalid build types - #63

Merged
Bytekeeper merged 4 commits into
masterfrom
fix-inverted-command-checks
Nov 2, 2026
Merged

Bytekeeper merged 4 commits into
masterfrom
fix-inverted-command-checks

Conversation

@Bytekeeper

Copy link
Copy Markdown
Owner

Four more fixes on the branch of #60. Only the four commits below are new.

  • Depot placement: can_build_here checked a box one tile too wide to the right and below, so it refused most base spots once their minerals were in sight. It also saw only visible units, so spots next to unseen minerals passed. It now applies BW's box to the static minerals and geysers, and skips a mineral field seen gone. The base finder also blocked too few tiles and ignored blocking minerals and empty geysers. BW counts both.
  • Pylon power: has_power_precise counted every completed Pylon, including the enemy's, so a tile beside an enemy Pylon read as powered for us. Only the player's own Pylons count now.
  • Nuclear Silo: can_train exempted Terran_Nuclear_Missile where BWAPI exempts Terran_Nuclear_Silo, so every Train on a silo failed with Incompatible_UnitType.
  • Invalid build type: a game sent a build type outside the unit types and the bot crashed. The value now reads as None. The first such value goes to stderr with the unit, so its cause can be found.

cargo test passes locally.

🤖 Generated with Claude Code

Dennis Waldherr and others added 4 commits October 18, 2026 18:48
can_build_here checked a box one tile too wide right and below, refusing most
base spots once their minerals were in sight, and only saw visible units, so
spots next to unseen minerals passed. It now applies BW's box (OpenBW's
can_place_building) to the static minerals and geysers, skipping a mineral
field seen gone.

The base finder blocked one tile short (two for geysers below) and ignored
blocking minerals and empty geysers, which BW counts too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G7mZmXnYnfacoGvjuCRqN1
has_power_precise counted every completed Pylon, the enemy's included, so a tile beside an enemy
Pylon read powered for us. BW and BWAPI power from the player's own Pylons only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G7mZmXnYnfacoGvjuCRqN1
can_train exempted Terran_Nuclear_Missile from the "cannot produce" check where BWAPI
exempts Terran_Nuclear_Silo, so every Train on a silo failed with Incompatible_UnitType.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A game sent a build type outside the unit types and the bot crashed. The first
such value goes to stderr with the unit, so its cause can be found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1hQw9PFpN2ZatttS3djt2
@Bytekeeper
Bytekeeper merged commit 44f4a24 into master Nov 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant