Dentosal / python-sc2

A StarCraft II bot api client library for Python 3
MIT License
587 stars 182 forks source link

Expand_now failing on third expansion of Kairo Junction #212

Closed Lambdanaut closed 5 years ago

Lambdanaut commented 5 years ago

On the Kairo Junction ladder map I'm getting an error when attempting to expand to the third location. This happens in both start locations.

Here's the code for expanding:

await self.bot.do(drone.build(build_target, await self.bot.get_next_expansion()))

An example of the error:

error: ERROR:sc2.bot_ai:Error: ActionResult.CantBuildTooCloseToResources (action: UnitCommand(AbilityId.ZERGBUILD_HATCHERY, Unit(name='Drone', tag=4368629761), (55.5, 95.5), False))

It seems like expansion_locations is returning different values for that broken expansion each run. About half the games I run I'm able to expand there fine. The other half of games I get the error and the location is one tile off.

The two broken expansions are (55.5, 95.5) and (96.5, 72.5)

Lambdanaut commented 5 years ago

Note: @tweakimp was able to replicate this. The middle locations that are lacking expansions are the broken ones: https://media.discordapp.net/attachments/431774199753998346/537385483664359434/unknown.png

tweakimp commented 5 years ago

Should be fixed in current dev branch