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

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

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.
[03:20 am]
Symmetry -- Dang I'm up to 155 minerals gambling really pays off guys
[2026-10-11. : 6:02 am]
Donald -- Samase
[2026-10-09. : 2:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[2026-10-09. : 2:47 am]
Symmetry -- I'll check it out this weekend!
[2026-10-09. : 2:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[2026-10-09. : 2:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[2026-10-09. : 1:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[2026-10-09. : 1:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[2026-10-09. : 1:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
Please log in to shout.


Members Online: Sie_Sayoka, Butch