A.I. behavior: Realism or Performance? - Page 3

A.I. behavior: Realism or Performance?

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Realism or Performance?

Give me the best performance, I don't care how (Any form of cheat)
12
20%
Trick me into thinking it doesn't cheat, while it does (Sneaky cheat)
19
32%
Give me realistic behaviour (No cheat)
29
48%
 
Total votes: 60

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: A.I. behavior: Realism or Performance?

Post by AF »

Threatmaps abstract the problem away in that situation, as does effective scouting.

Extrapolation was also implemented as an experiment in OTAI.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: A.I. behavior: Realism or Performance?

Post by imbaczek »

threatmap would need to be extrapolated, too.
Achilla
Posts: 79
Joined: 24 Aug 2009, 15:17

Re: A.I. behavior: Realism or Performance?

Post by Achilla »

What about scouts or AI units in general having doubled or tripled line of sight? The AI is a completely fallacy at micro, so perhaps it's not that bad as many people would mark it. Certainly it's not as 'bad' as maphack, which is simply a functional and working way to boost the AI, and should be seen as that, not as a cheat. There are no 'cheats' from the CPU side, enough of a 'cheat' already from the player is that the player is human, able to take much more effective risk decisions and adapt quicker. In fact, maphack is just a way to cope with the poor intelligence/cover structure of the AI itself, and should be seen as a filler till a better method is found. Resource bonus is completely unneeded and stupid, since you can give AI bots a resource bonus in lobby already if you want to do it (and good AI needs to make a sensical building order in start of the game till the very end, giving it xxxx resources won't change a thing).
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: A.I. behavior: Realism or Performance?

Post by hoijui »

well... i think we outlined pretty well why non-resource hacks are bad already, and the poll shows that the majority agrrees wiht that.
It is still up to the AI dev wether he wants to use them or not. Error323 said how he will do it. no need for hte same arugments back nad forth, again and again.
Achilla
Posts: 79
Joined: 24 Aug 2009, 15:17

Re: A.I. behavior: Realism or Performance?

Post by Achilla »

hoijui wrote:well... i think we outlined pretty well why non-resource hacks are bad already, and the poll shows that the majority agrrees wiht that.
It is still up to the AI dev wether he wants to use them or not. Error323 said how he will do it. no need for hte same arugments back nad forth, again and again.
If you would separate the poll by dividing the votes cast by the casual players and by more-or-less versed AI programmers or game developers, then you would get a stunning majority of utopian realism from the players and obvious bias towards slight cheating from the developer side.

As long as the player doesn't feel like the AI is cheating and it is giving a challenging game, then the gameplay and replaying value has been set to a decent standard. On the other hand, when the core of the AI is poor, cheating will not only be obvious but won't actually contribute to a more challenging game in the competitive aspect of this word, based mainly on experience from multiplayer matches.

Either way, it takes either an AI genius or a sad ignorant to claim that it's time-resource feasible and possible to create a brilliant AI acting like a human, or perhaps better than him. After all, there have been many attempts to create a Chess player AI beating the best masters, but in majority of cases the true master is on top. So no, it's a complete fallacy to strive to create an AI which doesn't cheat, because in 99% cases it will completely suck - and I literally mean it. Developing it would not only be a waste of time and effort as well as a source of frustration - in most cases it would be a waste of time to play against, too.

As an example I will recall the AI in F.E.A.R. FPS game, where the AI would cheat, often a lot, but it didn't let the player feel like it was cheating. It also gave very rememberable moments and experiences to the players, who universally admired it for it's cleverness - but the AI wasn't a genius and it wasn't even a 100% goal-oriented AI.

Whatever the case, it doesn't matter with what ideals you start with by beginning your project, but the final performance of your AI in a given setting, in a given moment, under a chosen game. Just because your AI doesn't cheat doesn't win you the players, neither it does win you an award or a medal. On the other hand, a fantastic, competitive AI which rarely resorts to cheating and avoids it when not necessary for optimal performance, will likely come on the top - and not without a very, very good reason.

I don't see either why the so-called 'majority' should see the things yours, or anyone else's way, neither why would you represent them or have a valid reason to end this discussion because in your opinion everything has been said. It was not.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: A.I. behavior: Realism or Performance?

Post by hoijui »

quite everything in your post is either very bad reference or just false.
for example, if you had read the posts in this thread, and knew which users are devs, you would see that your first paragraph is compleetly wrong. (btw, i am a dev too ;-) )
second, comparing a chess AI with a spring AI ... nuff said.
third, all your post suggest you did not read this thread. if you did, it would look even worse.
next, there was repetition of arguemtns, which i said is useless.
you described it as me saying everything has been said, so the discussion is over...
in general, you just have no idea about the topic, or you have a very bad day.
there is too much excageration, mal estimation, boolifaication in your post...
i strongly suggest going politics, if you are not yet headed this way already; you shall feel very much at home there.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A.I. behavior: Realism or Performance?

