• Advertisement

Archived

This topic is now archived and is closed to further replies.

"Legalized cheating:" Rules vs. AI

This topic is 6185 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

We''d all probably like to be able to pull together an AI opponent that can intelligently play against the player. Problem is, the more complex the game is, the harder it is to code a decent AI. What about using the game''s rules to simulate intelligence? Enemies don''t get smarter, but the rules change to make them more challenging to deal with. Take Red Alert 2, for example: Enemies seem to use the same unit AI, but as they survive battles they become more lethal or acquire new attacks. In any game where the AI has to act strategically (RPGs, action, RTS, etc) it seems like you can assist AI by changing the rules to show that they''re "better." For instance, losing units might have a 25% chance to rally, making them temorarily faster and stronger. Or forces commanded by a brilliant general might get many more hitpoints. It''s not perfect, but it might assist otherwise nominal AI. And you wouldn''t be able to call it cheating so long as all sides were governed by the same rules, right? If the rules were built in well enough, it seems (from the outside anyway) we could make some pretty lethal opponents. -------------------- Just waiting for the mothership...

Share this post


Link to post
Share on other sites
Advertisement
Yes, sounds pretty reasonable to me. We have to cheat sometimes when making a real-time game w/ limited RAM, CPU time...

Besides we''re trying to capture the sense of this abstract, fantasy world by using binary digits...not everything we do can be 100% authentic




http://www15.brinkster.com/nazrix/main.html

"All you touch and all you see is all your life will ever be --Pink Floyd
Need help? Well, go FAQ yourself.

What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers

Share this post


Link to post
Share on other sites
Instead of changing the rules, why not just restrict the amount of rules available?

So the higher the enemy''s level is, the greater the amount of rules he can choose from. And if he is the Gittard-Black-Mofo-Baddy, he can utilise all the tricks in the book ...

Seems easier to me



"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick

"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles

Share this post


Link to post
Share on other sites
quote:
Original post by morfe

Instead of changing the rules, why not just restrict the amount of rules available?

So the higher the enemy''s level is, the greater the amount of rules he can choose from. And if he is the Gittard-Black-Mofo-Baddy, he can utilise all the tricks in the book ...

Seems easier to me



?? Wha? Can you please ''splain zactly what you mean?

I was actually trying to remove "choice" from the equation. Choice is the problem, really. The overwhelming number of choices makes it difficult for the AI to figure out what''s best to do. Compare something like Chess to Starcraft. Though the choices in Chess are huge, they pale in comparison most RTS games.

What I''m talking about really is designing a ruleset with managable boundaries (like Chess?), and then changing things like unit capability or resilience. Chess this way might give you the ability to replace a bishop with a knight, or make it so that a pawn could occassionally survive an attack by a queen.

The hope is that by designing "intelligence" into the ruleset, you cut down on the work AI needs to actually do.

--------------------
Just waiting for the mothership...

Share this post


Link to post
Share on other sites
Why didn''t you say that in the first place?

Alright then, try this:

Have a finite set of rules. As the enemy gets tougher, allow them to search further down the tree to compute their next possible moves Just like chess ...

Otherwise I''d go for something like:

If (player has strong forward attack) then Flank;
If (player values ranged weapons over melee) then Ambush;
If (player has superior numbers) then Harrass_Flanks;
If (player is weak) then Frontal_Attack;

etc.



"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick

"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles

Share this post


Link to post
Share on other sites
Wave, i personally detest the idea of a cheating AI. it means the programmer didn''t take the time to make realistic AI. If you look at the level of difficulty of a game, and survey people now vs people who were around in the old skool atari times.. you''d find out that the "Normal" difficulty is about 10 times harder nowadays.
For some reason, the normal has gone up. Or have game designers had to make up for a lack of intelligent games by making them SO hard you can''t beat them without the cheat guide? This makes them more money, certainly.. but why is this happening?
Heck, i can''t hardly beat anything on the easy level now. People make games with enemies with dead on line of sight, that always know how to find you, and when you get within 500 feet, start running to kill you.

J

Share this post


Link to post
Share on other sites
You dislike the idea of cheating ?

I hope you don''t play tabletop RPGs cause GM spend all their time cheating.
Yes I do, and I''ll even told you that it''s good !

Think about it, what creates an interesting and makes your character a hero if it''s not to attack his weaknesses and show hiw strength from time to time ?

