What's the point, if I may ask? If a medium player wants to play he'll most likely play versus other players. I really respect AI creations and innovations and I think you should be concentrating on an AI that is not cheating and is beating top SC2 players.
The point is that I am not building this AI only to try and beat top SC2 players. The reasons people like to play against an AI apply to players of all skill levels. If I manage to make the AI a challenge to top SC2 players, 95% of the SC2 community will not want to play against it, because they don't stand a chance.
I want to create a product that offers entertainment for as much people as possible. And with not much time (compared to the entire project), I can add a feature that will offer this.
8 Probes- 8 ranked MIU2D (Most Important Unit to destroy)
1 Zealot- 1 ranked 2MIU2D (2nd Most Important Unit to destroy)
1 Nexus- 1 ranked 3MIB2D (3rd Most Important Building to destroy)
2 Pylons- 2 ranked MIB2D (Most Important Building to destroy)
1 Gateway- 1 ranked 2MIB2D (2nd Most Important Building to destroy)
Summary
How does that sound? I thought it was a great idea. Units that were controlled by the AI would play different behaviors...EX: Army 2 (Scout) doesnt attack 50% chance...look at every area in fog of war 100% chance. And enemies would be ranked according to the unit type and how important it is to them. It'll attack units first, then buildings in the order ranked. Wouldn't that be cool! :)
Edits
Edit: OH! And the buildings that the AI owns will be defended in an order according to rank.
Edit: What I mean is if all of their buildings were attacked, or 1 was attacked, or even 2 were attacked, they would rather guard the highest rank and will send extra troops with the group defending the highest rank.
Edit: You can also make it rank these too...
9 Reapers- 1 ranked Army 2 (Type-Scout) 8 ranked Army 5 (Type-Raiders)
(Raiders (Army 5) run through and ignore enemies and attack the gatherers (Probes, SCVs, and Drones) (If the raiders can jump cliffs, then they go around defenses and sneak in the back) they attack gatherers and micro if gatherers charge them and if enemies come, they micro away and attack the gatherers some more. If a raider has destroyed all gatherers and there are no nearby enemies, they will attack the Nexus, Command Center, or Hatchery. Otherwise, they retreat)
I think the most impressive thing is that the AI figures out its strategy mostly for itself. I did a simple AI for a map but I had programmed the exact build order and building placement.
How do you determine the placement of the barracks, factory, and starport? I saw the bit about supply depot placements by calculating the angle of the CC to the mineral fields, but what about the other buildings? I assume you don't use points, right? Cuz you want the AI to work on all maps.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
Wow now thats what I'm talking about awesome work so far. This is everything I would want in and AI. I can't wait to put a few of these in a 4 way FFA and watch em duke it out. The blizz AI really is an idiot when It comes to chokes and high ground. Can I make one suggestion if you haven't before you should read Sun Tzu's "The Art of War" its really short but has of great strategy ideas. I would love to have an AI attack one expansion with a small force wait till the enemy counters then hit another base with its real army while its distracted. Anyway Good Job I will have fun with this when its ready.
My AI is already ranking his own units according to your style (scout, attacker, defender). But I haven't ranked buildings yet. Which I might have to at some point, because when an army attacks a base, it simply destroys the buildings it first encounters.
Although you should keep in mind that rushing forward to target the highest ranked building could be dangerous for the attacking group. They need to squeeze themselves between buildings, and are allowing themselves to get surrounded more easily.
When it comes to targeting units of the enemy, I'm going to use the bonus damage and health status of the enemy units to determine who is targeting what. Only in special cases will the entire army focus fire on a single unit (f.e. Colossus).
The production buildings are placed in the center of the base at the moment. And with center I mean the center of the base "platform". This center position is calculated once as soon as a base is claimed. If that center is too close to the main building, it moves a bit away from the main building. I used to place production buildings half way between the main building and the choke (which worked great on Steppes of War), but this produced bad results on maps like Lost Temple.
Thanks for the link. When I have time I will read some more. But why are waiting for a 4-man FFA? Those are hardly epic battles. I prefer a good 1v1 or 2v2.
Well...it's not exactly 1 building at a time. It's basically suggesting it to the AI. It takes it and randomly picks a 1 of a 6 sided die. It sends moree percent of its troops to attack a building that's more important. It's supposed to be it's goal, so it tries to attack it first without wrecking the mission. Also, unless you already have this or have your own micro system, I was wondering if you could possibly do an advanced micro system for harder difficulties.
(Event 1)
Event: Enemy unit is within range of attacking. (If unit is melee (Range 0) then play actions at range 1)
Condition: None
Actions: (If: Strength of (enemy) attacking forces and (AI army) is uneven.
Then: 2 If then else statements
(If: Strength of (AI army) is greater
Then: Charge enemies and continue to chase.
Else: Nothing)
(If: Strength of (enemy) is greater
Then: 2 If then else statements.
(If: (Enemy) strength is double (AI army) strength.
Then: Retreat.
Else: Nothing)
(If: (Enemy) strength is less than double (AI army) strength.
Then: Calculate angle of enemy, make an average of all enemies, and move in that angle. Wait for range between enemies is enemy range + 2 Attack move towards enemies.
Else: Nothing)
Else: Nothing)
(If: Strength of (enemy) attacking forces and (AI army) is close to even.
Then: Calculate angle of enemy, make an average of all enemies attacking (specific unit in AI army), and make (specific unit in AI army) move in that angle. Wait for range between enemies is enemy range + 2 Attack move towards enemies.
Else: Nothing)
Else: Nothing)
I see the problems you might see. The only problem with this method is, what if the enemy had MORE range than you or what about your forces are melee and enemy forces are melee. I dont know how to fix that. :(
(Calculation of Unit strength)
If: Units are enemies
Find: All units attacking or attack moving towards AI army.
Calculate: Find units in Data. Find cost. Find population cost. Find damage. Find stats. Add them together. Divide by 2 and subtract 5. Add product to army strength of enemy.
If: Units are Ai army
Find: All units in AI army.
Calculate: Find units in Data. Find cost. Find population cost. Find damage. Find stats. Add them together. Divide by 2 and subtract 5. Add product to army strength of AI army.
I'm using similar systems. However there is a problem with the unit strength calculation. The unit strength can depend on the surrounding army or terrain. A group of colossi escorted by gateway units is a lot stronger then the gateway units and the colossi separate.
I get the feeling progammer posted this on the front page because eagle eye was on tv last night. Great movie btw.
The point is that I am not building this AI only to try and beat top SC2 players. The reasons people like to play against an AI apply to players of all skill levels. If I manage to make the AI a challenge to top SC2 players, 95% of the SC2 community will not want to play against it, because they don't stand a chance.
I want to create a product that offers entertainment for as much people as possible. And with not much time (compared to the entire project), I can add a feature that will offer this.
I was coming up with ideas for an AI and thought of something. What if each Eagle AI ranked every unit on the battlefield.
Eagle AI
16 SCV- 15 ranked Army 1 (Type-Gatherers) 1 ranked Army 2 (Type-Scout)
7 Marine- 4 ranked Army 3 (Type-Defenders) 3 ranked Army 4 (Type-Attackers)
1 Command Center- 1 ranked MIB (Most Important Building)
5 Supply Depots- 5 ranked 3MIB (3rd Most Important Building)
2 Barracks- 2 ranked 2MIB (2nd Most Important Building)
Player
Scouted - 8 Probes, 1 gateway, 1 zealot, 1 nexus, 2 pylons
8 Probes- 8 ranked MIU2D (Most Important Unit to destroy)
1 Zealot- 1 ranked 2MIU2D (2nd Most Important Unit to destroy)
1 Nexus- 1 ranked 3MIB2D (3rd Most Important Building to destroy)
2 Pylons- 2 ranked MIB2D (Most Important Building to destroy)
1 Gateway- 1 ranked 2MIB2D (2nd Most Important Building to destroy)
Summary
How does that sound? I thought it was a great idea. Units that were controlled by the AI would play different behaviors...EX: Army 2 (Scout) doesnt attack 50% chance...look at every area in fog of war 100% chance. And enemies would be ranked according to the unit type and how important it is to them. It'll attack units first, then buildings in the order ranked. Wouldn't that be cool! :)
Edits
Edit: OH! And the buildings that the AI owns will be defended in an order according to rank.
Edit: What I mean is if all of their buildings were attacked, or 1 was attacked, or even 2 were attacked, they would rather guard the highest rank and will send extra troops with the group defending the highest rank.
Edit: You can also make it rank these too...
9 Reapers- 1 ranked Army 2 (Type-Scout) 8 ranked Army 5 (Type-Raiders)
(Raiders (Army 5) run through and ignore enemies and attack the gatherers (Probes, SCVs, and Drones) (If the raiders can jump cliffs, then they go around defenses and sneak in the back) they attack gatherers and micro if gatherers charge them and if enemies come, they micro away and attack the gatherers some more. If a raider has destroyed all gatherers and there are no nearby enemies, they will attack the Nexus, Command Center, or Hatchery. Otherwise, they retreat)
(Bump) :)
I think the most impressive thing is that the AI figures out its strategy mostly for itself. I did a simple AI for a map but I had programmed the exact build order and building placement.
How do you determine the placement of the barracks, factory, and starport? I saw the bit about supply depot placements by calculating the angle of the CC to the mineral fields, but what about the other buildings? I assume you don't use points, right? Cuz you want the AI to work on all maps.
Wow now thats what I'm talking about awesome work so far. This is everything I would want in and AI. I can't wait to put a few of these in a 4 way FFA and watch em duke it out. The blizz AI really is an idiot when It comes to chokes and high ground. Can I make one suggestion if you haven't before you should read Sun Tzu's "The Art of War" its really short but has of great strategy ideas. I would love to have an AI attack one expansion with a small force wait till the enemy counters then hit another base with its real army while its distracted. Anyway Good Job I will have fun with this when its ready.
@yukaboy: Go
My AI is already ranking his own units according to your style (scout, attacker, defender). But I haven't ranked buildings yet. Which I might have to at some point, because when an army attacks a base, it simply destroys the buildings it first encounters.
Although you should keep in mind that rushing forward to target the highest ranked building could be dangerous for the attacking group. They need to squeeze themselves between buildings, and are allowing themselves to get surrounded more easily.
When it comes to targeting units of the enemy, I'm going to use the bonus damage and health status of the enemy units to determine who is targeting what. Only in special cases will the entire army focus fire on a single unit (f.e. Colossus).
@zeldarules28: Go
The production buildings are placed in the center of the base at the moment. And with center I mean the center of the base "platform". This center position is calculated once as soon as a base is claimed. If that center is too close to the main building, it moves a bit away from the main building. I used to place production buildings half way between the main building and the choke (which worked great on Steppes of War), but this produced bad results on maps like Lost Temple.
@Keldrif: Go
Thanks for the link. When I have time I will read some more. But why are waiting for a 4-man FFA? Those are hardly epic battles. I prefer a good 1v1 or 2v2.
@MTops: Go
Well...it's not exactly 1 building at a time. It's basically suggesting it to the AI. It takes it and randomly picks a 1 of a 6 sided die. It sends moree percent of its troops to attack a building that's more important. It's supposed to be it's goal, so it tries to attack it first without wrecking the mission. Also, unless you already have this or have your own micro system, I was wondering if you could possibly do an advanced micro system for harder difficulties.
(Event 1)
Event: Enemy unit is within range of attacking. (If unit is melee (Range 0) then play actions at range 1)
Condition: None
Actions: (If: Strength of (enemy) attacking forces and (AI army) is uneven.
Then: 2 If then else statements
(If: Strength of (AI army) is greater
Then: Charge enemies and continue to chase.
Else: Nothing)
(If: Strength of (enemy) is greater
Then: 2 If then else statements.
(If: (Enemy) strength is double (AI army) strength.
Then: Retreat.
Else: Nothing)
(If: (Enemy) strength is less than double (AI army) strength.
Then: Calculate angle of enemy, make an average of all enemies, and move in that angle. Wait for range between enemies is enemy range + 2 Attack move towards enemies.
Else: Nothing)
Else: Nothing)
(If: Strength of (enemy) attacking forces and (AI army) is close to even.
Then: Calculate angle of enemy, make an average of all enemies attacking (specific unit in AI army), and make (specific unit in AI army) move in that angle. Wait for range between enemies is enemy range + 2 Attack move towards enemies.
Else: Nothing)
Else: Nothing)
I see the problems you might see. The only problem with this method is, what if the enemy had MORE range than you or what about your forces are melee and enemy forces are melee. I dont know how to fix that. :(
(Calculation of Unit strength)
If: Units are enemies
Find: All units attacking or attack moving towards AI army.
Calculate: Find units in Data. Find cost. Find population cost. Find damage. Find stats. Add them together. Divide by 2 and subtract 5. Add product to army strength of enemy.
If: Units are Ai army
Find: All units in AI army.
Calculate: Find units in Data. Find cost. Find population cost. Find damage. Find stats. Add them together. Divide by 2 and subtract 5. Add product to army strength of AI army.
Maybe I know how AIs work too well for me to come up with things that you haven't come up with. :(
Edit: Does your AI make proxies yet?
I'm using similar systems. However there is a problem with the unit strength calculation. The unit strength can depend on the surrounding army or terrain. A group of colossi escorted by gateway units is a lot stronger then the gateway units and the colossi separate.
How's it coming?
@zeldarules28: Go
What exactly? For general development updates of the AI, please check www.eagleai.net. I'm posting daily updates...
Ok. Cool, thanks. :D