Post by Error323 »

I think you are both drawing false conclusions from the posts :P
Hoijui wrote:well... i think we outlined pretty well why non-resource hacks are bad already, and the poll shows that the majority agrrees wiht that.
It shows 50/50 cheating/non-cheating. And most arguments are far from convincing imo.
Achilla wrote:If you would separate the poll by dividing the votes cast by the casual players and by more-or-less versed AI programmers or game developers, then you would get a stunning majority of utopian realism from the players and obvious bias towards slight cheating from the developer side.
Quite some developers are against cheating. I'm curious where you are basing this on.

In any case, I am quite surprised by the 50/50 results. I thought people would be more biased towards the performance instead of the realism. And I do agree with Achilla here that once the "non-cheating voters" have experienced the difference in performance they probably will :P. I may just be too pessimistic here, and I am sketching a plan for a non-cheating version. But the more concrete my sketch becomes, the more daunting this task seems.

[offtopic] Achilla, I read a paper on F.E.A.R. and afaik it is 100% goal oriented using STRIPS and A*. [/offtopic]
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: A.I. behavior: Realism or Performance?

Post by AF »

The problem is not as simple as it appears. Hence the results
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A.I. behavior: Realism or Performance?

Post by Error323 »

Not ever did this appear simple to me (just to be clear). Btw AF, how did your extrapolation experiment go? My guess would be that it extrapolates wrong in most cases.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: A.I. behavior: Realism or Performance?

Post by AF »

It wasnt my experiment, it was veylons, you'd have to ask him, I only looked at the commented out code he'd used on his machine, I didnt recompile and test.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: A.I. behavior: Realism or Performance?

Post by lurker »

Achilla wrote:There are no 'cheats' from the CPU side
If you count the AI as part of spring, then no. No cheats at all. But then the AI is allowed to delete your units etc. and AI vs. AI becomes core wars. If you look at it as a player, it can certainly cheat. Don't try to redefine the word, please.

The chess analogy doesn't fit at all. Chess is based on very very limited input and you can take a long time to make a move. An RTS AI can micro a thousand units simultaneously to be better than a human, without cheating.

Anyway, stat boosts seem like an okay way to cheat if honesty is kept. The issue with maphacking is that it rips out parts of the game and makes them impossible, and players can't do anything similar.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: A.I. behavior: Realism or Performance?

Post by hoijui »

Error323 wrote:most arguments are far from convincing imo.
Most maybe, but there is this one that was mentioned by some (neddierow, lurker, me, .. i forgot), repeated by lurker in a summary fashion here:
lurker wrote: Anyway, stat boosts seem like an okay way to cheat if honesty is kept. The issue with maphacking is that it rips out parts of the game and makes them impossible, and players can't do anything similar.
eg. you can not use the various hiding techniques that make lots of the gameplay: hiding behind mountains from LOS/radar, cloacking, stealth, approaching with amphibious units through water if enemy has no sonar.

