A.I. behavior: Realism or Performance?
Moderators: hoijui, Moderators
A.I. behavior: Realism or Performance?
Hey Everyone,
I'm wondering what path I should take concerning E323AI. The poll above shows what you guys care most about. Realistic behavior, or a better performing A.I.
A form of sneaky cheating would be probing the enemy-list for units and first send scouts in the area of interest before sending in the troops. So it would seem to be non-cheating.
Currently E323AI cheats on location and type (it knows the full whereabouts of the enemy and its kind). Both forms (cheating, non-cheating) would be equally interesting for me, just on different levels.
Tell me what you think!
I'm wondering what path I should take concerning E323AI. The poll above shows what you guys care most about. Realistic behavior, or a better performing A.I.
A form of sneaky cheating would be probing the enemy-list for units and first send scouts in the area of interest before sending in the troops. So it would seem to be non-cheating.
Currently E323AI cheats on location and type (it knows the full whereabouts of the enemy and its kind). Both forms (cheating, non-cheating) would be equally interesting for me, just on different levels.
Tell me what you think!
Re: A.I. behavior: Realism or Performance?
performance, first and foremost. realism is a also something to strive for, but i don't think it's necessary for it to be in a computer game. if you want, you can aim for a more realistic (pun inteded ;p) target - a believable AI (ie cheating but still playing more like a human would).
Re: A.I. behavior: Realism or Performance?
Playing against the AI should improve one's skills versus humans. You shouldn't need to use one set of techniques against a human and another against an AI. That way, playing against the AI will educate you in defeating a human player, too. Apart from that, sneaky cheating is fine by me. That is my opinion. 