Of course you want the AI to cheat, just not too much that''s all.

Imagine a half god, he might know what you want to do before you proceed, and in fact you''ll simply make it''s AI to react to the players actions AFTER the player choosed them.

Cheating is good for RPG, but I agree that it''s bad for RTS and some other game genres.

Share this post


Link to post
Share on other sites
so you dont like npcs that cheat? right then. i would like to see you code up an AI simulator that takes into account sound levels (remember sound can be blocked by objects, and that it''s volume decreases over distance), visability of both the actual character, objects the character is hiding behind, shadows, etc. then make it work

i think i prefer the cheating idea

MENTAL

Share this post


Link to post
Share on other sites
I disagree... I don''t think that AI needs to "cheat through mechanics". It already can have access to privileged information (the location of the player''s base, what they''re building, every units current location and orders, etc). To simulate a better general, all that should need to be done is to "lift the veil" a little bit (call it intuition, a strong strategic mind, or whatever).

Give the AI some general behaviour (build base defenses, go "hunting", etc) and more specific (if x do y) and let it split its resources between the behaviours.

The player starts building a lot of fighter planes, the AI starts building A-A guns, in addition to some other more general strategies... Forces wouldn''t be "stronger", they would be more "appropriate".

The challenge really comes in restricting the AIs information appropriately and not making it too brutal. Too much restriction = dumb AI, too little restriction = frustrating AI.

Hope that made sense.

-pwd

Share this post


Link to post
Share on other sites
I''ll concede that any AI needs to cheat a bit, but I think it should be avoided as much as possible. I think it would be far better to develop scalable AI algorithms (even just increasing/decreasing the update rate) than to change unit stats to make them tougher.
The ideal is an AI opponent that seems like a human opponent. Changing rules to suit the AI seems like a step in the wrong direction.

Share this post


Link to post
Share on other sites
Think about it this:

In a many turn-based Civilization-alikes we give units attack, move and defense ratings. When two units fight each other, we compare terrain and unit factors.

Some units get, for example, a %50 defense because of hilly terrain. Others get 200% attack bonus because they''re cavalry on open ground. Sometimes experience is factored in.

This abstracts the minutia of battle. It doesn''t take into account feints, counter attacks, ambushes, etc. Units and their commanders are simply smart enough to have done all that.

Right. So if an individual turn-based battle is on one end of the scale, and an RTS battle itself is on the opposite end, then I''m looking for something in between.

Again, the idea is to redesign the AI so that the burden of making good decisions is somehow lightened. The turn-based battle does this perfectly, via the game''s rules, but it''s not detailed enough.


I was thinking that one way to do this might be to create AI generals that have specialties which then change the rules. For instance, General Chang has perfected the tank blitz, and this means that when he employs it his tanks move faster and hit harder. The player would know about General Chang''s specialty

The idea is to tie strategies with rules in order to help the AI out.

--------------------
Just waiting for the mothership...

Share this post


Link to post
Share on other sites
quote:
Original post by Niphty

Wave, i personally detest the idea of a cheating AI. it means the programmer didn''t take the time to make realistic AI.



quote:
Original post by Andrew Russell

Well actualy accounting for sight and sound wouldn''t be as hard as you are making it out to be.. especialy in a 2D game (RTS, most RPG, etc.)



quote:
Original post by Sandman

I''ll concede that any AI needs to cheat a bit, but I think it should be avoided as much as possible. I think it would be far better to develop scalable AI algorithms (even just increasing/decreasing the update rate) than to change unit stats to make them tougher.
The ideal is an AI opponent that seems like a human opponent. Changing rules to suit the AI seems like a step in the wrong direction.


Guys, no offense, but I really, really think you should look at the magnitude of the problem. Especially that of strategic AI for complex real-time games. It is a lot harder than you imagine.

Check out the design diaries or read the AI stuff from Woodcock or Keating or (Warlords 3 creator, what''s-his-name?) or talk to anyone who''s actually coded AI. These are not lazy people.

AI is the way it is today because the problem is hard to solve!!!!!!



quote:
Original post by pwd

I disagree... I don''t think that AI needs to "cheat through mechanics". It already can have access to privileged information (the location of the player''s base, what they''re building, every units current location and orders, etc). To simulate a better general, all that should need to be done is to "lift the veil" a little bit (call it intuition, a strong strategic mind, or whatever).



