• 🏆 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!

Strategy AI Contest

Status
Not open for further replies.
Level 25
Joined
Jul 10, 2006
Messages
3,315
A contest about coding AI and also creating a strategy on a map newly created for the contest. All the AIs will fight each other in an even battlefield to see which is the best.

We could also use an existing micro/tactics map.

  • Any code type allowed - GUI/JASS/vJASS, or even wurst compiled into plain jass
  • Code quality/performance isn't very important, this is all about winning
  • No random numbers
  • You may only perform functions using positions of enemy units that are within vision of your own units. Similarly for other functions, like number of units in an area.
  • Map
    • Terrain will have cliffs/hills/obstacles and perfectly symmetrical from both spawn points
    • 5-10 unit types available, including spellcasters and specialists. Each unit has a gold cost.
    • All units' damage will have no random factor (i.e. 13-13 damage instead of 12-14 damage) and no spells will have random effects (e.g. bash)
  • Battle
    • Every AI will fight in a Best of 3 (for a consistent result) battle against every other AI, with a point going to the winner. AI with the most points wins.
    • At the start of every 1v1, the AI will buy units with a starting gold amount (you program your unit choices into the AI)
    • Both AIs buy their units instantly and cannot see what the other AI has chosen, so there is no counter-picking

Would anyone be interested in participating in such a contest? It might be fun to have this be a monthly affair where everyone reviews the new "patch notes" for the contest map and adjusts their AIs accordingly.

This wouldn't be strictly for coders only, a good strategist could win by selecting a superior unit composition and attack-move.
 
Last edited:
Level 25
Joined
Jul 10, 2006
Messages
3,315
didnt this pop up before too? I think by you too :D I would be intrested in this one

Not that I recall... but my memory is quite bad :p

Rex. said:
So is it like AI tournament?

Yes.

Each participant creates an AI that will:
- Buy specific units at the start of the battle
- Order these units to attack the enemy
- Micro units, cast spells, dodge attacks, etc
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,229
Test conditions are not fair.

The involved units must be modified such that all randomness is removed (flat damage). The condition under which the AI chooses units must be such that all chance is removed (eg, each chooses a unit in turn). Additionally the test has to be repeated with the AI swapping positions in case internal ordering favours one side of starting. It must also be repeated several times to assure consistent results (best of 3 recommended).
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
That is the plan. No abilities will have random effects.

If an AI contains any use of a random number, the battle will be repeated another ~5 times.

Randomness is a tool I've used to great effect in AIs in some of my maps, so I'd prefer not to ban it entirely. Once we have enough interest, we could do a poll to decide whether or not to allow it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,229
Randomness is a tool I've used to great effect in AIs in some of my maps, so I'd prefer not to ban it entirely.
It makes for fun AI to fight as a human, but in real AI randomness has no real place. If the AI function has considerable uncertainty then as long as it is correct, taking the most likely outcome will always be the best. The problems (and hence most loses) comes from the algorithm not being correct. True intelligence such as Humans is a very in-exact process which is governed more by "it works" rather than "it is optimum".

Randomness only works due to it being similar to real intelligence in some respects. Since real intelligence has uncertainty and randomness is uncertainty then as long as the range covers the optimum then you have a chance of optimum results (the "it works" part, even if there are huge losses). However in a truly intelligent system with correct algorithm there is no need for randomness as uncertainties can be weighed up and the optimum result always chosen.

If the intent is to introduce uncertainty to the opposing intelligence then the randomness can be introduced as a sequence of memory modifications that affect the uncertainty of results hence given the same percepts a different action will be carried out. This only really counts if uncertainty can be introduced to the opposing intelligence (the sensors are not good enough to eliminate it).

A good example would be building armies without knowing the opponents composition. One can easily see that the winner is mostly determined by luck then as it is possible one side chooses a direct hard-counter line up for the other side's selection. In such a case the best outcome would be to introduce some random sequence into the selection process such that the uncertainty will favour different units in subsequent runs. Since it is truly random then trying to devise a counter composition to it logically is impossible since there is no sure way to know what you are up against. Obviously some units might have their uncertainty skewed such that they will be chosen in more states than others due to them being more useful but that comes down to the correct logic of the intelligent function.

