Jump to content


Photo

AI


  • Please log in to reply
11 replies to this topic

#1 Saijee

Saijee

    GMC Member

  • GMC Member
  • 2256 posts
  • Version:Unknown

Posted 26 May 2012 - 04:18 AM

I have my own answers. But what are your personal answers to these questions?

What makes an AI good?
What makes an AI bad?
What makes an AI smart?

Here are my answers:

A good AI is one that can make for a fun battle. In order to be fun I should be able to trust that the AI will always do certain things in response to certain circumstances. Humans are often pretty predictable, So an AI that is as predictable (but not too predictable) will feel more human.

A bad AI is one that is completely Random, using absolutely no logic to follow in order to predict it's next move.

AI smartness can be controlled by assigning a variable to how frequent the bot will come up with a good idea. The way I do it is that I have my bots have 2 kinds of decisions, instinctive and intelligent. Instinctive decisions will be immediate responses, and intelligent decisions require the player to do something specific in order to avoid the attack.

Using this method, I can effectively make the same bot smarter or dumber by raising and lowering the intelligence variable.

Edited by Saijee, 26 May 2012 - 07:03 PM.

  • 0

#2 Katuko

Katuko

    GMC Member

  • GMC Member
  • 4886 posts

Posted 26 May 2012 - 07:47 AM

I can start by saying what I think is bad AI, and that is AI that is just plain annoying. This would include walking straight into the player and sticking there; having perfect reflexes all the time; seeing regular players or power-ups through walls; etc. Good AI, on the other hand, include some limits to make the AI seem more realistic. They do not need to be mistaken for human to be good, they just need to not be cheap on the player.

If I have a bear enemy that I stick in a forest level, I might want it to sleep, walk a bit back and forth at random, and attack if approached. Now, all that AI needs is to move and pause at random, and chase the player if he comes close. I'm thinking I shouldn't make it react instantly, though, but take a random time from 0.5 to 2 seconds (depending on if the player is in front of or behind it, perhaps?) before it charges. This gives the player crucial time to retreat, plus it makes the bear look slightly more realistic and not like an automated killer-bot.

Now, smart AI is a tricky question. Being smart in a game can be defined as doing things that lead to your victory without incurring too much of a risk. In that case, a shooter AI that stands right next to a corner, then jumps out and sprays its machine gun at an unsuspecting passerby is smart. It is also a bit frustrating, however, because by ambushing someone at that distance, it will most likely be too late for any retaliation. Most AI I have seen (and made) falls into this, though: they walk around a bit, target the closest enemy, and attack as long as they are in range and the enemy is not behind cover.

It's been said before in Game Design, but smart AI is usually circumstance-based. It would change its approach based on its current status. Target in sight, but not engaged? Sneak a bit closer first. Spotted? Don't just rush in and die, try to strafe and cover. Low on health? Retreat while spray-n-praying a few shots to prevent pursuit. Enemy behind cover? Throw grenade next to the cover. Enemy on the rooftops? Stick close to the wall and try to find a ladder.

...Etc. Basically, put yourself in their situation and think "what would I do?". I know for a fact that the Combine AI in Half-Life 2 is based on military tactics, where the bots will actually use group tactics. Some stay behind cover and shoot, while others strafe across the field. That's right: they provide cover-fire each other. It's a shame that most of the game's areas are rather cramped, because the AI doesn't get to shine that often. Via an aerial view of a constructed battle, one YouTuber showed that the AI not only does the cover/advance thing, they also try to flank and use their limited grenades where appropriate (enemy cluster or enemy hunched behind cover). When plying against them they don't feel terribly smart, but occasionally you go "woah there" because one sneaks up on you.

