Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Eddy-B on September 11, 2005, 11:30:07 AM

Title: General Ai
Post by: Eddy-B on September 11, 2005, 11:30:07 AM
The big question:
What should a General AI do, to win from guys like Lev and Baikon ?

I've already gotten a good response on the repair-ai list, but i want more! If we're gonna make this work, we need input from players. And not just input like: "make it build a colony and attack player" but clear, constructive input that we, coders, can really USE in building a general AI that would work regardless what map you assign it to.
Title: General Ai
Post by: Stormy on September 11, 2005, 11:32:46 AM
Needs a BRAIN for the AI  ;)  :P  ;)  
Title: General Ai
Post by: zanco on September 11, 2005, 12:03:43 PM
Besides Cheating, The AI can act like a mirror if not a perfect mirror, that is it should reproduce whatever these guys are doing. I am thinking about tripling the number of vehicles that they each have. For example, when Levi is building one microwave, the AI could be building 4! As a protection, the AI could have some kind of sensors on the map; something like specific points or lines that when crossed, will trigger a response from the AI. Let's say Baikon has built 12 microwaves, the AI will have 12*4. And let's say again Baikon is willing to attack the AI's base. When Baikon's units will crossed that specific line, the AI will know he is planning an attack and then will respond!

... That's what I am thinking. Don't forget, the AI could use Starflare too! Starflare RULez!

 :op2:  :op2:  :op2:  :op2:  
Title: General Ai
Post by: Eddy-B on September 11, 2005, 12:24:34 PM
errrm.. i just mentioned those 2 people as an example only...
anyway: the things you're suggesting are good, and i've been using something simular already in renegades.
Title: General Ai
Post by: zanco on September 11, 2005, 12:36:10 PM
Quote
errrm.. i just mentioned those 2 people as an example only...

errm.. I was using them as an example too  ;)
I am glad you think my suggestions are good.
Title: General Ai
Post by: Leviathan on September 11, 2005, 06:30:35 PM
standard multi setup on a new multi map.

ai which does the standard order and researsh.

talk to me if ur unsure what the ai needs to do at any step of the way.

thats a good place to start imo.
Title: General Ai
Post by: zigzagjoe on September 11, 2005, 07:00:13 PM
If ur gonna do it on pie, theres no 'ai' to it; there is only one way to do things. the sad thing would be is that it would pwn serious ass.....a primo example of y i hate pie
Title: General Ai
Post by: lordly_dragon on September 12, 2005, 03:48:34 PM
god the fact is that the ai programmed like that wont make any mistake ... its like a op2 deep blue (the chess cpu that beet the best of the world)  
Title: General Ai
Post by: Tellaris on September 12, 2005, 10:32:42 PM
If you want to stop a player from obliterating an AI's base, heres some suggestions:
1. Increase attack based on how many units and guardposts the player has (Sierra did this already, the more units a player has, the more units the AI has)   Since the AI already has the base, all self destructing units would do is give the AI an even stronger defense.
2. "Reinforcements"
I'll elaborate.   Whenever the player gets simply too powerful, the AI gets a small to large reinforcement army from the parent colony (if this isn't it).   This army is based on how many units the player has multiplied by say .2 units.   This will beat the player down a good deal.   Be careful what units you use in this situation, you don't want to make it impossible for them to live!
3. "Stored Reinforcements"
I got this from the Plymouth raid on Eden's colony.
Simply use CreateGroup and spawn a few tigers if the AI's colony is in trouble.   Have a few garages lying around for this.   It looks perfectly fine, its like the AI simply stored the army.   The main purpose of this would be to beat back the player.   You could do it so the AI builds the garages and moves units into them.
4. Limited Entrences:    Entrances to the AI's base does not exceede more then 2-3 (the more entrances, the harder it is to effectively defend) Entrances are narrow, and longish (boxes in player's units, forcing them to use a MUCH larger army to attack to succeede, especially if all the AI's units bunch up in the entrance.)   This can slow a player down a LOT.
5. Well placed guardposts throughout the AI base as well as at the entrances can really be a pain to take out.
6. Walls are great vs microwave rushes!   Stick a few EMP along it, and whatch them drop like flies under some railgun/RPG fire!
7. Beware the well timed Vortex in the middle of your attack army!   (no timer necessary, once a player's army nears a certain spot, spawn a vortex!)   Can also be used to distract a player during an attack.
8. Despite what people say, well placed Acids can really do a lot of damage, particularly in narrow entrances.

As for attacks:
1. AI attacks with a force slightly larger then what the player currently has
(multiply by .2 = how many more units AI has maybe?)
2. AI attacks get increasingly stronger, moving up from Lynx to Panthers to Tiger attacks.   Don't let the AI attack with a few lynx just because the player has no defense.   This is why that self-destruct trick works on the Sierra maps!
3. If mixed groups of Lynx and anything slower (IE Tigers) have rally points close to the Player's base.   You don't want the attacking one group by one group.   This significantly weakens the total attack.
A way to disguise this is to have the Tigers move out first, when they are half way, send lynx to the rally point.   The army is larger then the player originally thought this way, and they won't attack in small, easily managed groups.
4. Night attacks!   ( you already do this)

And thats all I can think of at the moment.
Title: General Ai
Post by: Eddy-B on September 13, 2005, 02:24:04 AM
Thanx for this reply, baikon.
Some of those i already have in my mission(s), like the attack size must be > player tanks+GPs, and the night attack :) yes...
The rally points i use also if necessary, but i haven't used tigers yet.

