Eccentric AI, the Challenge of Mod Planning

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
Freekill
Posts: 8
Joined: Thu Nov 29, 2007 3:11 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Eccentric AI, the Challenge of Mod Planning

Postby Freekill » Mon Dec 03, 2007 12:54 am

i was looking through firegraft and i saw that you can make all the races start out with the same units and buildings, so if the ai runs according to the race chosen, then it would be highly possible to make a mod that has 1 main race, using one food type for units, another for tech specialty factories (infantry, ground siege, air control, air bombardment, guerilla warfare, etc, each one costing 1 and the playing having a max of X), and finally one for resource producing buildings (player will be gas/ore heavy depending on construction needs). Finally if all the races are one, then you could give it 3 AI's at once, easy-med-hard or each with different tactics, like one for siege, one air master, and a final swarm type.

your thoughts and questions please
User avatar
Hercanic
Posts: 39
Joined: Sat Sep 27, 2008 6:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Hercanic » Mon Sep 29, 2008 4:56 am

As of late, I have been extensively planning the new version of STF. I won?t be saying much about it, though, until I have much more on the table.

When designing a mod, it is always important to keep in mind the peculiar limitations of editing Starcraft. One field in particular is AI coding. I want to plan unit replacements around how the AI handles things.

Why would that be important to consider? Because I feel having an AI in your mod is critical to delivering a complete experience to your players.

The Starcraft community, while still very much alive, is certainly not as vibrant as during its prime. It is, afterall, a 10 year old game. Of that community, only a fraction know about or care enough to pay attention to the modding scene. Of those that play mods, many are scattered across the globe. These timezone differences and limited audience size make it difficult to arrange multiplayer games for mods.

The only other way to play and enjoy a mod, then, is against the AI. It is a shame so few have custom AIs. Many people are liable to never truly experience a mod?s gameplay, instead just building everything and self-attacking to see what everything does. That does not convey an accurate picture of what the true, under-stress experience is like for any mod. No gameplay, just function observations.

I know there are a number of things the AI is sensitive about, but I am not completely familiar with the field. I want to ensure the potential of a functional AI by preplanning intelligently. To do this, I need to know what the AI is incapable of handling.

For instance:

1. Spells: AI scripting only covers AI Macro, not Micro. As such, spells given to other units through Grafting are not utilized by the AI. Only units that originally had the spell will use it.

2. Supply Depots: In the original STF, the person who did the AI for me said that the AI acted funny or didn?t work unless it built supply depots (it had plenty of supply from Hubs, which replaced the Command Center, each giving 50). I do not know if that is an actual limitation or was just something my AI coder was unclear about. However, at the time, to solve the problem I made a second Barricade structure using the Supply Depot that gave supply and was only buildable by the AI (no button, since the AI does not need buttons).

3. Because the AI does not use buttons like a human player, does that mean it is incapable of recognizing any Grafting changes? Is that the source of the perceived limitations?

4. Anyway, beyond that, what other limitations are there that would affect the way I outline my mod and plan which units to replace? I understand that a complete answer could more than likely be enormous, so answering in a piecemeal fashion is more than fine (what you know offhand, we can build on that within this post and compile a more comprehensive list). Is there any wiki information on this subject?
IskatuMesk
Posts: 329
Joined: Wed May 16, 2007 5:57 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby IskatuMesk » Mon Sep 29, 2008 9:22 am

On 1.) You're correct.

2.) I think your coder was inexperienced. Supply depots should have absolutely no bearing on the AI as long as it has supply.

3.) The AI doesn't adhere to buttons, only requirements. For example, in the old SYC II, the Spore Colony's requirements were a bit borked and it could turn Hives into Spore Colonies. We always wondered where the hell the hive was going! Until we saw this. This is also how AO works; Human Zerg players cannot build any AO structures or units, but the AI can. Many of AO's units don't have any buttons at all and will crash if you hallucinate/mind control them.

4.) Okay, well, micro-related don't expect anything. Most units you can just do whatever the hell with, but anything with turrets the AI does not like at all (ESPECIALLY air units with turrets...)

I think I'd have a better idea how to reply if you gave me an idea of what exactly it is you're going to want the AI to do. A good example of what the AI can do is shown in my various mods and videos, all of which are structured around the AI's limitations (I never get to play with people so yeah).
User avatar
Hercanic
Posts: 39
Joined: Sat Sep 27, 2008 6:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Hercanic » Mon Sep 29, 2008 5:05 pm

