Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Why would AI send 10 drones to one extrator ?
Why would AI send 10 drones to one extrator ?
Dec 2 2015, 4:16 pm
By: Magissia  

Dec 2 2015, 4:16 pm Magissia Post #1

The Dark Lady

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.

Dec 2 2015, 4:23 pm Pr0nogo Post #2



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.




Dec 2 2015, 4:44 pm Magissia Post #3

The Dark Lady



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.

Dec 2 2015, 5:29 pm Roy Post #4

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.




Dec 2 2015, 6:03 pm Magissia Post #5

The Dark Lady

Poking around it now builds the second extractor, but it doesn't use it.
It also tries to get gas from allies extractors.




None.

Dec 3 2015, 7:50 am Heinermann Post #6

SDE, BWAPI owner, hacker.

Quote from Magissia


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++:
Code
void ExampleAIModule::onFrame()
{
 for (auto u : Broodwar->getNeutralUnits())
 {
   Broodwar->drawTextMap(u->getPosition(), "%d", u->getResourceGroup());
 }
}


Scala:
Code
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.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[2024-5-16. : 5:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[2024-5-16. : 5:24 pm]
lil-Inferno -- poopoo
[2024-5-16. : 5:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[2024-5-16. : 3:36 pm]
NudeRaider -- :lol:
Please log in to shout.


Members Online: 9andrewc6323wc3, 9milac391ra7