Additionally if facing a natural intelligence source (human) you will find that the army composition they chose is not random but always skewed in some way, hence uncertainty of composition choices can be skewed in favour of counter units (the "know your opponents" part of an intelligence). This is most easily seen in natural intelligence with the game "Rock Paper Scissors" where it is possible to achieve consistent wins against some opponents by knowing what they will choose (lack of randomness). The irony is that in such a case no intelligence is needed at all since a simple random sequence would achieve optimum results all the time (both sides get 50% win on average with some Gaussian distribution due to nature of randomness).

One must remember that in such a case where logical choices are not possible due to high levels of uncertainty then there really is no need for an "artificial intelligence" since there is nothing intelligent to be done (randomness can be considered a lack of thinking).
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
All units' damage will have no random factor and no spells will have random effects
And we have a WINNER!

The map should be 100% symmetric to remove chances on that.

All AI use the same faction (probably a self created one).

Imo, there should be some kind of scouting system that can be used for every AI.
I mean that every player is aware of the vision, intelligence and position of each player.
Your AI is for example only allowed to enumerate the units returned by the system.
(Each player has a unit group called AllUnits (array) which must be used instead of EnumUnits from GetWorldBounds().
Also it must have knowledge about what units have been seen but what units are not in sight any more and how long ago that was etc etc etc.)
That would make the AI more human like.

Also balancing the map should be done to some minimum balance.
I assume that the map will be introduced when the contest starts, but before starting I'd recommend letting people like the judges etc test out the balance.

Next to that... great concept!
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Excellent points, thanks for the input.

I hadn't considered that the randomness could be used in your army composition, at which point it could have such a large effect on the outcome of the battle that we'd need to run hundreds of battles to get an accurate result.

Imo, there should be some kind of scouting system that can be used for every AI.
I mean that every player is aware of the vision, intelligence and position of each player.
Your AI is for example only allowed to enumerate the units returned by the system.
(Each player has a unit group called AllUnits (array) which must be used instead of EnumUnits from GetWorldBounds().
Also it must have knowledge about what units have been seen but what units are not in sight any more and how long ago that was etc etc etc.)
That would make the AI more human like.

I considered this, but I think it might make it prohibitively difficult for tacticians without coding experience to participate. The task of discovering the enemy's position is quite an involved affair.

If only coder-types participate, I fully agree with you, that would increase the strategic depth.

Also balancing the map should be done to some minimum balance.
I assume that the map will be introduced when the contest starts, but before starting I'd recommend letting people like the judges etc test out the balance.

That's the plan, at the very minimum every unit will have a good counter.

Part of the challenge for this contest is analysing the units' balance to see which unit your opponents will most likely use (the meta).
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I considered this, but I think it might make it prohibitively difficult for tacticians without coding experience to participate. The task of discovering the enemy's position is quite an involved affair.

If only coder-types participate, I fully agree with you, that would increase the strategic depth.
But you based the idea on Triggered AI...
So everyone will be using stuff like that.
And the system itself is written by someone that doesnt participate and is just made for this contest...
I dont see why people with less coding experience would have a problem with that.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I've had an idea similar to this one. Well, it's quite important to think of what exactly provides the AI with ways to be intelligent.
For instance, strategy games typically don't have many manual-cast abilities, because using them quickly turns into a contest of speed, not thinking. Such a limitation practically doesn't exist for AI.
Then again, many abilities that are good for human players are not good for AI, due to requiring skills that AI is bad at(approximating what the other will do).

I'll keep an eye on this thread.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
People die to the intermediate bots in LoL as well, despite them being totally rubbish. That's why I specifically said "pros".
Bots are of course faster and have better mechanical "skills", but still, they don't typically read out things like baiting.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
It really depends. Just try making a LoL bot that can beat pro players. It simply won't happen.

While AIs cannot think creatively, they handily beat humans in mechanical tasks:
- last hitting/denying
- dodging abilities like meat hook/arrow
- chain stunning and not stun stacking
- reaction time (dodge faster with blink, can quickly disable initiating enemies)
- maintaining an exact distance in formation to mitigate AOE abilities

The next piece in the puzzle is an overall game strategy and players' movements around the map. Hero picks and bans is trivial to program, an analyst just needs to give the AI data on which hero counters which, which are good combos, etc.

It definitely can be done, but it's too massive a task for a hobbyist with a bit of interest.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,229
last hitting/denying
Heroes of the Storm does not have that.

- dodging abilities like meat hook/arrow
The AI do not do that either. Seems SC2 engine is not very good with projectile dodging.

- chain stunning and not stun stacking
Pretty much the only way to die in an AoS against a robot if you control a fast character.