Unit Morphing: Say I give the Zergling the Lurker morph and call for the AI to make Zerglings, then Lurkers. Will it execute correctly?

Unit Merging: Same as above.

Mining/Building: Say you make something else a worker. Will the AI know to use that unit to mine or build?

Expanding: Like spells, is the resource depot for expanding ID-dependent? Say you make the Supply Depot a resource dropoff, will the AI expand with the building?

Structure Placement: How does the AI determine where to place structures? Between Baracks, Bunkers, and Missile Turrets, each needs to be placed differently to be effective. If you change any of these buildings, does it still place them the same way? As an example, say we make the Bunker into a Resource Depot. Will it be placed in an expansion or at the forefront of a defensive choke?

Placement #2: What about creep and psi? If you change a Zerg building to not be buildable on creep, will the AI still be able to build it? If you make a new building require Psi, will the AI know to build it inside a Pylon's range?

Mining Distance: Will the AI mine even if the resource dropoff is far away?

Lift-off: Does the AI ever actually use Liftoff?

Transport: Does the AI know to use units as transports if they weren't originally transports?
IskatuMesk
Posts: 329
Joined: Wed May 16, 2007 5:57 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby IskatuMesk » Mon Sep 29, 2008 9:47 pm

Morphing: Maybe. I think so. Merging I really doubt it. Worth experimenting with. Not something I used a lot in my mods.

Mining/building: Yes, UF Lour featured an additional worker and I recall it working (I'm also going to be changing up the Kaloth Industries in ITAS so we'll know for sure soon enough). Mining works most definitely.

Expanding: Hmm. I am not quite sure about this one. I think back in BoTC or MFTGATRL I made the Starport a resource node but I can't remember if the AI expanded or not with it.

Placement: Placement for the most part seems to run on hardcoded algorithms which can best be described as completely random. Tech structures (This is most noticable with ZONS which builds and utterly insane number of structures) tend to get clustered around each other. Changing these and introducing new structures (Overminds which can build units) didn't seem to really alter the building placement. The same goes with defenses, but the introduction of the "creep" command typically followed by a 3 or 4 in the script will alter how the AI places certain buildings in either psi or creep, but exactly how this command works is not fully understood. The AI can build anything on or off creep, or in psi. Just make note they need to have the available buildspace for psi structures because the AI is dumb at building placement and can easily run out. I'm not sure how the AI handles choke placement and if changing defensive structures to something else would make them rethink that.

Mining distance: I think so. It depends on the distance. On a lot of my custom maps the drones end up going out a distance on their own accord because of the way the AI saturates its resources. Again, not something I experimented with, but I think it should work for small distances.

Lift-off: The AI only uses liftoff when an addon it wants to build is blocked by something. If something interrupts the landing the structure will never, ever try to land ever again.

Transport: I do believe so. If they don't, you can just use the hero unit (Overlard) I think.
User avatar
Hercanic
Posts: 39
Joined: Sat Sep 27, 2008 6:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Hercanic » Tue Sep 30, 2008 3:28 pm

User avatar
Hercanic
Posts: 39
Joined: Sat Sep 27, 2008 6:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Hercanic » Sat Oct 04, 2008 2:06 am

Dear Bajadulce:
Makes sense now. =o) Couple more questions:

Unit Production: If you command the AI to build, say, 5 Barracks, then 5 Marines, will it build 1 Marine at each Barrack, or 5 at one? Is the AI efficient with interpretting how best to produce units?

Multiple Producers: Here's where we get messy. What if there are multiple ways to make the same unit? Say the Barracks, Factory, and Starport can all make Marines. You have the AI build one of each, then tell the AI to make 3 Marines. Will it spread out its load or default to the Barracks? What about commanding it to make 6 Marines, over the queue of one Barracks?

Multiple Mutations: Same as above, but with mutation. If both the Zergling and Hydralisk can become Lurkers, and you have the AI make 4 Zerglings and 1 Hydralisk, then 2 Lurkers, will it work? Will two Zerglings mutate, or a Hydralisk and a Zergling? Is there any preference, or will it be random?

* Oh, speaking of Zerglings, how does 2-per-egg interact with the AI? If you command the AI to make 6 Zerglings, will it actually produce double that (12), or does it take into account 2-per and mutates only 3 eggs to get 6?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 12 guests