Greetings, trying to make UMS map with AI for once, and got unespected results.
What could cause such behavior ? There's nothing complex yet, some area town and a campaign AI
The AI took drones out of the mineral fields do to that.
Here's all the map's trigger, the green zerg is player 5.
https://paste.aperture-sc.net/?f97ea335fe330cbc#wWLcwyBerG3ov9mEa1LRa/eKLICKqwow59XmenMEo1E=
None.
AI in BW is dumb, but there's probably a better and more controllable explanation. Try messing around with what the AI locations cover. See if making them cover the workers and resources makes any difference.
The location already strictly cover the hatch and the ressources, the same way it is in campaign maps I explored.
Should it be otherwise ?
None.
An artist's depiction of an Extended Unit Death
A town implies an independent ecosystem. The reason the AI sends that many drones is because each town expects an extractor to use. If they had their own extractors, the drones would go to their respective resource. As for why they ignore the bottom geyser, it's anyone's guess, but I'd assume it would be related to the current tech tree and resources suggesting to the AI that it shouldn't make a second extractor so close to an existing one yet.
You can cover the entire area as a single town, and the AI should still use the additional hatcheries: you don't need individual town AI scripts for each hatchery. Of course, maybe the AI around this doesn't work as I'd expect; playing around with the AI scripts like Pr0nogo suggests is the usual approach to handling these oddities.
Poking around it now builds the second extractor, but it doesn't use it.
It also tries to get gas from allies extractors.
None.
SDE, BWAPI owner, hacker.
The location already strictly cover the hatch and the ressources, the same way it is in campaign maps I explored.
Should it be otherwise ?
When you run an AI script at a location, what the location actually covers is [mostly] irrelevant. It essentially just designates the center of the location as its first town (regardless of the location size). Resources placed close together are assigned to the same base location. Base locations are determined before the match begins along with the region routing (internal pathing and such).
In the above screenshot, everything there is considered ONE town (base location). To prove this is the case, you can create a
BWAPI AI module with the following
onFrame code:
C++:
void ExampleAIModule::onFrame()
{
for (auto u : Broodwar->getNeutralUnits())
{
Broodwar->drawTextMap(u->getPosition(), "%d", u->getResourceGroup());
}
}
Scala:
override def onFrame(): Unit = {
game.getNeutralUnits.foreach(u => game.drawTextMap(u.getPosition, u.getResourceGroup.toString))
}
Observe that
getResourceGroup returns the same value for all of those.
You should only run
ONE fully qualified AI script per player. Running multiple fully qualified AI scripts (such as a town script) will cause your computer AI to glitch.
Fun facts:
- The computer AI can only track a maximum of 3 extractors per town.
- Every start location becomes a base location that the AI can use. If you place, for example, player 8's start location in the middle of nowhere, the AI will expand there even if there aren't any resources near it.
As far as sending several drones to one extractor, make sure only one script was run, also make sure there are enough minerals to harvest. Maybe you just have too many drones?
Consider also experimenting with "recycling" the AI's resources. I recall that at the start of a game for example, subtracting 50 minerals and then adding 50 minerals again caused the built-in AI to build its first worker more quickly.
Post has been edited 3 time(s), last time on Dec 3 2015, 8:06 am by Heinermann.