In one of my own games, I have found that sometimes the AI does things I would not have expected it to, but that it is perfectly possible for both it and the player to do. It's a platform game with a bunch of special abilities. The Fire power gives you regular flames and an explosive fireball to use. Now, the AI would often spray fire while running towards you, making you run and jump. Once you jump, the AI often jumps too, and I've found that the chance is high of it choosing to randomly throw a fireball around then. And in the air, you simply can't dodge as well. This goes for other projectile powers too, so we have an AI that essentially combo's its enemies without meaning to. The only AI it has for using powers is to judge distance first so it don't waste energy on short-range powers when the enemy is far away. But it acts mostly the way a player would (thought it sometimes kills itself by accident), so I'd say it's successful.

Edited by Katuko, 26 May 2012 - 07:48 AM.

  • 0

#3 MissingNo.

MissingNo.

    Disco Inferno

  • GMC:Member
  • 312 posts
  • Version:GM8.1

Posted 26 May 2012 - 06:20 PM

I agree when you say that enemys should not hang around, a lot of games have bosses that take a break from attacking to just sit there and be hit
by the player. and and a lot of games have bosses that dont no where you are, like say you jump on the other side of them and they will be oblivious.
and a lot of bosses shoot stuff but does not go for the player. I think bosses should attack constantly, target the player and not just do random
movements to hit the player in fact I think you should not have to get hurt by bosses by simply touching them. the boss should be capable of killing the player
without having to spawn other enemies to attack you and with out having to walk into the player to hurt them.

#4 JAk HAk

JAk HAk

    sepius fidelis

  • New Member
  • 713 posts
  • Version:GM:HTML5

Posted 26 May 2012 - 07:12 PM

A good AI provides an adequate and complimentary challenge to the player character's move and skill set.

An AI is bad if it relies on cheating, erratically makes bad decisions, or provides an inappropriate challenge with respect to the player's abilities.

A smart AI makes decisions that make sense in hindsight and yet surprise you, catch you off guard, and force you to react appropriately. Combating a smart AI should be a good mix of planning ahead and being ready to react.

To me, there are two dimensions to AI. One is the Bad--Good dimension, and the other is the Dumb--Smart one. It's possible to have a good AI that's entirely predictable and thus "dumb," just as it's possible to have an AI that's too smart to ever be fair and thus "bad." And there are good-smart AIs and bad-dumb AIs too.
  • 0

#5 Yal

Yal

    Gun Princess

  • Global Moderators
  • 5837 posts
  • Version:GM8.1

Posted 29 May 2012 - 10:50 AM

I personally think that working with your AI beyond a basal level is more or less wasting your time, since beyond a certain level the player won't notice how good the AI is. I prefer filling my games with loads of cannon fodder enemies so that the challenge comes from you being constantly outnumbered, but with each enemy being fairly predictable so that you can combat them without worrying about them pulling off a MacGyver when you put your guard down.

Kinda like in the old games I like to play, in other words.
  • 0

#6 @Alex@

@Alex@

    Retired GMC Reviewer

  • Reviewer
  • 3075 posts
  • Version:Unknown

Posted 29 May 2012 - 04:04 PM

A bad AI is one that does one of the following

  • Is completely random
  • disobeys predefined rules
  • is perfect
  • Always reacts exactly the same way
Take Lance from Pokémon Red/Blue/Yellow he cheats , he has pokémon unobtainable at those levels and moves that those pokémon cannot legitimately learn in these games until generation. Another Pokémon Gen I example is the spamming of super effective moves meaning that the AI will always choose a Super Effective move even if it does no damage meaning you can switch into Agility Dragonite (Lance) with a Fighting Type (Hitmonlee say) and set-up and sweep with a massively underleveled team.




A good AI is one that does the following




  • Has a certain degree of predicability but not so much that they become overly predictable
  • Obeys the predefined rules
  • is not perfect
  • will learn from mistakes