Well, this is actually what I wanted to avoid. This is true cheating, and strategy gamers don''t find it enjoyable. It''s not interesting simply because anything you do is automatically neutralized. Sneaky strategies don''t work, you''re automatically blunted, and worse yet: The AI still can''t win in an even 1 on 1 contest!!!!

What I''m looking for is the sense of playing against a great or poor general without actually having to do all of the AI processing that that typically entails. If you can''t actually outthink the player (ESPECIALLY IN REALTIME ), then the only other option is to build the strategy into the rules.


--------------------
Just waiting for the mothership...

Share this post


Link to post
Share on other sites
Hehe, your right, I know **** all about AI (I am a graphics programmer )

The problem is that players will know when they are being cheated. I think if you are going to employ this method, you have to do it in a more subtle manner than simply changing unit stats, or it will be noticeable.

How about conditional variable rate AI updates? Maybe general chang''s ability at commanding tank rushes means that he, and everyone under his command, gets extra AI updates, but only when commanding tanks? Hence the pathing, the reaction, response to threats etc. of all the tanks would be better than under general chong, who is rubbish at controlling tanks and only gets updates at half the rate. The tanks still move at the same speed, but they perform subtly better.

Share this post


Link to post
Share on other sites
quote:
Original post by Wavinator

Guys, no offense, but I really, really think you should look at the magnitude of the problem. Especially that of strategic AI for complex real-time games. It is a lot harder than you imagine.

Amen. RT games cannot afford complex AI due to the massive number of units on screen/existing at any one time. FPSs and RPGs (NOT Diablo) on the other hand, have more of a chance to exploit it.
quote:

Check out the design diaries or read the AI stuff from Woodcock or Keating or (Warlords 3 creator, what''s-his-name?) or talk to anyone who''s actually coded AI. These are not lazy people.


No, they''re very smart, very well paid people. Just look at Toby Simpson of Creatures fame.
quote:

AI is the way it is today because the problem is hard to solve!!!!!!

True, although we are getting better at it.

quote:
Well, this is actually what I wanted to avoid. This is true cheating, and strategy gamers don''t find it enjoyable. It''s not interesting simply because anything you do is automatically neutralized. Sneaky strategies don''t work, you''re automatically blunted, and worse yet: The AI still can''t win in an even 1 on 1 contest!!!!
This is only because the AI doesn''t have enough CPU time to develop a suitable offensive/defensive. It has to rely on rules developed by a programmer who often just wants to get it over with.
quote:
What I''m looking for is the sense of playing against a great or poor general without actually having to do all of the AI processing that that typically entails. If you can''t actually outthink the player (ESPECIALLY IN REALTIME ), then the only other option is to build the strategy into the rules.
You hit the nail on the head.
We don''t want to have hordes of AI soldiers, we want one or two AI Generals who determine what rules to use on the fly, rather than using a limited FSM or script.





"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick

"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles

Share this post


Link to post
Share on other sites
I think 1 of the main factor stacked against the ai is the LACK of advanced unit management features in the game engine. The AI has no easy way to have queuable orders. If it could have them, it would be MUCH easier(and less time consuming) to modify the command instead of rebuilding it every frame.
The typical RTS AI has to issue one comand at a time, this severly reduces the amount of forward planning that can be done with out tricks. Also if the ai can queue orders why cant I? This is THE major complain I have about starcraft and its clones. One big step back in unit management. The queued order should modify them selves based on events that occur of the target, ie the target to attack gets killed, the ore runs out ect. This would allow the AI to become more abstract, which is hard to do if you have to baby you havester from resource to refinery or tell you con units to auto repair stuff when on patrol.

Share this post


Link to post
Share on other sites
I think that the guy who said you should just lift the cover off some of the information was in a sense dead on, and in a sense completly wrong. The Ai should gather information on what you are doing to counter it. To use his example, you send a scout in(probably on a suicide mission just to scout, like i have done in game many many mant times) to see what the enenmy is doing, when they see that he is building losts of fighter planes then the Ai should counter by building AA guns, this is the way a human would accuquir information. However this is quite complex in any of todays RT games, however, i currently am programming an AI for a TB game, and I know it is posible to make good AI with out cheating becuase I am doing it (ok, mine isn''t that great, but that becuase I''m lazy).

Share this post


Link to post
Share on other sites

  • Advertisement