Page 1 of 1

Rant: AIs and Combat Power (very, very long)

Posted: 18 Aug 2007, 10:23
by Argh
Ok, AI people. It's been forever since I last heckled you guys, because, well... you've all done a fairly brilliant job, at finally building AIs that don't completely suck.

However! Some areas of complete suck remain! And I'm here to heckle you about it :lol:


Very simply, I have yet to see any of the "free form" AIs (KAI, RAI) or "slightly guided" AIs (AAI) properly determine what a "powerful" unit is, and they're often wasting resources on really stupid stuff.

For example, I've just finished coding a mobile siege mortar. It's designed to stop moving, via COB, every time it wants to fire. Even if that wasn't a problem, it'd still be useless as an offensive unit, except in its assigned role, because it has HighTrajectory=1 set, which combined with with a weapon MaxVelocity of 550, means "it's going be up to 10 seconds before a shot hits the ground after being fired". At maximum range, it literally will have the second shot in the air, on the way, before the first one hits, and it has a reloadtime of 10!

Basically, an AI should never, ever choose to build this, until the day cometh when AIs can determine, "hey, that's a siege mortar, I should use the special Siege Mortar attack routine with it".

There are dozens of examples of this problem that I see, when trying to get the AI to play a decent game.

Another example is that I have a Unit that is currently vastly, obviously OP. Here's a breakdown of why:

It flies (big power multiplier there),
It's fast (this is obviously relative to the scale of speeds in a mod, but its MaxVelocity is 13, which is fairly quick by most standards)
It's cheap (again, compared to other stuff, there are exactly 4 things cheaper on metal, and 3 things cheaper on energy)
It builds pretty quickly (there are two things that build faster).

Its weapon has a good range range=700), travels rapidly (weaponvelocity=700), and has a CollisionSize of 16 (iow, it's designed well, and will record hits almost every shot that travels through a collision sphere) and while the weapon is slightly inaccurate (accuracy = 1200), that doesn't matter very much, because of the fact that, shooting during a dive, the cone doesn't have that long to spread, and with a ReloadTime of 0.2, the law of averages says that it's going to generate a lot of hits even in air-to-air combat).

In my mod, you can build more of two (exactly two) combat units, using the same factory and time. Both of these units are inferior in combat strength, period, although they both have their uses in an otherwise balanced game. Yet none of the four somewhat-freeform AIs properly recognize this, and build vast fleets of this unit to decimate poor human players with!

Obviously, something is wrong here, with the way these AIs weigh combat potential.

Well, aside from heckling you, can I do anything helpful, or just bitch and moan? Well, I've been thinking about this major problem for well over a year now, and I think the answer is, "yes, to some extent".

Firstly, we should make some assumptions about Units, and their relative power:

1. Flying > Hover > Ground > Sea > Submarine. While this will lead to some obvious errors in generation of combat power, it's strategically true, which is what we want AIs to use- good strategy, not just good tactics. A flying Unit can go everywhere except under the ocean, and in most mods, it will go there far faster than anything else.

Moreover, any flying vehicle equipped with direct-fire or guided weapons is capable of something unique to Spring: concentration of firepower, due to height-stacking. It's kind've a big deal- you can only put so many Peewees around the ankles of a Krogoth... during that same time period, how many Hawks can all attack it? Hrmm.

It's a huge strategic advantage, only offset by high costs and low durability. There's a reason why aircraft are one of the things most-borked in game balance of mods- it's because their designers have a hard time factoring in the benefits of time and lack of terrain problems, too. I'd say that any aircraft, irregardless of other factors, is worth 1.15 of a hovercraft, 1.25 of a ground unit, 1.5-1.75 of a ship, and 3-4 of a submarine. At the very least.

Waitaminute. Think I'm stupid? Well, let's go look-see... hrmm...

In CA, which is fairly balanced, being based on BA... the basic values, for just building the sucker, are:

