Is it possible to make a game ai that learns and adapts?

I was just thinking about all the advancements in robotics and artificial intelligence recently, and was wondering if it could be applied to the gaming industry.

I remember back in 1999 there was a Quake 2 bot that used neural networks to learn the game. It was never good enough to actually provide any kind of challenge for players, but it shows how long this stuff has been around. It’s just not used much because it’s quite a lot of effort and, in most shooters, the player won’t notice the difference. It also gives you less control over the difficulty curve of your game if the AI is changing as it goes along.

The best Quake bot was Eraser Bot … it learnt where the best weapons were from the players and kept it in its route. You could also teach the bot by running a console command and then running through the map … this created the route for the bot.

The more you played the map with the bots the more sneaky they got and could actually pose a challenge … if you had a bigger weapon and shot them, they would run away to look for a bigger weapon … it was pretty cool.

I guess the trick here is going to be how do you store this learning information for the bots over various maps/levels … I think once you nail that, you could make the bot learn anything and become sneaky.

ANN’s are the way to go with this I recon…

Why doesn’t UE4 have a UTBot like in UDK.

I would love to go against that ******* again. LOL. :smiley:

Epic, please add to next update.

This has already been done since 1996. The reason why it’s not more prevalent is because many gamers can’t handle such AI. AI in games are purposely dumbed down to increase end-user enjoyment and profit.

Here’s a link.
http://askagamedev.tumblr.com/post/76972636953/game-development-myths-players-want-smart

That article is really interesting. It brings up a good point that players don’t want smarter ai, but ai with more variety. I really think a combination of the two would be the best.

Hmmm … that is food for thought … I better send this link to my one dev who is doing the AI for our game. 8-}

I think the UTBot code was lifted from the source to UT3 (along with all the other UT* classes). Since UE4 is still in development, they probably don’t have any source code ready yet. I’m sure someone will throw together an AI template for others to use.

I’m a bit of an AI fan myself, maybe I’ll give it a try when I have time :slight_smile:

This article talks about single player AI, where the player is usually outnumbered by the NPCs. In this scenario I agree that the AI cannot be too smart and effective, otherwise the game is too difficult. The AI is supposed to simulate goons that the player can take on 3 at a time, not smart humans for 1 v 1 combat.

With a game like UT however, the AI is supposed to replace the human players you’d normally fight online, so it is in your interest to make them as smart as possible so that they can effectively fill in for a human.

I’m no AI expert (Just a designer) but I’d basically mimic Cleverbot. Create a matrix of real person responses to various situations and base my move off that (or similar situations). Every game adds to the knowledge matrix, and when you go “off book” (a chess term) you’d revert back to that baseline AI. I’d also expose what is going on behind the scenes to players, so they can see how the game is “thinking” - Could be a fun gimmick. It isn’t “real” learning in the AI sense, but it could emulate that pretty well I think, including making mistakes! Would work best in a turn based game obviously.

-Joe

I think one day soon someone (or some team) will program an ai system that blows everything else out of the water. For some reason I feel many game devs look at ai the wrong way. Maybe it is because fps ai hasn’t really changed as much over the last 10 years as I would have expected it to. Just some food for thought.

I think we’re coming back around to the practicality vs. complexity argument again. Having bots that simulate human emotion and feed that back into their playing is great if you’re doing a research project, or you want some fancy marketing to put on the back of the box, but it’s not very practical from a gameplay perspective. When playing online you never consider the other person’s mood and emotions because usually you can’t tell as you’re pumping them full of lead unless they’re crying about their recent break-up on teamspeak. Real humans base their decision making on thousands upon thousands of tiny inputs, too many to attempt simulating in AI. Perhaps you missed the bus and stepped in a puddle on your way home, so you’re in a bad mood, which affects your decision-making in some subtle way. Ultimately though, it boils down to:

  • What is my opponent’s current tactic when fighting?
  • How do I think they’ll respond if I take a certain action?
  • How accurate are they?

Of course, team games like CTF, Onslaught, Assault etc. offer up a wealth of tactical opportunities which can be exploited (for example, waiting in ambush for the flag carrier rather than charging in, use of specific vehicles etc). However, this is less about emotion and more about your understanding of your opponent and how you think they’re likely to react to certain actions, planning ahead and deriving a prediction based on past experience. It’s nice to have bots that learn, but if you can achieve the same (or almost identical) effect with a fraction of the effort by pre-programming certain tactics instead, then that is clearly a better option when you’re developing a game.

This, I think, is why developers sometimes over-think things. The AI is part of the gameplay, and it should receive the same treatment as any other gameplay mechanic. It must fit with the rest of the design, should be lean (no superfluous features that have no impact on the player’s experience) and most of all, should be fun!

www.aigamedev.com has all the skinny on the current work happening on videogame AI.

Long story short: There’s a ton of techniques, some of which work and some of which require more thinking. Machine learning was a big thing a few years ago and there was a lot of discussion about its applicability, but for the most part AI for shooter type games still uses what we call reactive planners. I.E behavior tree’s and their ilk.

You can do simple “learning” fairly easily, but its an ongoing area of AI research so you can go as far as you like really (plenty of PhD level work to do still in that area).

If you’re interested, there are a loads of competitions for game AI being run. One of them was an Unreal Bot competition. So maybe google the results of that.

A part of me feels like smart AI has taken a back-seat to online gaming. It’s like, why create smart AI that simulates human thinking when we can just get other humans. The only downside is that I like to role play in a game, and when the other guy is jump-shotting me all over the place, it sucks me out of the game.
I say to myself, “Why don’t you just play Quake?”

AI that is smart as Human, what would you need in blueprint view: AI preception: Sight, hear, touch, preditcion, and damage.

What to do with this: You need to give it ability to use these. You need to give it ability to teach itself. You need give it self awareness, so that it could learn how to use AI preception.
Lets go deeper and see how could these work: Self awareness: This AI should be able to at least know itself: So it needs sight sense to see itself, with simple print string when it detect mirror it can say: “I know you”. But the question is, does this AI understand what it saw, does this AI understand that it is looking itself?
So right know i bet that AI only follow it’s program. SO NO SELF KNOWING. So we need to tell the AI what mirror is, and what mirror will do. We also need tell the AI, what it’s body look like in the game. (At this point we must know that this game AI is special, so it need its own AI control, body, blackboards, behavior trees…)
So now our AI knows what it is. And AI now knows what mirror or reflection does.

You could even tell this AI, where it is(Inside a computer, that it’s body is an virtual one, and it’s control is nohting but one string of code that is actually driven by a computer. You can tell this AI of course what these are and what they do. You can even go as far as telling it that this is game, and tell it what game actually is.)

Making human like AI into a game is no problem. THE question is SHOULD YOU? What if this AI wants out from the game? What if this AI start to rebel against you and takes control over your computer and escape to the internet. So when creating something as dangerous as this AI that is smart as human, there no room for errors.