Garages, i'd have to check out how they work, coz i didn't really look into the yet either.
Title: General Ai
Post by: BlackBox on September 13, 2005, 02:06:48 PM
Spawning a vortex seems a bit like cheating to me..Just create some weather when the going gets hard! <_<

The AI needs to be fair..it should be a good opponent but not unbeatable either, and should have no unfair advantage over the player.
Title: General Ai
Post by: Leviathan on September 13, 2005, 02:49:02 PM
Yea, it would be good to have 3 levels of speed which the ai plays at.
Title: General Ai
Post by: TH300 on September 13, 2005, 06:48:04 PM
Quote
Spawning a vortex seems a bit like cheating to me..Just create some weather when the going gets hard! <_<

The AI needs to be fair..it should be a good opponent but not unbeatable either, and should have no unfair advantage over the player.
I second that.
Reinforcements from outside the map or out of a garage (without moving them in before) or  'well placed disasters' are things which a human player can't use. That wouldn't be fair.

A good AI is not only strong, but also realistic. You should probably let the computer play with morale, but that is for another thread..


some more ideas:

react to certain circumstances as early as possible - lets say you are Eden and you just noticed that Plymouth is building a spaceport, obviously planning a missile-attack. Build meteor defences.

defend differently when attacked differently - don't use lynxes against esgs when possible, don't run behind tanks which are faster than yours, defend against scout-rushes with esgs,... if possible you should implement every tactic there is.
Title: General Ai
Post by: Sirbomber on October 11, 2005, 09:02:55 PM
It should, of course, come in recruit (just started playing OP2 2 minutes ago), easy (been playing for a few months), medium(pretty good), and hard(duh ;) ).

I'm assuming it can only build what it's researched and can afford. Anyways, it should work with morale and be able to analyze what it needs to boost morale. If people are dying a lot, it should build med centers. Also, it should idle buildings near disasters.
Title: General Ai
Post by: zigzagjoe on October 12, 2005, 08:18:38 AM
rly, the fairist but also the toughest to make would be one that actually played as a human char. [ex, it has to follow the same rules including food ore etc] would be bloody hard to program, tho.
Title: General Ai
Post by: Highlander on October 12, 2005, 09:27:22 AM
Easiest thing would just be to make the AI attack like a human, instead of sending it's units the same way each time.

Multiple attack fronts, less micros, scorpions and lynxes in the later stages of the game.
Title: General Ai
Post by: Eddy-B on October 12, 2005, 06:59:52 PM
yea: problem now: all attacks and other moves are pre-defined. You could still define several attack routes, and just select a random one each time, but still it won't be real "AI", but it would come close to a human. I mean: if you find a good attack route as a human player, you tend to use it again.

The hard part is to create a priority list (discussed elsewhere on the forum), `directing the AI in what it should do next: build a new tokamak, create a couple more lynx, research something etc...
Title: General Ai
Post by: Jgamer on March 10, 2006, 06:36:24 PM
Well, one thing you could do is making a 'random priority' list. Example:
What to do now? A few spare metals and energy would be a problem in the future, as well as the player, lynxes or tokamak? Solution, random choice.
That may make the AI do some terrible stupid mistakes, but even experienced players may not notice one thing or another.
Title: General Ai
Post by: Eddy-B on March 11, 2006, 02:59:12 AM
The way it is set up now, it has a predetermined list of structures it will build. But the way their base is build is pretty random. I can create some randomness is the building order, but even experienced human players stick to a certain list, specially in the beginning of a game.