buildcostenergy=4593;
buildcostmetal=114;
buildtime=7685;

Let's put that into perspective: that's the Energy cost of a Fusion Reactor doing nothing but working on the Hawk for 4.593 seconds. As for the metal... 114 metal, in a mid-game economy, is maybe 2 seconds' worth, depending on a lot of factors. And the buildtime... hmm... a Peewee is less than 1/7th.

All of this cost, for a Unit that has fewer than twice a Peewee's hitpoints.

Whose "I'm an idiot who doesn't really understand DPS" figure (more on that in a minute) is 62.7, if one takes the highest number from the Armor damage figures, vs. a Peewee's 33. Hrmm, again, less than half.

Obviously, BA's designers, who represent and work with hardcore players, know what they're about here, and agree with me, at least on this point(and Day et al, feel free to quibble with my assignments of power levels in the listings below, I'm sure we all have valid perspectives here). While the Hawk looks like a loser on paper, it's obviously a winner otherwise, or it wouldn't come with so many penalties of cost upon cost.

So, why aren't the AIs seeing this golden opportunity to rip the puny human to shreds, when even a one-star nub would probably find this loophole?

Probably, the first response by a lot of people is going to be, "cuz it's Air, and none of the AIs handle Air really well", which I think is mistaken. Once AIs build Air, they do OK with actually using it- better than players who don't know how to use the good ol' tricks, like setting up multple bomber groups to execute after some Solars they're guarding die, etc.

No, this problem also happens on the ground, too. Let's look at a rather extreme example, which actually exists in my mod:

1 Unit costs the same amount as the other one on M/E right now, with very slight difference in Buildtime (which matters, but not as much).

Unit 1 has very few hitpoints, is slow, and has a weak weapon with a very large range, that uses HighTrajectory=1 and is inaccurate. Basically, this Unit was designed to do the job of my new siege mortar, but with an emphasis on spam, instead of big damage and wide area effects (obviously, the overall effect is similar, if you have enough spam, but the latter is a LOT less CPU-intensive, which is why I'm going that direction).

It's an utterly, miserably useless Unit for direct combat. In fact, because of the spam, the arc, and slow rate of fire, if mobile Units attack, they're quite likely to make packs of these guys shoot themselves, or at the very least, they will fail to engage the mobile units and will just die. I wanted a siege-cracker to blow open Simbase, and it works beautifully- for that purpose, in the hands of a player who knows what to do. In the hands of an AI... <shudder> it mainly serves to help me destroy their bases faster, by raining down random death inside their fortress lines...

An expert human player would use this unit in precisely two ways:

1. Fire it at a known chokepoint that is not currently observed, in the hope of randomly killing enemy units as they pass through. Sometimes a waste of micro-time, sometimes it obliterates an enemy force costing far more time to replace.

2. Scout enemy defenses or production facilities with something cheap and disposable, or a radar, and then snipe from maximum range, chipping away at the defenses while moving the unit between shots to prevent being targeted by strategic weapons, long-range artillery, or aircraft.

Until AIs can actually use these weapons properly, they shouldn't even build Units with this particular profile. KAI's chokepoint-identification system, and cheating ability, mean that it could probably use these weapons effectively, to either micro their shots in front of traveling packs (ouch!) or to snipe a human's base. However, once inside about half the range, these weapons are more dangerous to the AI's forces than to the enemy, and at a quarter of the range, the Unit should be running away from the fight at its best speed!

Now, let's look at the second Unit. Again, pretty much the same cost, and a completely different profile.

This Unit has an incredible Autoheal value, and while its hitpoints aren't super, the Autoheal means that its effective hitpoints are a completely different story. It moves quickly, and has a weapon that is short-ranged but very deadly to everything it can shoot. It's designed to close and kill things, basically. Any human player will see that right away, just from the fact that it moves about twice as fast as any other ground unit, yet has a decent weapon.

Which one of these two Units do the AIs build? Well, both of them- but not in anything like the right proportions. One of these should never get built- the other one should get built, assemble into a cluster at a random spot, and then assault a target, or roam on patrol, killing random stuff it encounters along the way, if it can.

Now, I got NTAI to do things correctly, by assigning a lot of values manually. This is good stuff, really, and it works. However, RAI failed miserably to realise what this unit was for, and built a lot of other crap that wasn't nearly as effective, and I strongly suspect, that whenever I get past the bugs currently making AAI crash and KAI unable to get an economy started, that they will perform equally miserably.


Basically, the problem here is that weapons aren't just weapons, and AIs need to see weapons in their proper contexts, and assign combat values accordingly. Here are some values, fairly random and off-the-top-of-my-head at the moment, that might provide a better weighting system, and prevent AIs from making a lot of basic mistakes:


COMBAT VALUE- multiply, starting with 1.0

MOVEMENT TYPES

SUBMERSIBLE AIR: 2.25
AIR: 2.0
HOVER: 1.5
SUBMERSIBLE LAND 1.25 (This refers to LAND units that have MaxWaterDepth over, say, 50)
LAND 1.0
SEA 0.75
DEFENSIVE STRUCTURE 0.75 (Yup, that's a movement type- zero is a number, too)
SUBMARINE 0.5

SPECIFIC FBI TAGS OF INTEREST

HighTrajectory=1; 0.0 Do not build these, unless you have a behavioral subroutine specific to this type!

HoverAttack=1; 1.15 (Hoverattack means that an Aircraft will likely deliver more attacks, on average, before dying than standard types, all other factors being even)

Autoheal 1.0 + Autoheal / hitpoints (high Autoheal should be a fairly large factor in rating real combat effectiveness)

IdleAutoHeal 1.0 + Autoheal / hitpoints / 3 (much lower importance than Autoheal, obviously)

MaxVelocity (this deserves an essay of its own, but basically, all Units of a given movement class should be averaged, and any of them above the mean should get a bonus here- we could also factor in movement issues relating to possible paths / slope stuff, but that goes into some very murky territory)

If AIR / SUB AIR, then Turnrate 1.0 + Turnrate / 2000 (otherwise, it's irrelevant, do not bother factoring for vehicles, ships, etc.- while it matters, factoring how much it matters is, well, really quite difficult, to the point of being impractical, frankly- if everybody wants concrete examples of why, I can provide them)

EnergyUse IF more than 10, THEN 1 - EnergyUse / 1000 (obviously to prevent AIs from using stuff that is very specialized, which they will almost certainly screw up- no game designer for Spring, aside from me, is likely to put things into their games with EnergyUse > 1000 anyhow)

MetalUse (same)

EnergyMake 1.0 + EnergyMake / 1000 (small bonus for energy production, we're unlikely to see many combat units that make Energy, but NanoBlobs has one- the MegaSheep- and nobody but me and Day really understood what they were about... one of my weirder ideas, but AIs should handle weird ideas, too, dammit)

MetalMake (same)

Hitpoints (a difficult topic- what are hitpoints, anyhow? Especially when one factors in idle / AutoHeal and most especially, the Armor Table, plus wildly-varying amounts used by different game designers for Spring... I think I'll leave this one undefined for now, it's going to require more thought)

Buildtime (very complex topic, again, I'll have to come back to this later)

BuildCostEnergy 1.0 + BuildCostEnergy / 1000

BuildCostMetal 1.0 + BuildCostMetal / 1000 * 2 (in the vast majority of mods, metal is harder to come by than Energy, and even in NanoBlobs, I kept the values exactly even, so it wouldn't have lead to greatly skewed results)

DamageModifier 1.0 / DamageModifier * 2 (this is a tricky one, because, contextually, this is usually only used by responsible game designers under scripted conditions via SET ARMORED TO TRUE, but it *could* be used, ad hoc, to avoid the Armor table entirely, but if you're going to do that, why not just have everything use Default damage values, and just straight hitpoints? Sometimes Spring's amazing variety and complexity of handling damage, let alone the whole damage-quadrants mess, just makes me shake my head)

... that's it for FBI values. Weapon values are a whole 'nother topic, obviously, and I'm too tired to go on. Argue about the specific values, or start hashing out the boundaries of Hitpoints and Buildtime, or the other rather complex topics, or yammering about how I've forgotten something vital (if it's not on here, it's probably because it's my educated opinion that it's actually irrelevant to combat power, but I may have missed a biggie or three.

Posted: 18 Aug 2007, 15:50
by Pressure Line
antiair. depending on the specifics of the unit, aa units with toairweapon weapons often get aispammed, (flak type units esp) mainly due to high theoretical dps.

perhaps attempt to make it conditional, ie if the opponent hasnt used air, make a small amount of aa, just in case. if the opponent is constantly airstriking the ai base, build more aa

or something. its almost 2am and im more than a bit drunk

Posted: 18 Aug 2007, 16:16
by AF
Argh, its never that simple.

Universal dynamic AIs have a humongous task in that they need generic algorithms capable of handling lots of specific random possibilities, So an algorithm that plays nanoblobs perfectly is considered a critical bug under BA and vice versa.

YOu then have certain logical problems such as "what is an artillery unit?" player gives an answer in BAs context "But if I apply that to FF then all units are artillery and fi I apply it to xyz none of them are despite the mod being 60% artillery units"

Ontop fo that your asking that AI developers evaluate a huge array of variables in evaluating a weapon. This is a heck of a lot of tedious work and there are a lot of weapons. This means a lot of thought and a lot of coding and a lot of new algorithms. This isnt something youc an wave a magic wand and fix incrementally over time like the other stuff.

Whatsmore your fbi tags are useless. AIs cannot read the VFS directory listings and not all mods use weapons.tdf making AIs unable to read the fbis themselves.

What's more, the WeaponDef class doesn't have variables that map directly onto the weapon fbis. And some of these variables aren't used in some weapons and are in other or mean slightly different things.

Ontop of that you then have to generate a lot of prediction and simulation algorithms to accurately portray the weapons.

And on top of all that, I dont think you've noticed, we have never had so few developers in the entire history of AI development. We have 2 active AIs, and the last time it was in this state was back in the NTai JCAI days.

And if that wasn't enough, jelmer and I actively worked on our AIs with a vast pool of motivation and we did it quite fast. AI development today is much slower and emphasises fixing bugs and making small changes over large restructuring. So far the only restructuring of any note in the last 6 months has been victors addition of saving and loading and my switch to my new task system which had long been in the works and took a long time to mature.

Posted: 18 Aug 2007, 16:22
by Tobi
I do not think you can categorize units on a lineair one dimensional (power) scale. For example, 100 crashers easily kill 100 hawks in XTA, while your scale suggests that a hawk is two times as powerful.
(I do agree though that certain types of units have advantages over other types due to their movement range, but I think this can not be solely used to determine a unit's power.)

I think the AI would need something like unit categories with a specific purpose known to the AI. Every unit would be of a specific category, and it would be good at attacking certain other categories, and it would need be avoided if the enemy uses certain categories. It could (should?) even weigh the different categories, so e.g. air will not be totally excluded once the enemy makes one anti air unit.

Examples:
Land / Anti air: use land movement routines and use only when enemy uses Air.
Land / Anti land: use land movement routines and use when enemy uses Land.
Air / Anti air: use fighter movement routines and use when enemy uses Air
Air / Anti land: use bomber/gunship movement routines and use when enemy uses Land.

Posted: 18 Aug 2007, 18:19
by 1v0ry_k1ng
all of this is immaterial with AFs config system. completely owns all this stuff about combat power. you get one of each mods high end players to make a config, and it will play very well, make the right units, use the right build order, build the right ratio of defences to area, spam the right units etc.
every AI should use a config style system really imo.

if you could then combine AFs config system with intelligent attack behavior via KAIs pathfinding magic, you would have an AI which plays as you describe. configs allow units to be tagged.
a "scout tag" for raiders maybe, or "artillery" for units only to be used on structures.. the list goes on.

Posted: 18 Aug 2007, 20:52
by jcnossen
What AF said yeah: the problem is much more complicated. Many AI writers have spend months on this problem. You are already assuming and leaving stuff open a lot.
Also even if the AI makes the right unit balancing wise, it still has to classify it and use it in the right way.

The funny part is that what most modders claim is impossible (except for caydr i think), which is balancing with formulas, is something the AIs actually have to do if they don't use learning or config files.

Damn I want to make an AI again, but theres no time :S

Posted: 18 Aug 2007, 21:16
by FLOZi
I still think that ultimately custom-made AIs would give the best performance - of course, that would be a massive undertaking by a mod team and is very unlikely to happen.

Posted: 18 Aug 2007, 22:55
by Argh
Firstly, you're all right- I'm attempting the impossible. Kind've fun, really. I think you can all see where some of my assumptions are breaking down, which is somewhat to the point, actually. I wanted all AI designers to see where their weighting systems are invariably going to break.

Now, that said, let's take another tack entirely:

What if, instead of building uber-complex weighting systems, all config-less AIs used a common system of keywords, in the Unit FBIs, that helped guide them to towards correct usage of a given Unit? If they all shared this in common, they would make far fewer mistakes, other than classical problems such as, "this doesn't have a known category". I know that the config-less AIs are all doing this sorting anyhow, using their various weighting systems- wouldn't it greatly speed up their processing load, and simplify their design? All that needs to happen, in order for this to work, is for AI developers to come to an agreement about a common set of standard keywords- everybody could continue to define what each keyword actually means, within their systems.

For example:

AIKeyword=LAND ASSAULT CHEAP POWER 0.5 2.0 0 0 0;

We have three keywords, all with meaning here.

The AI doesn't need to check all possible movement of the Unit, or its primary area of travel- it's a LAND Unit. If the strategic problem currently being solved is on LAND, then this Unit may be appropriate.

The AI doesn't need to try a weighting system to determine what might be good for attacking fixed defenses- ASSAULT tells the AI what it's good for.

The AI doesn't need to weigh every possible Unit against every other possible Unit, and realize that this Unit is CHEAP. The game designer can do this, easily, whereas an AI will probably screw this up.

Lastly... POWER is a way to scale things a bit, so that AIs aren't forced into single-chute problems all the time, and can actually "see" what mixes might work. The numbers following specify the following:

0.5 = defensive power. Not a good defensive Unit. The AI doesn't need to know "why", just that it is not good defensively. Don't let it sit around the Simbase, kk?

2.0 = offensive power. Good for attacking targets. Move towards enemy.

The three zeros are for: the amount of strength as a builder, the amount of strength as a producer of metal, and the amount of strength as a producer of energy. The last two seem like they're fairly easy to decode from raw stats, but it's rather more complex than that- IRL, players have to stage things in certain orders, for best efficiency... this is one method of simulating that.

Sure, there are problems with this system, as well. The biggest one being that you're going to end up with logical conflicts, for very specialized Units. This can be avoided by, among other things, requests from game designers to the AI designers, to accommodate whatever bizarre idea they've managed to come up with. However, a fairly flexible system should get around a lot of this.

For example, for the siege mortar... well, that would be something like:

AIKeyword=LAND SIEGE STRATEGIC CAREFUL;

SIEGE would mean, "don't build me, unless you're Assaulting a fixed position, and your casualties exceed whatever your pain threshold is".

STRATEGIC means, "don't use me to attack mobile Units. Attack-ground or attack buildings only".

CAREFUL means, "do not advance until X Assault Units have been pathed".


Just using a keyword system would make config-less AIs much less likely to make serious mistakes. If a Unit doesn't have a config, well, gee, then you can just assign it to RANDOM, and when a game designer whines, "hey, your AI sucks, it never uses my Units correctly", you can point at a common set of standard keywords, and say, "hey there, game designer- these are the keywords config-less AIs use, to determine how best to use things- USE THEM". Because, lord knows... during the course of building a game design, a given Unit may change its real purpose several times, or get subtle shadings of meaning that an AI will never get- plus we have all of the strange cases, that defy easy translation. A common system of values would provide game designers with a common language to discuss AI issues, and would give AI designers a common language to discuss the practicalities of their designs.

If there is more interest in this, then I will happily write a first-draft set of keywords, with input from any game designers who want to participate.

Posted: 18 Aug 2007, 23:23
by AF
Thats a very idealistic idea there argh. Its the sort of idea thats just never going to happen.

And if it does itll never be as widespread as needed. Modders have already spent time adding a simple 1 NTai tag tot heir modinfo.tdf and they still havent all doen it, and none of the other AIs have taken it upon themselves to make use of this useful tag present in all the major mods to streamline their configs/caches.

Now ask a modder to go through hudnreds of units classifying each one then tweakign all the values appropriately. Then whats appropriate optimum values for AAI may bork KAI and vice versa. Then theres different methodologies in each AIs implementation.

Ontop of that its all relative, each units power is relative to its situation and its opponent and the unit mix its group has. Ontop of that, how it's used has a big impact on the type of role it currently occupies, even the strategy of the opposing player and that of the AI.

I believe I shared some of my ideas on Epic with you? Or at least you had access to the private forum before it went down at one point? Those designs would solve this problem quite well without being dragged down into complex per unit per weapon simulations. However I doubt the infrastructure in place for implementing them will be there anytime soon, we still dont have lua <-> AI and thats a very big must have.

Posted: 18 Aug 2007, 23:52
by Argh
Its the sort of idea thats just never going to happen.
Well, it can't happen if nobody tries, that's for sure.
And if it does itll never be as widespread as needed.
Well, it's never going to be perfect.

However, what most AI designers are doing right now, with absolutely no attempt at standards, is not working very well, for any game designs that go out of a very small box of value. Which, in turn, reduces game designers to either forcing their visions into that box, or abandoning offline players, which constitutes a very sizable fraction of the playerbase (in fact, I strongly suspect that more people play offline than on, as is usual with these kinds of games).
Now ask a modder to go through hudnreds of units classifying each one then tweakign all the values appropriately.
Hmm. I got you rolling with NTAI's concept, with a small mod, with a smaller number of very specific units, where I could show off what it could do here. The NanoBlobs configuration and tweaks was an important step forwards, and I daresay that it helped generate a lot of good feeling about configurable AI in general. A year ago, nobody would have been saying, "just set up an NTAI config, it'll solve your problems, nub", like one of the posters did, above- because it didn't exist then.

Has it not occurred to you that I might be doing this again, but with a more classical game design? I ain't building that art just to make screenshots.
Then whats appropriate optimum values for AAI may bork KAI and vice versa.


Yeah, and this is precisely how to get out've that trap. AAI, KAI, VAI, etc., etc. should have a common set of standards- how they choose to interpret those standards is up to the AI designer, but if they don't do a very good job, then I think that people's negative responses will push the designers in a better direction, tbh.
Ontop of that its all relative, each units power is relative to its situation and its opponent and the unit mix its group has.
Now you're just quoting me back to myself- I said that almost two years ago, when I first started heckling you people ;) That part hasn't changed, and never will. It doesn't mean this is an invalid idea, just that it will continue to have problems with overall efficiency. Individual players also routinely screw this part up, too, so I'm not terribly concerned about that.
I believe I shared some of my ideas on Epic with you? Or at least you had access to the private forum before it went down at one point?
I read through some of it, but didn't feel like I was seeing a complete idea yet. I'm still waiting for your Voronai Diagram stuff, and cleaner pathfinding. If you really want to do something awesome for Spring... well, you've got the skills and the work ethic, so instead of wasting time on side projects where you're fighting competition because it's relatively easy... why not fix K-Man's steering code and build something better?

Heck, I'd love it if somebody even tried implementing that crazy idea I posted on the CE forum, and used a grayscale heighmap approach to simulate probability of collision...

Now, the LUA<-->AI stuff, and the necessity of that... I am 100%, totally, in agreement with you. With LUA<-->AI properly working together, AI design in general would get waaaaaay simpler, because AIs could waste a lot less time on certain tasks, or could use a LUA script to generate random results without having to oversee stuff, etc. For example, it'd be great to be able to write an AI attack subroutine, then have it pass off to a LUA script that gave each attacker a different path assignment, gave some of them different orders, etc., to keep the attack from being predictable and easily defeated. And that's just scratching the surface.

Posted: 19 Aug 2007, 00:22
by AF
I dont remember that CE probability stuff.

The voronoi diagram stuff isnt coming anytime soon and I doubt it ever will, the demand based systems seemed to have much greater promise.

Ontop of that when you started that second thread to heckle us having returned to see an AI community had sprung up you were in the start of the AI golden age for spring. The bubble burst! Since KAI and AAI development fell in on itself I and kloot have been the only active developers, and AI development speed and momentum is dwindling. If kloot and I died in a car crash tomorrow our AI scene would be mortally crippled. Submarine hasnt made a commit himself in ages its just developers fixing compile bugs, kloots been trying to fix the KAIs, and I'm the only AI dev left whose added features, and they arent very big ones either. And recently it seems Reth is loosing momentum too.

And argh, dont flatter yourself but I knew Id have to move my hardcoded build tree out of the c++ class and into textfiles almost as soon as I wrote it. I just didnt place it as high a priority as I should have and when I did it was mainly me who maintained them for quite a while. Of course then you and lindir started using them and thigns changed.

Posted: 19 Aug 2007, 04:06
by Kloot
There are really only two decisions that an AI has to make about any unit:

1) how to classify it
2) how and when to use it

Obviously #2 follows from #1, but also heavily depends
on context (where 'context' equals the battlefield situation,
it's not a game of pure numbers), while #1 just depends
on the mod being played. The difficulty is that whereas for
#1 you can go the algorithmic route (although at the cost
of many dead ends, classification algorithms are about
finding patterns in data and not every piece of it will fit
one neatly) or employ human knowledge via configs and
the like (although then you do away with the 'A' in AI to an
extent), for #2 you absolutely need a high-level reasoning
component, something that takes as input a representation
of the known gamestate and outputs lower-level orders, or
plans, which combine to form a strategy (both reactive and
proactive). You can't derive a unit's best use looking only at
the class it belongs to, that information at all times has to
serve as a hint with respect to the state and never as a
commandment. Anyway, if you (Argh) feel up to a challenge,
this is where to start.

Posted: 20 Aug 2007, 08:34
by REVENGE
These posts are long.

Posted: 20 Aug 2007, 10:14
by Sleksa
im going to use the mod balanced annihilation and the map comet catcher as a example from now on.



i think argh is making very good points in his posts, altho i have very little knowlege on the ai;s , i see the "wrong" type of behaviour on wrong units a lot with the ai's. ai's build artillery just for the sake of having arty in the mix if the need arises for it, where human players try to use their metal to counter the units it sees.

ai builds anti air just for the sake of having anti air.

human players usually build their first defender when they see the first fast moving blob coming at them.

most players start out with few mexes and solars and then a veh lab.
they then try to expand and raid while trying to protect their already up&running expansions.

The ai,s on the other hand, build energy and metal buildings to achieve maximum efficiency to pump out units after the commander decides to build the lab.

the ai neglects raiding heavily
the ai builds wrong kind of units (stumpies, arty, janus, leveler or even a completely wrong kind of lab, kbot or air.)

this sets it back very badly, since it cannot protect its expansions, getting crippled, and it also cannot raid since it has produced wrong, slow-moving units that will get chewed up by enemy raiders (jeffy/flash)


if it gets its economy up, it still focuses on maximum efficiency, it tries to protect its expansion using a set algorithm, instead of using "brains". it will build a llt behind a mex in the heart of the enemy's side, and after that it will build a HLT to protect a mex in the heart of your base.

human players will use radars and put llts on obvious points of attack, chokepoints, and protect their rears/flanks from attacks with statics, According to the situation.

if the human player sees he has crippled the enemy, he will keep spamming cheap raiders to keep the other player in check while building lots of constructors to cap the metal resources of the map.

on the other hand, if the ai cripples the enemy with his early artillery units, the ai does not recognise this, and keeps pouring lots of his resources into expensive, special use units, instead of doing what the human player does, raiding and capturing land.



im not sure if this is even possible and does this have anything to do with anyone's posts in this thread, but if the ais could understand these kinds of phases in the gameplay it would help them greatly, IMO.

but adapting ais are hard to come by ~_~



1) how to classify it
2) how and when to use it
the #2 is what i basically tried to tell in this post

Posted: 20 Aug 2007, 12:03
by 1v0ry_k1ng
Sleksa wrote:the ai neglects raiding heavily
the ai builds wrong kind of units (stumpies, arty, janus, leveler or even a completely wrong kind of lab, kbot or air.)
actually i made a BA NTAI config that starts vehicles and makes the er, right kind of unit :wink:
NTAI allows very intelligent build orders because it is so customisable

Posted: 21 Aug 2007, 07:25
by Sleksa
that means you can insert BO;s into it?


but does it know when to switch from raiders (maek gater/wezel) to lev/wolverine/slash/raider?



and most of all does it counter enemy raids and do raids itself?




(i need to test it as soon as i get home o,o)

Posted: 21 Aug 2007, 09:38
by KingRaptor
I don't know about other configs, but on DJ's BA config it spaems flash a lot.

Even head-on against LLT walls. gg ~~

Posted: 21 Aug 2007, 11:01
by DJ
I don't know about other configs, but on DJ's BA config it spaems flash a lot.
It should learn not to do that after a while but I think the learning is a bit borked on NTai at the moment...

Posted: 21 Aug 2007, 13:52
by AF
Would people please stop calling it learning!

If NTai was currently capable of doing that I'd have a job as a researcher at a top AI research organisation and several honorary degrees under my belt.

Do you guys really realize just how much effort it would take to make an AI do that for the reasons you put forward? You cant teach an AI that driving flashes into an llt wall is a bad idea, you can only hard code it not to or devise generic systems that just happen to prevent it happening in the first place.

Please stop the unrealistically high expectations. If AIs could really do this you'd all have supercomputers, be up for manslaughter for killing off an entire team of AI developers, or complaining that the AI isn't really being intelligent and just using a quick kludge to simulate the process cheaply.

And for the veyr last time:

NTai doesnt learn, and neither does AAI, none of our AIs learn, you just fell victim to a big bout of misadvertisement. What people call 'learning' in our AIs is just a value representing how efficient the unit is that gets higher as the unit kills more stuff so more of it is built.

Thats why attacking AAI with 90 thousand torpedo bombers will make AAI build nothing but torpedo bombers.

Posted: 21 Aug 2007, 13:56
by DJ
I'll call it susan if it makes you happy

All i was trying to say is it should impact on the efficiency rating of a flash tank if the person who plays against it continually builds an llt wall that they just march into. I didn't have un reasonable expectations, I didn't expect it to move the tanks round the llt wall. I just expected it to change the percentages and build more of a different unit.