If you have to cheat cause the prediction algorithms are to complex to code or for the CPU, then at least use map hacking only for units you have seen recently, and forget about them again if they were too long out of LOS/Radar. It would stil be weird sometimes, why the AI knows that you did a 180 turn right after you got out of its LOS, but it would already remove a big heap of the annoyance for the player, as the AI would not know at all about units it never saw, so you cna still do sneak-attacks.
Achilla
Posts: 79
Joined: 24 Aug 2009, 15:17

Re: A.I. behavior: Realism or Performance?

Post by Achilla »

hoijui wrote:quite everything in your post is either very bad reference or just false.
for example, if you had read the posts in this thread, and knew which users are devs, you would see that your first paragraph is compleetly wrong. (btw, i am a dev too ;-) )
second, comparing a chess AI with a spring AI ... nuff said.
third, all your post suggest you did not read this thread. if you did, it would look even worse.
next, there was repetition of arguemtns, which i said is useless.
you described it as me saying everything has been said, so the discussion is over...
in general, you just have no idea about the topic, or you have a very bad day.
there is too much excageration, mal estimation, boolifaication in your post...
i strongly suggest going politics, if you are not yet headed this way already; you shall feel very much at home there.
I pursue no politics Sir and your post doesn't help your case much, either - actually, your reply sounds like a not-so-tactical withdrawal, which unfortunately makes your claims against what I've written look even more untrue. Whatever you think or seem to know, convince me. Or better yet, create an AI based on your principles which will be competitive to AI using light cheats. I will gladly test it out.

Good day to you.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: A.I. behavior: Realism or Performance?

Post by Neddie »

neddiedrow wrote: 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.
Nobody addressed this post so I'm restating it. I'm tired, specifically, of AI which reduce the effective options of the player and/or clearly violate the constraints which would be visited upon the player. I am well aware of the performance benefits of simply making an AI omniscient. Extending the ability of the AI to predict and react is fine, but the way in which this is commonly done erases a large section of the player's options.

If I were making an AI I would probably track units of general types when they were created to allow the AI to construct the right units to compete with them, but I would not go for a simplistic map reveal. Simple abstraction of relevant information. Similarly I would probably implement minor resource boosts based on need calculated in a discrete time frame rather than the more heavy handed consistent income boosts and/or storage fills utilized in most RTS AI.

Would it be a little more performance intensive to have real scouting? Yes, but not necessarily that much more intensive, and certainly worth the challenge of designing an efficient scouting system. Similarly, the need based resource boosts would be slightly more intensive but surely more fun if not particularly challenging to implement. The AI would be cheating but it would be more subtle about it and nothing would clearly compromise the experience of the player.

That is my position. I advocate cheating which merely improves the experience of the player through improving the ability of the AI, without clearly diluting the options of the player or behaving in a manner which is obviously and greatly compromised by some sort of cheat.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: A.I. behavior: Realism or Performance?

Post by Error323 »

People are just missing the point there, its not about the resource boost, that's trivial. The problem lies in creating a good performing AI without the use of maphacks. Scouting is just a small part of that.

For example, E323AI would lose its entire strength (the avoidance of enemy contact by constantly repathing using a threatmap and targetselection), it would just perform much worse (no doubt about that). Therefore its the implicit disable of these kind of concepts/approaches that introduce the REAL problem/challenge in creating a good performing AI.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: A.I. behavior: Realism or Performance?

Post by AF »

The basic predictive algorithms and scouting algorithms that would enable you to attempt to do it without a maphack involve algorithms that are invaluable and have multiple uses.

Any algorithm that tells a scout where to go is also a prediction tool for what the enemy can see or might wish to look at if applied in reverse.

Not to mention many of these algorithms have uses in attacking and other data management problems.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: A.I. behavior: Realism or Performance?

Post by hughperkins »

Maphack...

Well, at the risk of being naive, I can't see what the big deal about maphacking is. It's one small part of a much bigger deal.

Maphack vs resource boost