- reaction time (dodge faster with blink, can quickly disable initiating enemies)
One of the few things the AI does right. If you fight Protoss in SC2 you will notice them ninja blink their stalkers as you damage them.

- maintaining an exact distance in formation to mitigate AOE abilities
Also a feature that is missing from the SC2 engine (probably because it is aimed at "ball of death" RTS). I would say this is a huge weakness for Heroes of the Storm as you can literally hammer them repeatedly with AoE moves until they are forced to run and have another team member snipe them off the back.

Now I understand people losing to AI in LoL, HoN and DotA2. I even lost to AI quite a lot in DotA in WC3. However that is mostly because the games have retarded mechanics which AI do better (last hit denying, how that makes sense is beyond me) and require one to learn a tomb of item costs, locations and prices for each hero. However Heroes of the Storm has none of that, and anything cleaver you can do in Heroes of the Storm is never done by the AI. Yet people still manage to lose...
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,229
I read the whole thing. goddamnit. It's like letting your rooster fight other roosters and bet who's gonna win right?
Yes, and unfortunately I think I am being beaten by a rooster at the moment... jk

Both AIs buy their units instantly and cannot see what the other AI has chosen, so there is no counter-picking
This is not a good idea since it comes all down to luck which AI is programmed to buy a direct hard counter to the other AI. One AI might win most matches because it uses the best unit composition from the available units (mathematically computer best) however lose to one stupid AI who just happens to buy one of the few compositions that counter it.

As such I recommend army purchasing be done as rounds of a transaction of one unit from both AIs. The AIs put forward a unit order. Once both AIs have placed a unit order then they receive the unit and can see the order that each other placed (the resulting units). The round advances and unit orders can be placed again. They have to place an order (so are forced to be exposed to possible counter picks) every round with exception if there is nothing more they can order (out of gold) in which case the opponent logically can pick whatever he wants without concern of counter pick.
 
Level 11
Joined
Jun 2, 2013
Messages
613
So you are basically talking about an AI that will select unit's counters in a draft format?

I was under the impression that:
1) You Have the AI train units (that you predesignate) for your particular strategy with the set amount of gold you have.
2) Develop a strategy for your AI to follow with the units you buy. Each 'game' your AI would use the same units and use the same strategy.
3) NOW, Depending on how you write the AI's to respond when unit's receive damage and how it will react to different combat situations would then determine the outcome of the fight.

I think a draft would take the fun out of it because then each AI would always pick a counter for the previous unit that got picked. It would take the enjoyment out creating a unique strategy with the units you have available because you would instead just be writing code on when to dodge etc.

If anything, do both: create an AI that selects unit counters in a draft and pre-set army with your strategy that the AI will follow.

All in all though this a cool concept for a contest, hell even as just a fun map event it's a good idea.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
now that sounds like good idea, but it puts a bit of constrait on the code to be able to digest opponent's picks, maybe programatically too.

But there could be something like, you have to provide this and this and this function(or this and this and this trigger expecting units under this and this and this variable name in input), so things like these can be unified. Who doesnt provide this generic API gets disqualified(would be a requirement)
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
This is not a good idea since it comes all down to luck which AI is programmed to buy a direct hard counter to the other AI. One AI might win most matches because it uses the best unit composition from the available units (mathematically computer best) however lose to one stupid AI who just happens to buy one of the few compositions that counter it.

As such I recommend army purchasing be done as rounds of a transaction of one unit from both AIs. The AIs put forward a unit order. Once both AIs have placed a unit order then they receive the unit and can see the order that each other placed (the resulting units). The round advances and unit orders can be placed again. They have to place an order (so are forced to be exposed to possible counter picks) every round with exception if there is nothing more they can order (out of gold) in which case the opponent logically can pick whatever he wants without concern of counter pick.

I feel that might diminish the strategy and analysis part of the contest. We're all presented with the same units, so you have to determine which units will be the most popular (predict the meta) and counter that accordingly.

The contest is not just about winning a game against another particular AI, it's about the sum total of all matches your AI plays. So if you make a cheesy mass archer strat that works well against some lineups you'll get a few wins, but lose against most other armies. A more balanced army might fair better against more types of unit compositions.

In your example of one excellent AI that wins against everything but one, that AI will still win the contest as it will have the most points.