A smart AI is one that can adapt , does not fall for the same tricks over and over (but can still fall for them but with a lower chance and not if they've been used a lot recently) .



  • 0

#7 Yal

Yal

    Gun Princess

  • Global Moderators
  • 5837 posts
  • Version:GM8.1

Posted 31 May 2012 - 12:42 PM

Yep, the AI in Pokémon R/B/Y is terrible. Not only does it cheat and select moves when they are USED, rather than in the start of the turn (meaning that if you change pokémon, you'll get a Super Effective hit no matter what you do!), and what is worse: all AI pokémon have infinite PP. This means that you can get 5-use moves like Fire Blast spammed in your face no matter how long you persist.

But as for Lance's pokémon, it's actually possible to catch Lv.7 Dragonite (and Nidoqueen, and Gengar, and Mew, and Electabuzz, and more importantly, Missingno.) in Red and Blue so his Lv.50 Dragonite doesn't break the game rules technically depending on if you take the Escape Via Fly cheat as part of the game universe or not.


So the PRBY AI is bad because it breaks predefined rules, period.
  • 0

#8 Saijee

Saijee

    GMC Member

  • GMC Member
  • 2256 posts
  • Version:Unknown

Posted 31 May 2012 - 03:17 PM

I never got into pokemon so I can't say I know what your talking about.

In a game I have played for a long time, Armored Core, they would make a lot of the bosses break predefined rules and that worked out fine.

I fail to see how that has anything to do with AI.
  • 0

#9 @Alex@

@Alex@

    Retired GMC Reviewer

  • Reviewer
  • 3075 posts
  • Version:Unknown

Posted 31 May 2012 - 03:48 PM

Think of it this way. You and some AI are playing a game of a chess where the rules are ridgly defined then suddenly the AI decides that the Queen can jump peices. It's a bad AI because it cheats. Rules and AI are very much intertwinned.

The level 7 dragonite is an exploit, you steal it from a trainer.
  • 0

#10 Saijee

Saijee

    GMC Member

  • GMC Member
  • 2256 posts
  • Version:Unknown

Posted 31 May 2012 - 04:55 PM

I guess it really depends on the game.

For example. Super Smash Bros 64, Metal Mario is a legitimate Boss, even though he cheats in that he is severely in his own weight class.

Because of this unfair advantage he has, you have to fight him in a completely different way that you fight normal opponents, but that didn't stop it from being an awesome boss battle.

*Speaking of chess* there is an actual version of chess where one player has an unfair advantage, but it still makes for awesome gameplay. It's called "The Flying Knight." White gets all their peices, black only gets a king and a knight, but can move twice per turn.

Edited by Saijee, 31 May 2012 - 05:20 PM.

  • 0

#11 JAk HAk

JAk HAk

    sepius fidelis

  • New Member
  • 713 posts
  • Version:GM:HTML5

Posted 31 May 2012 - 06:28 PM

In SSB, the weight classes are not part of the rules, it's simply a nice way to categorize the characters. Metal Mario is his own character in that game, so he comes with his own move set and statistics. It would be cheating if he could add stock to his lives at will, or teleport to different parts of a stage, or make his shield last forever.
  • 0

#12 Saijee

Saijee

    GMC Member

  • GMC Member
  • 2256 posts
  • Version:Unknown

Posted 31 May 2012 - 07:10 PM

Jak are you kidding me? Metal Mario does no have his own move set, he has Mario's move set. It IS cheating because you can't even flinch him until his damage is in the red zone, not even throws work.

But if you want to be so picky about it, I could also use Giga Bowser from melee as an example. Now he really does cheat in that he is the only character that is ungrabable.

But like I was saying with Armored Core. They had well-made intimidating bosses. And part of what made these bosses so exciting was that many of them did break the rules of the game. Like having unlimited boost meter, being unburnable, Unlimited Ammo, Using the same weapon as you and shooting twice as fast, Having a laser rifle that for some reason can also shoot grenades, using cannons that require you to sit on the ground without being on the ground, using blades as a projectile for a OHKO.

Remember, this is a game where you customize your own robot. For the most part, you could copy the design of any boss, but it would not have the unfair advantages that it had when you were fighting against it.

But despite the fact that the enemies were cheating, I still thought that they were legitimately fun battles.

Edited by Saijee, 31 May 2012 - 07:12 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users