You can get the same info as maphacking more or less by effective scouting. Sure, you need some resources, but hey, wasn't one of the options to boost an AI to give it a resource boost? How many resources does it take to build an airport and pump out those tiny pidgeon reconnaissance unit once every ten seconds or so? Worst case, that amount of resources is equivalent to maphack. In reality, fewer resources will be needed most likely, since you don't need perfect knowledge of the enemy to make decent decisions, ie there was a guardian two minutes ago, it's still there now!

Random thought whilst re-reading: a resource boost might be more interesting if done throughout the game, ie a mex gives 10% more metal for example.

This is done effectively in Tiberium Wars, where the damage each side is done can be handicapped, from 10% to 100%. Works great. I can play against my gf and lose!

Additional addendum: this would be a useful function generally iin Spring actually, so I can play against my gf, and the game will be fun fo each of us.

Scouting implementation

Scouting is not that hard to do. You can scout randomly, which is trivial to implement, and surprisingly effective.

You can scout with a losmap showing where you visited recently. A little harder to do, but not more than a few hours work.

You can improve scouting performance by guessing that the enemy will be on the opposite side of the map as you, so why bother scouting all the bits in between right at the start?

To maphack or not to maphack?

HughAI has a simple option in the config "maphack"="yes"/"no". Turn it on, and it maphacks. Turn it off, and it scouts (note that any units it already knows about will stay in memory, once you've turned the maphack off).

Against E323AI, I turn maphack on, and win ;-) at least in the game I tried.

Against AAI, I turn maphack off, and win.

For AI vs AI, I feel that maphack is just one more option, like speedmetal vs non-speedmetal, land vs water, etc...

AI advantages over humans

AIs do stupid dumb things and centrate on them.

However, they do have several advantages:

- once they have seen a unit once, they know that unit's definition for the rest of the game, even if it's just on radar

- if they send one of those small pidgeon reconnaissance units over the enemy, they have perfect knowledge of every position and every unit definition for everything they saw. Not like a human, which kind of can guess roughly "oh there was a nuclear reactor there roughly, but not sure if it was here... or here... or here."

- microing is the obvious one.

Learning

I kind of think it would be nice if an AI learned globally, for all AI isntances, rather than on a per-isntance basis, so the results of each game are automatically uploaded to a central server. I'm not quite sure how acceptable players might find this? I haven't implemented it yet. I guess a simple dialog "Are you ok with the AI uploading stats to a central server to improve performance?".
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: A.I. behavior: Realism or Performance?

Post by JohannesH »

hughperkins wrote:How many resources does it take to build an airport and pump out those tiny pidgeon reconnaissance unit once every ten seconds or so?
A lot.
Additional addendum: this would be a useful function generally iin Spring actually, so I can play against my gf, and the game will be fun fo each of us.
I think it is in, just like that, or how else does the resource bonus system work?
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: A.I. behavior: Realism or Performance?

Post by hughperkins »

Well, it could just give a bonus resource at the start. Springlobby doesn't seem to offer any such option, so it is hard for me to tell how the option works ;-)

It is cool if there is already an option to boost resource output for one team and not the other.

I quite liked the option in Tiberium Wars to handicap the damage output. That worked quite nicely. On 10%, I sent an army of soldiers to my gf, who annihilated them with three of her soldiers.... quite an effective balancing mechanism!

However balancing using resource output ideally should work just as well.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: A.I. behavior: Realism or Performance?

Post by hoijui »

.... you have a gf that plays RTS games with you???
now all the community will be trying to get her, you should not have mentioned that ;-)

The lobbies lareayd have the resource bonus option, but you have to start the game from the multiplayer screen, not from singleplayer to be able ot use it. As said alreayd, this is the superior way to play singleplayer, even doh it is paradox.

i agree with you, the resource bonous thing is good for AIs anyway, or just cheat-get the resources for an airport and restrict your AI to only build scouts with this particular airport. though, it would be better to use scouts of the factory you build anyway, cause... well otherwise you will know that the AI will come scouting with air always, which takes away the decission whether or not to build anti air early, cause you simply always have to do it when playing agaisnt this AI.
Post Reply

Return to “AI”