Hopefully this can become a regular contest, and you can use information on the meta gathered from the previous round to adjust your lineup and strategy accordingly.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
maybe someone creates or grabs(from another contest) some custom race for every AI contest, to spice it up? So one AI contest has to play with humans for instance, and on another one, with some modified orc or something like this.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
double post I know, but I think this could be discussed in some live session, rather than here(results or something could be posted here), cause as you see it sometimes takes 2 days for someone to respond/react, whereas in live chat you can answer in matter of seconds, which would settle things a lot, lot quicker
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,229
I feel that might diminish the strategy and analysis part of the contest. We're all presented with the same units, so you have to determine which units will be the most popular (predict the meta) and counter that accordingly.

The contest is not just about winning a game against another particular AI, it's about the sum total of all matches your AI plays. So if you make a cheesy mass archer strat that works well against some lineups you'll get a few wins, but lose against most other armies. A more balanced army might fair better against more types of unit compositions.

In your example of one excellent AI that wins against everything but one, that AI will still win the contest as it will have the most points.

Hopefully this can become a regular contest, and you can use information on the meta gathered from the previous round to adjust your lineup and strategy accordingly.
In which case why not just give the AI a fixed starting army. What you are asking is more "human" intelligence than artificial. Like the build orders of SC2 melee AI you are expecting a real person to hard-code in the best AI response. For real intelligence it has to be able to choose its army based on some percept and not some hard-coded order (it has to justify why it makes a choice, instead of "god" giving it the choice).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,229
A large part of the contest is the strategy aspect - choosing your units. Giving each player the same starting army might be more fair, sure, but it's also more boring and makes this purely an AI contest.

Asking for more "human" intelligence is precisely the point, it's a hybrid strategy/AI contest.
Except it also leaves it open to chance. The person who choose the counter to a number of newbie entries would win even though he loses to better compositions which happen to be weak against the newbie entries.

Mind you, not like many people would enter such a competition.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Except it also leaves it open to chance. The person who choose the counter to a number of newbie entries would win even though he loses to better compositions which happen to be weak against the newbie entries.

Mind you, not like many people would enter such a competition.

Well, this problem still exists to an extent even if everyone has the same army composition. Say you have a defense strategy that gets countered by a rush strategy, its open to chance which armies your enemies have.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I am actually considering to participate as well...
But I want to see the map before I know wether I will join or not.

Also, is this gonna be like, "you have a set amount of units and you have to kill your enemies" or is it like "construct a base, build an army, destroy enemy base"?
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
I for one like the entire concept of the challenge :)
Can we provide these API stuffs the GUI fashioned way? Because some users might not use Jass for their AI this having a hard time to fulfill the API stuff.

These AIs are made through trigger editor or into an AI file, by the way?

Clarification: this is all triggered/JASS. No interaction with the AI editor at all.

Not sure how much API we'll need, AFAIK there is code for "is unit visible".

Do you know how pointless archers are vs triggered AI?

Triggered archers can be extremely strong if you make an AI that can kite nicely.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
But arrow's missile speed and collision size of regular WC3 make sidestepping possible.
Can you imagine a full army side stepping an entire barrage of arrows?
Simple thread behavior and you have won a war.

About the API, there are quite some ways how we could limit people from knowing everything.
Ofcourse the complete AI script must be checked if people do not cheat.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
I for one like the entire concept of the challenge :)
Can we provide these API stuffs the GUI fashioned way? Because some users might not use Jass for their AI this having a hard time to fulfill the API stuff.

These AIs are made through trigger editor or into an AI file, by the way?

when I talked about the API that must be provided, I actually aimed at that, so I said there needs to be trigger called somehow according to rules and it needs to work on some form of input(lets say a unit is input to it), so basically I would set some global unit variable into something and then do the "Run trigger XX".
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
What about taking it on a slightly lower level?

I think that everyone knows that fireball dodge map right?
(One of those mini-challange games where you die when you are hit by a fireball.
Last man standing wins.)

I think that making an AI for that map my be enough of a challange to start with instead of taking it to full scale RTS battle tactics.
The game is easy to understand, easy to play and so we can all make an AI for it... at least all the triggerers.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
It is not much of a problem of time.
It takes real good research and extreme good logics to make a good combat AI.

I have done a few tests and even "simple" unit formation movement is already a pain in WC3.
Ofcourse you can try to make it yourself. The map doesnt need much after all :D just a few units.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
It is not much of a problem of time.
It takes real good research and extreme good logics to make a good combat AI.

I have done a few tests and even "simple" unit formation movement is already a pain in WC3.
Ofcourse you can try to make it yourself. The map doesnt need much after all :D just a few units.

That's why we should start with Arena type AIs because they are much simpler compared to other genres.
 
Status
Not open for further replies.
Top