Re: A.I. behavior: Realism or Performance?
I don't want an AI to use any form of cheats other than income and buildspeed multipliers. If I make a stealth outpost and it gets maphacked, that is very frustrating. Sneaky cheating with magical scouts is even worse. Don't lie to the player. Real scouts are cheap.
- ChaosMonkey
- Posts: 180
- Joined: 06 Jul 2009, 21:21
Re: A.I. behavior: Realism or Performance?
It would be fun to play a really hard AI so I ticked the 'cheat' box
Re: A.I. behavior: Realism or Performance?
Well you know my opinion from the other thread. Imo the best is to have both options available (poor you! :) ), and I think that the non-cheating one will be used only to compete with other AIs. Against humans, I repeat, that's what any pro will do - he'll scout you to the death, just look at some (BA, late at night on Spads0) games and you will have no questions.
Re: A.I. behavior: Realism or Performance?
I'm alright with cheating when the developer lacks the imagination or the computer lacks the resources to do whatever is necessary in a fair manner. I prefer actual scouting routines, actual resource production, actual unit grouping. Like Lurker, I'm sick of magical maphax.
Re: A.I. behavior: Realism or Performance?
It'd be best if it could scout info and also fill in the blanks intelligently, but I'd guess its really hard to make an AI good in that area, so imo cheating is ok. When it starts to act on the info it gets well enough (whereever you want to set the bar), it can be reconsidered.
Re: A.I. behavior: Realism or Performance?
While working on my own Skirmish AI recently, it occurred to me that as a programmer, I want the AI to play as much like a human as possible. As a player, I want the AI to just give me a good game regardless of method, as long as the cheating isn't too obvious and doesn't appear to be too far outside of normal game mechanics. It's no fun playing against magical pixies.
Some years back, I played some kind of world domination game similar to Risk whose name escapes me at the moment. The AI cheated all the time. This was done well enough that I didn't realize the AI wasn't playing like a human until I exchanged email with the programmer. I guess that's what I'd like to see in a Spring Skirmish AI.
Some years back, I played some kind of world domination game similar to Risk whose name escapes me at the moment. The AI cheated all the time. This was done well enough that I didn't realize the AI wasn't playing like a human until I exchanged email with the programmer. I guess that's what I'd like to see in a Spring Skirmish AI.
Re: A.I. behavior: Realism or Performance?
totally agree with this and neddiedrow.lurker wrote:I don't want an AI to use any form of cheats other than income and buildspeed multipliers. If I make a stealth outpost and it gets maphacked, that is very frustrating. Sneaky cheating with magical scouts is even worse. Don't lie to the player. Real scouts are cheap.
As i know from a talk with you, Error323, you think resource cheating is cheap, and location cheating is less cheap. That is probably true from an AI programmers position, but from a players view, location aware cheating is much worse then resource cheating, see lurkers example eg. Resource cheating is something that will make the AI harder to defeat, but other then that, not annoying for the player, plus it is easy to have it modifyable through an AI Option. You can implement it as a resource gain boost, so the AI will get 20E*cheatFactor for a solar, so when the player manages to kill all the AIs economy, he will not be annoyed by the AI still having enough E to fire its annihilators.
Re: A.I. behavior: Realism or Performance?
Yeh, I'd love to play against an AI that spams /give 100 corkrog everywhere.
Re: A.I. behavior: Realism or Performance?
Thank you for another irrelevant, hyperbolic post either depending on a strawman or merely without any intended value, Jaz.
The end user won't know how exactly the artificial intelligence cheats unless it breaks the logical rules which you encounter when playing actual people. A resource boost, if subtle, will go almost entirely unnoticed. The ability to see cloaked and stealthed units will remove an entire section of the game, and the ability to see the positions of all units without scouting will betray the cheat as well as reduce the quality of the experience.
It might be noted that in non *A titles, where cloaking and stealth are more important - see E&E and 1944 - giving an AI full map awareness will change the dynamic of the game to an extreme.
The end user won't know how exactly the artificial intelligence cheats unless it breaks the logical rules which you encounter when playing actual people. A resource boost, if subtle, will go almost entirely unnoticed. The ability to see cloaked and stealthed units will remove an entire section of the game, and the ability to see the positions of all units without scouting will betray the cheat as well as reduce the quality of the experience.
It might be noted that in non *A titles, where cloaking and stealth are more important - see E&E and 1944 - giving an AI full map awareness will change the dynamic of the game to an extreme.
Re: A.I. behavior: Realism or Performance?
Thanks everyone,
Having reviewed all the posts and looking at the poll in its current state, I'd say we have roughly a 50/50 situation. There are good arguments both in favor of - and against cheating.
I will try to create a model that is transparant in the sense that cheating would just be a on/off switch. And if that fails, I can also develop a cheating/non-cheating branch.
Having reviewed all the posts and looking at the poll in its current state, I'd say we have roughly a 50/50 situation. There are good arguments both in favor of - and against cheating.
I will try to create a model that is transparant in the sense that cheating would just be a on/off switch. And if that fails, I can also develop a cheating/non-cheating branch.
Re: A.I. behavior: Realism or Performance?
What artificial AI will always excel at no matter what:
- multi-tasking
- macro-managing
What the artificial AI can excel at unlike the player, but doesn't have to excel:
- knowledge of player positions, composition of army
- ability to amass more numerous or more advanced army, to build/set up fortifications faster due to resources cheat
What the artificial AI will never excel at:
- prioritising
- playing a 'guessing game'
- being one step ahead of player, on equal ground or just one step behind (it's usually miles ahead ...)
- micro-managing it's troops efficiently
What the artificial AI might excel at:
- using semi-intelligent pattern when building fortifications and buildings, to not make weak spots in the base and have 'just enough' fortifications to counter most air and ground-amphibious threats
- enter into a 'false guessing game', briefly calculating risk/reward ratio and depending on it's strength do irrational things, like rush 2/3 of it's forces after the player as deception technique while building a nuke or nuclear cannon within reach of player's base
- beating an average player on non-porcy maps without too many pathfinding issues
What is the breakdown saying?
1. AI needs to be aggressive, harass the player, make him run after his mexes in order to deal needed pressure, to ultimately beat him
2. AI always loses more be being defensive than by being aggressive, no matter whether it fails at that or not
3. AI needs to approximately cover 50% more ground and resources to beat the player, versus average or better one it won't happen, so it needs artificial resources boost
4. AI needs to start as a swarming AI and might need to use 'cheated' resources to tech before the player and buy it's some time, by setting up first anti-nuke, first nuke and first tech level 3 gantry
5. AI is bad at focusing it's troops in one direction, it's army is almost always divided, very easy to outflank and neutralise with few, powerful units allowing the player to too comfortably sit on 'porcupine throne' basically just teching and winning - conclusion is that each of the divided army should be at least half as powerful as player's entire army and fortifications power, in order to wear him down
6. AI must react moderately quickly to player's army composition in order to not give up a fight in 'walk-over' mode, by not producing AA troops and fortifications in correct number against porcupine player doing just massed AA ... early game cheating is completely useless without proper anti-player army composition and correct army placement, because ground rush with t1 is most effective, with some air support, and that's most likely route to be taken by the player
7. AI needs to make use of ALL of it's resources even with ridiculous boost - if it has 500 metal, then it has to have at least(I seriously can't stress this point enough) 20 ground factories, 20 air factories and 20 nuclear launchers ready for it's bidding!
8. The AI shouldn't waste resources on ground fortifications (with exclusion of AA, which should be build all the time in big numbers) as long as it's having an advantage over player and pushing him - it should make more factories and spend 80% of it's resources on building mobile troops to crush the player while it's still possible!
9. The AI has to not only place it's fortifications and defenses intelligently, it needs to place it's factories smart as well, it's really bothersome to see AI block 70% of it's army in the base, creating huge pathfinding load, making the game unplayable past the point of nuking the hell of them with nuclear weapons ... another case are nano towers, which AI in mods such as BA should build a lot and close to factories and repair/assist everything around
So, like you see, real performance of AI is down to six things:
I. hardware performance - zero to very occasional crashes with descriptive logs, easy to track down and fix, low CPU load (to put it mildly, you won't receive too much end-user feedback without a stable AI which doesn't crash more than once every week, in like 20+ games)
2. software performance - needs to use a general set of rules when making decisions, so it works across 90% of the mods without issues and sets it's building priorities right
3. staying competitive - it needs to be everywhere, it needs to annoy and stress the player all of the time to make advantage of it's natural advantages in order to hinder it's planning and strategic disadvantages (player with the upper hand can't lose the game, unlike the AI)
4. Addendum to 3. - it has to finish the game as fast as possible, because in a stalemate the player gets advantages over time ... so, 80% of your time should be devoted into early and middle game, because if AI fails at that, it fails the entire game (unless you miraculously learn it to make 50 nuke launchers and use them all at once in strategic targets, to breach through anti-nuke defenses and get the porcy player with pants down ... or alternatively, build a bertha cannon in range of main player base, cover with jammer, AA turrets and mobile artillery, and through 'map cheat' take out most vital targets first ... why not? Player can send a single scout and know all about the AI anyway)
5. the AI doesn't need to cheat much (actually, 'much' as 'at all', if you just make it as relentless and fast as computer program, while adhering to typical rushing and raiding tactics likely to be used by the player - AI must NOT be afraid of the player, it must do everything it can to wear him down, to annoy him, to stress the shit out of him, to make him do stupid things) much later game, because it only needs to have the initiative (early game boost) for the entire game, when it loses it, it loses the game and additional resources are very unlikely to help it after losing control of 60% of the map
6. Said multi-tasking, pressure over time and relentlessness - the AI never knows fatigue, it doesn't know sleep, it doesn't eat, it can't get distracted, annoyed or bored - don't waste time making an AI imitating a human player, because the human player have multiplayer matches for that ... and you are very unlikely to even scratch a bit of that 'human behaviour' besides early building order and harassing, till tier 2 - so simply make the AI DO EVERYTHING TO WIN, because it won't be given any mercy
Voted for option in the middle, because cheating of first option might give AI the hand on short-term of your AI development, but it won't be needed at all later, and as such should be probably left-out to not distort the focus of most lacking features. In other words, in some places the AI has to 'mildly cheat' in order to work at all, whereas in most cases cheats either would be too obvious, or wouldn't actually help it at all.
- multi-tasking
- macro-managing
What the artificial AI can excel at unlike the player, but doesn't have to excel:
- knowledge of player positions, composition of army
- ability to amass more numerous or more advanced army, to build/set up fortifications faster due to resources cheat
What the artificial AI will never excel at:
- prioritising
- playing a 'guessing game'
- being one step ahead of player, on equal ground or just one step behind (it's usually miles ahead ...)
- micro-managing it's troops efficiently
What the artificial AI might excel at:
- using semi-intelligent pattern when building fortifications and buildings, to not make weak spots in the base and have 'just enough' fortifications to counter most air and ground-amphibious threats
- enter into a 'false guessing game', briefly calculating risk/reward ratio and depending on it's strength do irrational things, like rush 2/3 of it's forces after the player as deception technique while building a nuke or nuclear cannon within reach of player's base
- beating an average player on non-porcy maps without too many pathfinding issues
What is the breakdown saying?
1. AI needs to be aggressive, harass the player, make him run after his mexes in order to deal needed pressure, to ultimately beat him
2. AI always loses more be being defensive than by being aggressive, no matter whether it fails at that or not
3. AI needs to approximately cover 50% more ground and resources to beat the player, versus average or better one it won't happen, so it needs artificial resources boost
4. AI needs to start as a swarming AI and might need to use 'cheated' resources to tech before the player and buy it's some time, by setting up first anti-nuke, first nuke and first tech level 3 gantry
5. AI is bad at focusing it's troops in one direction, it's army is almost always divided, very easy to outflank and neutralise with few, powerful units allowing the player to too comfortably sit on 'porcupine throne' basically just teching and winning - conclusion is that each of the divided army should be at least half as powerful as player's entire army and fortifications power, in order to wear him down
6. AI must react moderately quickly to player's army composition in order to not give up a fight in 'walk-over' mode, by not producing AA troops and fortifications in correct number against porcupine player doing just massed AA ... early game cheating is completely useless without proper anti-player army composition and correct army placement, because ground rush with t1 is most effective, with some air support, and that's most likely route to be taken by the player
7. AI needs to make use of ALL of it's resources even with ridiculous boost - if it has 500 metal, then it has to have at least(I seriously can't stress this point enough) 20 ground factories, 20 air factories and 20 nuclear launchers ready for it's bidding!
8. The AI shouldn't waste resources on ground fortifications (with exclusion of AA, which should be build all the time in big numbers) as long as it's having an advantage over player and pushing him - it should make more factories and spend 80% of it's resources on building mobile troops to crush the player while it's still possible!
9. The AI has to not only place it's fortifications and defenses intelligently, it needs to place it's factories smart as well, it's really bothersome to see AI block 70% of it's army in the base, creating huge pathfinding load, making the game unplayable past the point of nuking the hell of them with nuclear weapons ... another case are nano towers, which AI in mods such as BA should build a lot and close to factories and repair/assist everything around
So, like you see, real performance of AI is down to six things:
I. hardware performance - zero to very occasional crashes with descriptive logs, easy to track down and fix, low CPU load (to put it mildly, you won't receive too much end-user feedback without a stable AI which doesn't crash more than once every week, in like 20+ games)
2. software performance - needs to use a general set of rules when making decisions, so it works across 90% of the mods without issues and sets it's building priorities right
3. staying competitive - it needs to be everywhere, it needs to annoy and stress the player all of the time to make advantage of it's natural advantages in order to hinder it's planning and strategic disadvantages (player with the upper hand can't lose the game, unlike the AI)
4. Addendum to 3. - it has to finish the game as fast as possible, because in a stalemate the player gets advantages over time ... so, 80% of your time should be devoted into early and middle game, because if AI fails at that, it fails the entire game (unless you miraculously learn it to make 50 nuke launchers and use them all at once in strategic targets, to breach through anti-nuke defenses and get the porcy player with pants down ... or alternatively, build a bertha cannon in range of main player base, cover with jammer, AA turrets and mobile artillery, and through 'map cheat' take out most vital targets first ... why not? Player can send a single scout and know all about the AI anyway)
5. the AI doesn't need to cheat much (actually, 'much' as 'at all', if you just make it as relentless and fast as computer program, while adhering to typical rushing and raiding tactics likely to be used by the player - AI must NOT be afraid of the player, it must do everything it can to wear him down, to annoy him, to stress the shit out of him, to make him do stupid things) much later game, because it only needs to have the initiative (early game boost) for the entire game, when it loses it, it loses the game and additional resources are very unlikely to help it after losing control of 60% of the map
6. Said multi-tasking, pressure over time and relentlessness - the AI never knows fatigue, it doesn't know sleep, it doesn't eat, it can't get distracted, annoyed or bored - don't waste time making an AI imitating a human player, because the human player have multiplayer matches for that ... and you are very unlikely to even scratch a bit of that 'human behaviour' besides early building order and harassing, till tier 2 - so simply make the AI DO EVERYTHING TO WIN, because it won't be given any mercy
Voted for option in the middle, because cheating of first option might give AI the hand on short-term of your AI development, but it won't be needed at all later, and as such should be probably left-out to not distort the focus of most lacking features. In other words, in some places the AI has to 'mildly cheat' in order to work at all, whereas in most cases cheats either would be too obvious, or wouldn't actually help it at all.
Re: A.I. behavior: Realism or Performance?
Interesting comment, I agree with some points:
1) Agreed, this is the core of E323AI and the reason why it beats the others.
2) Agreed, though I wouldn't go as far as "always", but creating good defense (knowing where etc) is a hard challenge.
3) I disagree, as macro is its power this can also be applied to the economy. And since its a computer, it can make incredibly accurate estimations of its economic model, I dare say even better than humans.
4) This is very specific and mod dependent imo.
5) While being a real challenge aswell, this too can be considered as a macro action when given all groups. It may be moderate play, it is moderate everywhere resulting in better overall behavior.
6) Can you elaborate on this point?
7) This can be seen as some mathematical function, a reactive system/algorithm. My A.I. (as most) follows some basic rules such that the higher the income the more will be produced (this is a phase AI's excell can at, compared to human).
8) This is difficult, there must be a good balance I think. For an A.I. to detect agressive movement on time is extremely difficult. Its far easier to keep track of your own valuable buildings/bases and defend them with static defense or guarding groups.
9) Agreed, though this is expensive in terms of cpu cycles. Its easier to define a minimal spacing between buildings.
1) Oh yeah, stability above all!
2) Uhhh, that's a developers choice really. One can generalize even further to make it intelligent at an even broader scope e.g. chess or <fill in here>. What I'm trying to say is the more you generalize, the less good it can be at a specific mod. Atleast until someone comes up with a very general AI model that truly learns, which (as I know) won't happen soon :P. Also 90% of the mods is A LOT!
3) Indeed.
4) I'm not sure about this, as you said yourself AI's are excellent at macro. It plays moderate, but does so everywhere on the map.
5) I think people underestimate the difficulty of an AI that is not aware of the enemy location(s). The problem of not knowing is that it cannot make an accurate model of the world, only a certain belief at a certain point in time. And exactly this is where humans PWNN!11 and computers/algorithms suck hard. Not even taking CPU time into account.
6) Well, humans still dominate, but that doesn't mean we should give up!
Interesting post Achilla, thank you!
1) Agreed, this is the core of E323AI and the reason why it beats the others.
2) Agreed, though I wouldn't go as far as "always", but creating good defense (knowing where etc) is a hard challenge.
3) I disagree, as macro is its power this can also be applied to the economy. And since its a computer, it can make incredibly accurate estimations of its economic model, I dare say even better than humans.
4) This is very specific and mod dependent imo.
5) While being a real challenge aswell, this too can be considered as a macro action when given all groups. It may be moderate play, it is moderate everywhere resulting in better overall behavior.
6) Can you elaborate on this point?
7) This can be seen as some mathematical function, a reactive system/algorithm. My A.I. (as most) follows some basic rules such that the higher the income the more will be produced (this is a phase AI's excell can at, compared to human).
8) This is difficult, there must be a good balance I think. For an A.I. to detect agressive movement on time is extremely difficult. Its far easier to keep track of your own valuable buildings/bases and defend them with static defense or guarding groups.
9) Agreed, though this is expensive in terms of cpu cycles. Its easier to define a minimal spacing between buildings.
1) Oh yeah, stability above all!
2) Uhhh, that's a developers choice really. One can generalize even further to make it intelligent at an even broader scope e.g. chess or <fill in here>. What I'm trying to say is the more you generalize, the less good it can be at a specific mod. Atleast until someone comes up with a very general AI model that truly learns, which (as I know) won't happen soon :P. Also 90% of the mods is A LOT!
3) Indeed.
4) I'm not sure about this, as you said yourself AI's are excellent at macro. It plays moderate, but does so everywhere on the map.
5) I think people underestimate the difficulty of an AI that is not aware of the enemy location(s). The problem of not knowing is that it cannot make an accurate model of the world, only a certain belief at a certain point in time. And exactly this is where humans PWNN!11 and computers/algorithms suck hard. Not even taking CPU time into account.
6) Well, humans still dominate, but that doesn't mean we should give up!
Interesting post Achilla, thank you!
Re: A.I. behavior: Realism or Performance?
Anything but a map hack. If I manage to establish a firebase with not so much as a single sighting or ping on the radar from the enemy, I expect it to remain hidden until some poor sod runs into it, not have it bombed to hell by an AI getting all his intel from God.
I'd also like to see more use of formations in an AI, most all of the ones i've played against always just send a stream of units towards me, which is rather boring. I wanna see some tanks in column formation, a flying V of air superiority fighters and bombers etc.
I'd also like to see more use of formations in an AI, most all of the ones i've played against always just send a stream of units towards me, which is rather boring. I wanna see some tanks in column formation, a flying V of air superiority fighters and bombers etc.
Re: A.I. behavior: Realism or Performance?
Ah, that point was a single-sided assumption:Error323 wrote: 6) Can you elaborate on this point?
- in case you decide not to make the CPU load heavier with telling AI how to build fortifications intelligently and to not block it's factories (the latter is high priority, the former is low), then it's a way to stay competitive - air attacks are most vicious against AI, because AI has worse reaction times than the player in terms of being caught with pants down by a sudden strike, so air is the most obvious and devastating thing to expect
- addendum to above point - ability to stream a lot more troops than the player from the factories is largely based on AI's ability to build factories in expansion sites, far from it's main base, so they don't get stuck and immediately enter the fight - it's also dependant on it's ability to place factories intelligently, the fact that factories e.g. face south or west and the unit path is not blocked
And I'd like to add another point:
7) since the single AI is not necessarily a fair match for the player, more like two or three AI's on the single team, it needs to intelligently cooperate not only when player sides with the AI, but also when AI sides with it's own AI on the same team (I'm not saying it should be good in cooperation with other AI's, but ability to support it's own AI alliance is critical) - ability to intelligently put a coordinated assault based on number of AI's in one ally block (example - if it's two AI's on the same team, throwing 50% of combined army under a stream towards player and saving remaining 50% to build a bigger army is pretty, but if there are 4 AI bots, it's not so feasible, unlike throwing 75% in immediate stream and saving remaining 25% for defense or to build a mega army to rush at the player later) - another point is sharing resources, so the two AI bots act as one body in this area as well, making it more difficult for the player to eliminate a bot after the bot, rather having to fight their full might at once
tl'dr' - 1. full transparency in economic field 2. ability to form coordinated attacks while preserving pressure 3. two AI bots on small map should be more dangerous than the single AI bot with the same amount of resources and terrain (ability to walk it's commanders and build fortifications around mexes as well as radars is huge part of small maps supremacy)
Re: A.I. behavior: Realism or Performance?
I think any AI should have a difficulty slider. The most easiest is a non-cheating AI. More you advance the slider to the right the more advanced program blocks of AI are enabled including cheating blocks. It would be fare for a player to mark somewhere that AI starts to cheat on some slider position. So, you'll cover all user needs. You just have to tweak the starting difficulty level of your AI. I think full processing non-cheating AI is a good start. But personally for me playing with KAIK (as i know it is NOT cheating AI) is a pain, so its starting level is very hard for me :)
Re: A.I. behavior: Realism or Performance?
KAIK cheats alot.slogic wrote:But personally for me playing with KAIK (as i know it is NOT cheating AI) is a pain, so its starting level is very hard for me :)
Besides that, its a good idea indeed.
Re: A.I. behavior: Realism or Performance?
Realism with optional cheating (maphack,resources,etc).