• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

AI Discussion

Status
Not open for further replies.
Level 4
Joined
Dec 9, 2008
Messages
52
Hi guys. I'm looking to get better at designing AI. I don't mean warcraft's "make unit 1, make unit 2, attack enemy" AI; I mean designing systems and techniques that manage units on a much more detailed level.

There's really no resources here, and it's a part of mapmaking that's completely overlooked. Some maps have hundreds of hours devoted to terraining, models, spells, effects, and even balance; but they just use warcraft's default AI. The closest I've seen is AI for a boss. But even then it's basically "When hitpoints reach X, cast fireball. When hitpoints reach Y, cast BIG fireball".

So, I was thinking of having fights between two AIs with very simple constraints -- sort of like RoboCode. For instance, what would be the best way to have two groups of four footmen fight each other? It seems like a simple micro-fest, but how would you really do it? It's a very clear problem and there's a very easy way of determining which AI is better, but does anyone even know where to start?

Anyway, I'm posting this because I'd like to meet other people interested in this, and perhaps have friendly contests :D
 
Level 5
Joined
Sep 25, 2006
Messages
158
one would assume that if four footman were fighting another four footman that they would attempt to gang up on the enemy with the lowest amount of health. so maybe let the regular wc3 ai play out until hits have been dealt then the footman check to see which enemy has the lowest health within a region and then they would attack that unit. for more complicated battles you'd have to take into account taking down support and ranged units early as well.
 
Level 4
Joined
Dec 9, 2008
Messages
52
one would assume that if four footman were fighting another four footman that they would attempt to gang up on the enemy with the lowest amount of health. so maybe let the regular wc3 ai play out until hits have been dealt then the footman check to see which enemy has the lowest health within a region and then they would attack that unit.
This is true. But a simple way to beat that strategy is to keep track of your weakest footman and dance it around your other footmen. That would beat an AI that just focuses the weakest. So you have to instead detect if the weakest footman is a viable target or not, etc. Then you start getting into anticipating which unit you think the enemy will attack next, using statistical analysis and mixed strategies. This can keep going!

I think there's a LARGE amount of improvement to any strategy we can initially come up with even using just four footmen.
for more complicated battles you'd have to take into account taking down support and ranged units early as well.
I think, in fact, that adding extra units to the equation would slow down any actual progress we'd make in learning this stuff because it would add breadth rather than depth.

Thanks for the input!
 
Level 5
Joined
Sep 25, 2006
Messages
158
couldnt the ai then just be changed so that it will pick the weakest enemy which is currently engaging in combat? then if it cant find anyone engaging in combat it will attack the weakest enemy in general?
 
Level 4
Joined
Dec 9, 2008
Messages
52
Yea, but some of that gets tricky once you try to define "pick weakest enemy still in combat". What defines combat? It ends up where you have to start just using a number to represent the degree to which they are in combat rather than just a binary yes/no. And even then some units might be just about to dance away, causing units to follow them and take damage. I think this can get arbitrarily complex, and I'm interested in seeing how far I can go.

Anyway, all this theory is only useful to a point. Once I get to a stopping point in my map, I'll try to test this stuff out and figure out a good format for AI fights.
 
Level 12
Joined
May 30, 2009
Messages
829
Yea, but some of that gets tricky once you try to define "pick weakest enemy still in combat". What defines combat? It ends up where you have to start just using a number to represent the degree to which they are in combat rather than just a binary yes/no. And even then some units might be just about to dance away, causing units to follow them and take damage. I think this can get arbitrarily complex, and I'm interested in seeing how far I can go.

Anyway, all this theory is only useful to a point. Once I get to a stopping point in my map, I'll try to test this stuff out and figure out a good format for AI fights.
Ah dgriff, are you trying to make Taiga Survival's carnivores pick out the weakest target (usually me, since I fight the most)?
 
Status
Not open for further replies.
Top