I've been using Orkin's Goal-Oriented-Action-Planning (GOAP) in my own game development.
Let me tell you an amusing story of how an AI agent outsmarted me, the developer.
So I had set up a test scenario, with an agent that could travel, buy stuff at shops, use axes, cut trees, and so forth. When I ran this test, I had set a goal of procuring timber.
What I expected the agent to do:
1. Go to shop
2. Buy axe
3. Go to forest
4. Cut tree
5. Drop axe
6. Pickup timber.
So I ran my GOAP test, and saw what the agent came up with:
1. Go to forest.
..
When I saw that step 1, I was disappointed, because the agent clearly should not be going to the forest when he has no axe yet.
But then, as a proud parent of my AI, I saw what the agent had actually planned:
1. Go to forest
2. Pick up firewood
3. Go to store
4. Sell firewood
5. Buy axe
6. Go to forest
7. Cut tree
8. Drop axe
9. Pickup timber
Hooray! I simply forget to give my agent money. But GOAP made him smart enough on how to get some money on his own.
I had of course equipped the agent with 'sell' action, and I had placed firewood in the forest, which I promptly had forgotten about when writing a test scenario.
Sounds very familiar. I once made a planning AI for the xlockmore / xscreensaver Pacman. It was never included since it would require too much CPU on low-end machines. Nevertheless, it took me quite some time to debug a strange behavior while writing it. The planning system would plan around 50 steps ahead, minimizing the risk of being eaten by a ghost while maximizing the number of dots eaten. Strangely enough, it would continually decide to go towards the ghosts, instead of evading them. Every time I saw this happening, I decided to stop the game and debug my code. Looking through it for the umphth time, I became weary-eyed and let the simulation run for a bit longer. Awe-struck, I saw what Pacman was planning all along: have the ghosts closely follow behind him. This would minimize the probability of being fenced in by the four ghosts.
And this reminds me, I wrote that code 12 years ago, and I still want to incorporate it (with a switch) into the xscreensaver code, but never came to it...
That's why the original ghosts had some somewhat random behavior centered around a corner of the maze for each ghost. If I remember right, at random times a ghost will head to its own corner in its own specific way. There's an article or two out there about it, it's an interesting read.
Plus, the ghosts are faster than you when you are eating dots.
I love examples like these but where lack of real world or common sense knowledge gives funny results.
I tried writing a text adventure game generator once that would combine puzzle templates you gave it like "object X you need is in a tree and you need a climbable thing Y to get it" and "object X is in a vending machine and you need a coin to get it" to create basic chains of puzzles. Without more constraints it would do silly things like create a vending machine containing ladders, vending machines in trees, vending machines containing other vending machines and trees, and vending machines that gave you a coin for a coin.
I was just reading about a bunch of weird bugs found in dwarf fortress. For instance, someone found all the cats were throwing up all over the place from alcohol poisoning. They looked into it and found the dwarves were spilling alcohol on the floor of the tavern. The cats didn't drink it though. No, they walked through it and got it on their fur. Then when the cats went to clean themselves, they ingested the alcohol. The game then calculated their blood alcohol content to be very high and gave them alcohol poisoning. Because it counted it as one standard of unit of alcohol, and the cats have much smaller body mass than dwarves.
All sorts of amazing, um, features, have been found in that game.
1. Obtain a vessel capable of holding liquids.
2. Drink from the vessel until it has one unit left.
3. Empty the vessel onto the ground.
4. Refill the vessel to its maximum capacity from the puddle you just made.
5. Drink from the puddle.
The problem was that puddles and spatter and liquid coatings did not have a volume.
So you can also quench your thirst by swimming in a river, then drinking the coating of water stuck to your own ear.
So the cat thing was exactly the same problem. An infinite number of cats could walk through one puddle of spilled alcohol, and then ingest enough alcohol to get poisoned by licking each body part. Lick first toe of right foot? That's a shot. Lick second toe of right foot? Another shot. Lick third toe of right foot? We're having a party now!
On the one hand, it seems like there should have been some additional effort there. But on the other, the game actually simulates that when you dunk something in water, it gets wet, and then stays wet until the water evaporates. I don't know of any other game that not only does that, but also handles dusts and powders, and things falling from the sky due to weather, and even getting diseases by inhaling vaporized droplets of a contaminated liquid.
You would think that with all that incredible detail, the pathfinding AI would not kill the framerate just from two dozen pastured sheep all trying to find their next clump of grass to eat.
It's crazy that the game simulates spilled alcohol, and that you can get it on you by walking through it, and that cats clean themselves by licking, and that they ingest whatever they lick, and that it computes blood alcohol content and simulates the effects of alcohol poisoning... DF is insane.
The pathfinding is pretty inefficient because it's entirely invented by the guy who wrote it. Who doesn't know anything about pathfinding algorithms. Also it's entirely single threaded.
> You would think that with all that incredible detail, the pathfinding AI would not kill the framerate just from two dozen pastured sheep all trying to find their next clump of grass to eat.
Dwarf Fortress is kind of the ur-example of passionately solving the wrong problem.
It's a fantastic game, and it's heartbreaking to me how much more fantastic it could be if the author adjusted his priorities a bit.
Ok there must be something here as I just laughed at this picturing a game where there's that vending machine containing a ladder that's stuck up a tree, and to get at it you'd have to get a tree from that other vending machine, which turns out to be stowed inside another vending machine, and for that you'd have to get a coin from a dozen or so vending machines that would mostly give you some that don't match the coin you need. The kind of game like Bureaucracy that puts the player into some borderline absurdist rage that soon changes into laughter.
I think there's a wonderful game in this. You are trying to escape from a virtual reality world created by a computer that doesn't understand how our world works.
Make it procedurally generated and allow people to share the best ones they find.
> I think there's a wonderful game in this. You are trying to escape from a virtual reality world created by a computer that doesn't understand how our world works.
I think so too but couldn't work out how. It needs something extra on top to give you a reason to work through the puzzles I think. So games like Sokoban where you could generate random puzzles don't need much of a reason behind them but all good text adventures are tied together with a plot of some sorts unless you can think of any examples. I binge read text adventure walkthroughs for puzzle ideas and the same generic puzzles felt surprisingly common (e.g. grate + crowbar, key + door, vampire + garlic, coin + vending machine, tree + ladder, spade + grave) but a game composed only of these would probably be dull.
Actually "virtual reality world created by a computer that doesn't understand how our world works" is the plot of the VR game Job Simulator I think.
> I think so too but couldn't work out how. It needs something extra on top to give you a reason to work through the puzzles I think.
I've been thinking on these lines recently too, and maybe the game could be to allow others to experience the fun you're having in building these rules and watching the outcomes? Letting them author the rules, and watch the outcomes. Or letting them manage and upgrade the bots, sorta like an overlord who doesn't actually chop wood etc.
This is kind of a nebulous idea (and definitely not new), but spawns from the fun I've been having the past few weeks in writing a bunch of simple rules for cities to attack, ally, trade with each other. Watching kingdoms evolve, alliances form and break, funny situations like a rock shortage eventually triggering a massive war among all kingdoms, was fun. It might not be as fun for a passive observer, but as the author of the rules, the feedback loop of making changes and watching the emergent outcomes was pretty neat (kinda like programming, heh). But it is a scary path to go down, if the intention is to market it as a game, because it doesn't look or sound like any "real" game.
On a different note, Dwarf Fortress is ripe with such emergent outcomes. On another different note, Robocode is quite fun where you author bots and rules and watch how the bots fare against each other.
> funny situations like a rock shortage eventually triggering a massive war among all kingdoms, was fun.
I love emergent AI game situations like that! Even that feeling of seeing enemies in Doom fighting each other hasn't been surpassed by that much in modern games I feel. Spelunky had a few moments like that though.
> Watching kingdoms evolve, alliances form and break, funny situations like a rock shortage eventually triggering a massive war among all kingdoms, was fun. It might not be as fun for a passive observer, but as the author of the rules, the feedback loop of making changes and watching the emergent outcomes was pretty neat (kinda like programming, heh).
Sounds fun! Any more situations like that?
I tried another prototype where it was a text adventure in a single room containing NPCs where certain NPCs liked, loved or hated each other (which limited their actions), there was objects characters could obtain (like a gun to threaten people to do actions for you or money to bribe people), characters had attributes (like intimidating, gullible, jealous) and as the player you could ask characters to do things for you and they could do the same. It had the same issue of nonsensical things happening which were unintentionally funny. Huge state space explosion though.
So I gave a NPC the goal to make a sandwich from bread and cheese which two of his friends were holding. Instead of just asking his friends for the ingredients, he obtains a gun, threatens a NPC he hates to steal the ingredients from his friends then threatens him to make the sandwich and hand it over. A valid but inefficient solution in the search tree basically. You'd probably want some common sense logic that most characters want to achieve their goal in a way that doesn't impact their social standing. Same thing as before though, instead of making the NPCs normal humans you could come up with a story about why they don't act normal to sidestep the common sense issue.
You can also do procedural plot generation. It's pretty doable as long as you don't set your literary bar too high :)
You kind of need to get a feel or knack for navigating the so-called "edge of chaos" between order -- too many restrictions/rules = predictable patterns = boring -- and disorder -- pick everything random and it becomes the conceptual equivalent of the "rainbow puke" mush of random RGB pixels that is always infinitely different but always looks like the exact same flavour of static. Similarly if you pick random notes from a few octaves to make a tune -- in theory you should come across all the famous earworms like Axel F, Smoke on the water, Final Countdown, etc etc, in practice you get a different slice of the same warbly nothing 99.9999% of the time.
That is, in some sense, where the Infinite Monkey theorem seemingly breaks down, while at the same time it is also exactly where it derives its poignancy. It's a very powerful pulling force between two opposites.
One very interesting idea, that has become quite feasible with modern computing power, is to use constraint solvers. Sure they are NP-complete but in practice they do a pretty good job. Imagine if you have a loose framework for puzzles, or challenges (maybe rooms with monsters and items) and it generates a beautiful wide variety of novel game play. Except, just like in real life, you can't always win. But you want it to, just like in a "hero's story", be just winnable, all the time. And you want your player to be able to trust that it is (it doesn't sound like a lot of fun bashing your head against a random-generated puzzle that turns out to be logically impossible). Constraint solvers can actually do this! There's a few articles on the Games By Angelina website.
I think that a constraint solver could very easily generate random Sokoban-levels that are guaranteed to be solvable. Now you need some (relative) measure of "difficulty" to sort them in order to create that feeling of progression and challenge. Which I also think is doable (amount of backtracking, "mental stack" required, etc).
There was also the Sega Genesis X-Men game. The whole game is supposed to take place in a hacked Danger Room, at one point you need to reset the computer and you do it by resetting the actual Genesis itself. The cartridge had to have a special battery to do this and it blew my mind as a child.
Don't forget Spec Ops: The Line, which plays on the idea of not having a choice in committing war crimes and justifying terrible amounts of violence, because you won't close the game.
> Ok there must be something here as I just laughed at this picturing a game where there's that vending machine containing a ladder that's stuck up a tree, and to get at it you'd have to get a tree from that other vending machine...
Haha, exactly, it was a really funny prototype. It took you by surprise by how much common sense knowledge you kept having to feed into it to stop it doing bizarre things e.g. knowledge like vending machines only contain small things, vending machines don't dispense the thing you put into them, large things aren't found in trees, ladders + trees + vending machines are large, vending machines are found on the ground... Even with all that it would put vending machines in the middle of a forrest, trees in an office and stack vending machines on top of each other so you would have to keep going if you wanted it to have some grounding in reality.
Also, if you're not careful you'd need constraint solving to make sure adding a new object into the world didn't short circuit a previous puzzle e.g. if you had an elaborate puzzle to obtain a coin but then added a second coin for another puzzle you could use the latter to skip the former puzzle.
> The kind of game like Bureaucracy that puts the player into some borderline absurdist rage that soon changes into laughter.
Yeah, I was wondering if you could treat the absurdity as a feature somehow instead of the hard work in trying to fight it. The major roadblock I was finding is it's hard to make the player care about what's going on if it's just a bunch of generic objects and puzzles. I've barely seen any advancement in AI in terms of interesting computer generated plots and characters which is what you could combine the above with.
Instead of better gun fighting AI and path finding, I'm really looking forward to games with complex AI characters where the gameplay involves you persuading them, befriending them, manipulating them, interrogating them etc. where the game has a plot that adapts to what's going on.
Games are all about shooting stuff and physical object puzzles right now. I'd like to see game equivalences of movies in genres like drama and thriller that revolve around complex character AI interactions.
Sounds like Gabriel Knight 3's cat-fur-mustache puzzle.
For those unfamiliar: You're trying to impersonate someone, so you use a convoluted trap to get some cat fur, which you use as a mustache. But the person you're impersonating doesn't have a mustache, so you draw one onto his ID with a marker.
> Without more constraints it would do silly things like create a vending machine containing ladders, vending machines in trees, vending machines containing other vending machines and trees, and vending machines that gave you a coin for a coin.
I'm pretty sure you can find all of these in Japan.
I'm curious about "8. Drop axe". Did your system have the constraint that the agent could only hold one thing at a time?
Or was the goal to carry the maximum amount of timber, in which case it's completely sensible to leave the axe in the woods and pick it up again when you return (assuming no other constraints, like competing agents or weather).
Is there any room in GOAP for weighting certain actions over others? Like, could I imbue a character with personality traits that would direct them to do one thing over another?
Per the GOAP paper [0], yes. You can weight different actions. The example used is: Order pizza (to satisfy hunger) cost of 2, make a pie (to satisfy hunger) cost of 8. If the actor only satisfies the preconditions for one, that's what they do. But if they satisfy the preconditions for both, they take the cheaper one.
Playable right now. It's a free download from Steam.
Look up `Children of Orc.'
The player can give assignments to the other Orcs, and the action plans for those assignments are displayed in-game.
The Orcs are smart enough to find cheap plans.
When tasked with procuring stone, e.g. they will see what the quickest way is.
Sometimes scavenging for discarded stone may be cheaper, other times, with pickaxe in hand near a quarry, quarrying is the way to go of course. They adapt. But whatever plan they come up with, it is communicated to the player in an info-window.
The search space for the plans is ridiculously large, so testing pre-conditions needs to be insanely fast. With AVX, you get to test up to 256 boolean preconditions in one go!
To give you an idea about search space: the Orcs have a repertoire of 115 possible actions.
Stringing together a plan of let's say 12 actions (some plans are longer), gives 115 12 possible plans. That is a scary big number: 5350250105473711181640625
A* helps guiding the search through this space, but can only do so much.
So every A* operation needs to be as fast as possible.
I gave the game a try and it's pretty fun seeing the details of how the figure out what to do. If the orc models were less ugly and the controls were better and it didn't crash so much I'd even pay money for it. Thanks.
Roguelike would probably be the simplest, since you don't need to worry about creating visual assets, and time / space is mathematically simpler (turns & tiles).
For those with a modest automated planning background, F.E.A.R. is inspirational because it shows even the most ambitious and inefficient planners, i.e. STRIPS, which is the grand-daddy of automated planning that searches across flat goals based on a known global state... even that, which is known to be an NP-complete problem in many domains, can be made practical in specific domains with tweaks.
Much of the automated planning literature is about finding ways to find the balance between computational tractability and expressivity of the domain & goals. Many attempts to fuse logic and imperative programming with an aspect of history: hierarchical task networks for example, which are like a high level procedural language with non-deterministic method dispatch. Games like Killzone 2 for the PS3 also had an interesting followup use of automated planning via hierarchical task networks, to do squad tactics; http://aigamedev.com/open/coverage/htn-planning-discussion/
Another thread is Golog as a variant of Prolog that uses Reiter's Situation Calculus to formulate complex goals and domain constraints in a relatively consistent syntax and applied towards "Cognitive Robotics": http://www.cs.toronto.edu/cogrobo/main/systems/ .. it's unfortunate a lot of that work seems stalled since Reiter passed away.
With all the recent hype around connectionist, deep learning AI, etc., there still is a lot of important work going on in the symbolic logic side of AI, particularly in this space of working in dynamical domains. Fusing the two will be really interesting.
Don't know how many gamedevs are here but I've always wondered if within gamedev, there's differences in how much info/best practices are propagated within the field. Graphics seems to be something that devs keep tabs on with each other. But maybe AI is more siloed off? I'm not sure what 10 years in improvement in AI looks like (as I do with graphics), but the algorithms and details [0] seem straightforward, or at least not impossible for a talented team with resources to build upon. I haven't played F.E.A.R. so maybe there's something about the game that vastly simplifies the factors?
First, remember the first principle of game AI, the goal is not to defeat the player but to entertain him. A simple way to say it is that too good AI is not what you want.
Secondly, for most games, the fun is simply not on the AI component of the game.
If you take those two points together, 1) good game AI is tricky concept, 2) that's not where the fun is anyway, then you got that not a lot of people cares about game AI.
Does the fact that people tend to spend more time on the multiplayer component of a game rather than the single player play any role in this 'not caring about AI'.
I mean, I really did not enjoy playing against AI because they are quite stupid in most cases, and the only way to make a singleplayer become harder does not seem to be to make the AI smarter, but rather have some 'modifiers' against the player.
For example in L4D, the damage you take from a hit by a common zombie on normal difficulty is 10HP (out of 100HP), but on expert the same hit is worth 20HP.
Other things to make it harder would be to spawn in more NPCs and just get the player more busy, or speed up the events in the game (like tetris).
But in all games with a decent multiplayer, it is just _way_ more fun to play against other human beings rather than shooting a bot. Because it actually poses a challenge.
I second this... the only reason I jump straight into the multiplayer when I try a new game is because the single player AI, at every difficulty level, in almost every game, is dumb as rocks. Making the AI "way too fucking smart" at insane/hard difficulty and then dumbing it down seems way, way, way better than hitpoint modifiers. I don't think smart AIs are written and then scrapped... that cannot possibly be what really happens?! Horrible if true.
>the only reason I jump straight into the multiplayer when I try a new game is because the single player AI, at every difficulty level, in almost every game, is dumb as rocks.
There's more to it than that for me. No matter how good the AI is, shooting at AI feels empty and dull compared to shooting at actual people. Not only are you assured cunning, but also someone who hates your guts and lets you know in chat! I suspect many others feel that way too, deprecating singleplayer in favor of multiplayer from the get-go.
>Making the AI "way too fucking smart" at insane/hard difficulty and then dumbing it down seems way, way, way better than hitpoint modifiers.
It sure does. Have you ever played Civilization? The AI is always dumb; the only way to make the game harder is to make the game fundamentally unfairer. In this case, making the AI smarter is a much harder problem than in a shooter game though.
> Not only are you assured cunning, but also someone who hates your guts and lets you know in chat!
Wow, this is precisely what turns me off multiplayer. I don't want to chat with someone who hates my guts, or tells me I'm a newbie, or mocks me for not playing perfectly. I remember CounterStrike 1.6 used to be toxic like this, populated by teenagers with too much time in their hands, outplaying you at every turn, and constantly insulting you.
No, thanks. Singleplayer doesn't belittle me, and is more immersive.
I completely agree! I like the "idea" of multiplayer, but, in general, the best thing about multiplayer is also the worst thing: other players.
Being punished for being new or not that good or not having as much time as the teen players (who are often the largest percentage of the game) is not my idea of fun. I remember I played an FPS a few years ago (won't say which one) and it felt like I was being punished for trying to get into the game. So I uninstalled it. As far as I can tell, the game is more or less dead now. By punishing new players, the fans killed the game. Yay for them. Instead, I moved on to some great single player games which treated me well and were much more fun for me to play.
Being punished to get into the game is annoying. I have been on both sides of it, and I actually understand the other side pretty well.
On Left4Dead(1 and 2) I was part of those people "punishing" new people in a way. There was this rule that we would kick anyone who had less than 500 hours on the game, or less than 1k if everyone of the friends we played with had more than 1k hours.
We were not insulting to the new guys in any way and usually just asked them to leave. But if they would not leave, we would kick them. But to be honest, if they would stay in the game, it would not have been fun for any of us. For us it would have made the game too easy, and for them they would just quit after a few minutes of getting dominated anyway.
When you are new to a game, I think it makes more sense to just play with friends who don't mind sticking up with you being new, or trying to find a way to play with other new people. When I got kicked from playing a game like Payday, I did not mind because I know that I am a noob and that If I end up playing against people who are far above my level, it would be fun for neither of us.
Sorry that you had that experience though, if you stick with some of the multiplayer games - through the horrible community sometimes - it actually can be quite fun. But my advice would be to find some dedicated people to play with, they really make any game more fun.
Interestingly, I did play L4D2 for a while without any problems. I also sometimes played other multiplayer games, for example league of legends (which does have some very toxic players, but for the most part wasn't too bad, although I typically played with at least one friend on my team).
I've also had games where I think the games design actually greatly influenced how much new players were being punished, for example by giving players who've played longer much better equipment. I've experienced that too and that was extremely not fun. That particular game also isn't active anymore as far as I know. So it's not just the players. My gaming time is too limited these days to play something toxic, be it players or the game itself.
But my advice would be to find some dedicated people to play with
I'd love to, but after work and other obligations, time is short and syncing up with my game-playing friends is hard. Most of them also play different games to what I enjoy so it's hard. The best I've managed is to get a friend to play dark souls 3 with me maybe one night a month... :(
I usually play through the campaign first. Not because the AI is clever, but because I want to know the story, why we play certain maps, etc. FPS games are not well known for having well written stories, but I still find them entertaining, just as I find games like The Last of Us.
The new Battlefield game was probably the first were I have only played the multiplayer (and lots of it).
"There's more to it than that for me. No matter how good the AI is, shooting at AI feels empty and dull compared to shooting at actual people."
It could be true. Making them people-like might get close to that mark, though. When I did multiplayer on COD Ghosts, I thought I was playing against actual people since they were acting like players. Then, I asked my brother which company he chose for Internet. He said he didn't have Internet. That I was playing against bots. One of few times I was speechless over an AI performance.
That might say more about the average player of modern cod games than the AI to be honest..
Most pub games on cod are too easy and thus you might as well be shooting bots. I would be truely impressed if the bots could match games in clanmatches etc.
Of course, the point would be to have AI good enough for the average player. so that is pretty neat!
You also did not have to suffer from kids shouting on the voicechat and all the bad community parts :-)
"That might say more about the average player of modern cod games than the AI to be honest.."
Lmao. You got me there. I didn't consider that. It does seem more than that, though, as the bots did things like camping, soloing, revenging, or careful groups. The CoD player knockoff might be behaviors like tea bagging. It did something goofy but I cant remember if it was that or something else. Once he said it was bots, I quicky found its weaknesses to start killing them in mass.
"You also did not have to suffer from kids shouting on the voicechat and all the bad community parts :-)"
You might be semi-joking but this is a real market. Lots of people got off Live or at least its voice features because of this. We're even talking on an invite-only, low-noise forum for similar reasons. So, AI or game developers should keep that in mind when making tradeoffs in marketing.
It was more of a sadly-but-true statement than a joke, as I completely agree with you that there is a market there.
Around the same time my friends and I started having families, most of us stopped gaming online because it was hard to coordinate all of us having time to play together, and playing with random people online was (often) a bad experience as we could not play 'on their level'.
A game with an actual good AI that feels like real players (without the annoyance of them) would be something I could see myself spend some time on.
> Making the AI "way too fucking smart" at insane/hard difficulty and then dumbing it down seems way, way, way better than hitpoint modifiers.
In principle, sure. However, taking a "way too fucking smart" AI and dumbing it down believably isn't necessarily that much easier than going the other way, taking a dumb AI and smarting it up.
Problem is you can't just slap a "dumbassness" dial onto a smart AI in a way that appears natural.
Possibly the simplest attempt could be to take a "way too fucking smart" AI and represent the dial as a probability that the AI takes a random action instead of the way too fucking smartest move. That gives you a very nice smooth continuous dial that will correlate monotonously with difficulty level.
But if you were to play against it (by which I mean you, cause I suck at videogaming, myself), you'll probably figure out soon enough that it's a strictly artificial handicap providing the difficulty, in a very similar manner to changing the monsters' HP or speed. Also it's not a lot of fun, if close to the hardest difficulty, you just luck out and the monster performs the most stupid move, and trips itself or something.
Such a dial doesn't represent cleverness. I suppose you could attempt something a bit less artificial, like limiting the search-tree depth for the planning algorithm or something. Question becomes how granular that dial would be (search-trees aren't that deep usually) and what settings correspond to what difficulty level, you'd need to playtest this. Also the question remains to what extent this artificial limitation will appear obvious or not.
I agree with you, a smart AI with programmed randomness of stupid errors would be noticably fake. But it's still way better than the dumb AI in most games that I can easily out-maneuver. At least with a smart AI, the hardest difficulty will actually be challenging and exciting. If it's too smart, I can artificially dumb it down by choosing an easier setting... but at least I, the gamer, am making the decision!
That seems backwards to me. Why not make a challanging AI for hard mode and then dumb things down for normal/easy. That's would appear to be more challenging than just upping the enemy stats for harder modes.
Tuning the difficulty of an AI in such a way that it seems natural is very difficult. In chess for example when you turn down the difficulty the AI tends to still play like a god for a couple of turns and them makes a complete blunder. That's not how weak humans play.
Interesting, and I mostly agree. My only point of disagreement is that, as a 40-something, I've no interest in multiplayer games. I don't want to play with random strangers (especially not with teenagers who are sure to beat me and trash talk me in the process), and most of my friends are busy with their families, and coordinating a time where everyone can (and wants!) to play a game such as L4D or Overwatch or Insurgency or whatever is very difficult.
Therefore, I've always enjoyed single-player games more. I fully agree that I do not want the AI to beat me every time; that's just frustrating. I want to be entertained with a good challenge that I can ultimately defeat. Surely there is an interesting game design challenge in this field?
Sure, I can answer your question. Probably the largest community of game AI devs is the Game AI Programmers Guild [1], which organizes an AI summit at the GDC every year, and has its own mailing list etc. On the European side, the Nucl.ai conference [2] fulfills a similar need for devs who don't want to travel nine time zones to California. :). Finally on the academic side, the annual AIIDE conference [3] brings both academics and devs together.
Between those three and their proceedings or conference videos, it's really easy to stay on top of developments in the industry. For an example, check out the AI Summit videos on the GDC Vault - many of them are free.
Planning approaches were a pretty new thing in games 10-15 years ago, but since then there's been a lot of work on exploring them, and people understand their benefits and limitations much better these days. For an example, there's a great study of the use of planning across many games by Eric Jacopin at GDC 2015 AI summit.
AI is like rendering in that the programmers doing that tend to cluster together at conferences, so they aren't completely siloed. The subfields that don't have that clustering effect are the ones not established enough that it's become a known specialty. Where isolation tends to be more obvious is when looking between different sectors of gaming: people working on mobile F2P have a vastly different view from AAA console devs, and both are likewise different from indie PC devs.
But AI in games does have a bit of an identity issue at times in that the obvious application of game AI(an AI opponent) doesn't represent the broader picture(FSMs appearing in every character controller and interactive element, planners employed in some forms of procedural content generation). With machine learning being the hot thing now, some AI devs are looking for angles to use it, which tends to push them towards backend data work that isn't too far removed from what other web and mobile companies are doing.
This is my understanding as well. Game AI is about "looking" intelligent (or as someone else in this thread said, about providing a fun experience to the player) and machine learning is about finding optimal solutions or predictions.
Also, nobody wants to run a google-sized deep learning network or what have you in order to train a mere game AI.
Secrecy is pervasive in the game industry, and used to be much worse. In many cases it goes as far as lawsuits over things that would be relatively minor and not worth suing over in other industries - like the look and feel of speech bubbles in multiplayer games.
Things have gotten better over the last decade or so, with game studios letting developers publish research papers or slide decks or even entire software stacks as open source. Sometimes studios pay to send developers out to give talks and do recruiting. A decade ago, it would have been a hard sell to even get permission to buy your own ticket to a developer conference at most studios. The last AAA studio I worked for had similar policies - only a few people at the studio ever went to conferences, and we all had to pay out-of-pocket. That studio's policies have changed and they now let employees give talks. In comparison, the silicon valley firms I worked for had better wages and encouraged us to both attend and give talks. I think some of the improvements in games industry culture here have probably been triggered as a result of competition from SV startups and open source.
When it comes to AI there are specific challenges: It's very hard to repurpose one game's AI for solving another game's challenges. It's very difficult to build truly general AI frameworks. Good game AI depends on knowledge of game systems, content, and mechanics - how each ability works, how the environments are laid out, the structure of level objectives, etc. All of these things can end up changing during development, and in a multiplayer game they may vary from match to match. As a result, even if you have a bunch of knowledge from other titles and you can reuse source code from the best titles in the market, you may still fail to build good AI for your game on your first few tries. It's that difficult.
General purpose machine learning frameworks have helped here though, and people using off-the-shelf engines like Unreal can take advantage of all the existing tools there to start building AI quicker. So that's nice.
Is the need to make your AI act as if they're working off of a different information and ability set than they are a factor?
For example, I remember when you turned the difficulty up to 11 on the AI from the first Black Ops game, the enemies just turned into aimbots with a half second or so delay before firing (made watching the kill cam pretty funny). On the other hand, it's not feasible to hand your AI a depth field (which is already not super cheap to produce) and have them use real computer vision methods on it. Also it would probably be too strong a nerf, and now you'd have a very expensive and laughably inept AI.
It was also the enemy of 'fear' itself, in that the game is a horror game with an omnipotent enemy. So while dealing with these clever enemies you're also facing the supernatural, adding to the experience. And the lighting/environmental effects.
The original Halo:CE had great enemy A.I. too. Though I think was more 'scenarios' being programmed in. What made the campaign fun asides from the big levels was that the enemy encounters were different every time.
As far as I could tell, Halo's AI wasn't actually that advanced from a planning perspective the way FEAR did it. The key was that each type of enemy had very different behaviors, so that in the chaos of a gunfight you'd feel like you were faced with a mixed strategy of behaviors meant to push you in specific ways. The Pacman ghost approach, but bigger scale.
Especially on the Legendary difficulty. To this day, the Halo series has the best set pieces and is overall the best single player experience of any FPS save for Half-Life
F.E.A.R is definitely one of the top 10 best PC games I've ever played. There are not many games that blend Action and Horror so delightfully (other than Half-Life). That being said, I haven't been around in the gaming scene for a while and playing catch up after recently building a gaming rig.
I do agree with the author about the lack of progress in FPS enemy AI. The recent releases from the Call of Duty franchise are nice games, but the AI enemy combatants look dumb next to their FEAR counterparts. Why has not FEAR's AI strategy been adopted by other games/studios? The article does not mention anything about this.
>I do agree with the author about the lack of progress in FPS enemy AI.
I believe online-play preempted advancements in game AI.
People will play competitively online if they want a challenge. Single player mode in FPS games these days seem less geared towards being a challenge and more geared towards being cinematic.
Because FEAR's AI was the product of an extremely focused game with very little "unpredictable" elements. It's easy to seem awesome when you have just do extremely little well.
What I loved about STALKER is that it felt like a living world. I remember watching a group of fellow stalkers being beset by bandits. During the whole firefight I was just watching it from a safe position. The fight ended and the stalkers continued to walk in the same direction they were following before. I did nothing but observe the action which was unscripted.
I really got the impression that a million little actions were happening around me even if I was not there to observe them.
Have you played any mods that expand the ALIFE system? There are some that run the entire ALIFE simulation in every map all the time, groups of stalkers can be having gunfights, trading, looting corpses, putting things in containers, etc etc - so every time you revisit an area after not being there for a while, people have moved, inventories have changed, piles of mutant and stalker corpses make appearances, all sorts.
They had a AI-driven ecosystem in mind, but scraped it. The agents, just snowballed the whole Eco-system.. meaning.. a mutated dog chases a rat, both run into a mutated boar, thus the chase cascades through the level.. until some incredibly strong monster hunts a tsunami of mutated boards towards the player. Which is cool.. but not fun.
Reminds me of Everquest, circa 2000, when a player got in over their head and started a 'train to zone'. Enemies would chase you to the end of the map/zone, so when a player realized they couldn't win a fight, they'd beeline for the boundary, and often picked up dozens of other enemies along the way. When they crossed the zone boundary, all those enemies would suddenly have no target, and fixate on any poor soul who happened to be nearby, or along their route back to their spawn area.
Oh, I had forgotten about this! Thanks for posting the link (I actually read this article back in the day).
The STALKER series was my all time favourite shooter series, and I'm sad that STALKER 2 never saw the light of day :(
PS, a friendly note in case you didn't know: people typically don't sign comments on HN (as the guidelines say, your comment is already "signed" with your username)
There is a slim chance STALKER 2 will happen, as Sergey Grigorovich reopened GSC Gameworld in 2014, making Cossacks 3.
When asked about STALKER he said that it is a possibility provided GSC can make a successful (and profitiable) go of it again, giving them the resources to make a true STALKER sequel.
On the plus side Grigorovich resisted all attempts to take over the STALKER IP, I'm convinced he wants to do it right, if it is going to be done at all.
On the other negative side, most of the original STALKER devs have joined other companies in the time between GSC first shutting down and reopening.
I do agree with the author about the lack of progress in FPS enemy AI.
I follow AI much more than I following gaming. I definitely find it curious that enemy AI has hasn't made a lot of progress when game-playing in a different form is such a focus of deep learning.
1. HW resources: games run on extremely tight HW budgets. It's probably the most competitive, cut-through industry in terms of what you can afford to do with a given CPU/memory/bandwidth per frame. While DL is still in the "let's throw a thousand GPUs at it, wait for a week, see what happens".
2. Quality control: DL is a blackbox. Bad for the playing experience for obvious reasons. And even if just using pre-trained models, the lack of control goes directly against what both the designers and players typically want (predictable fun).
3. Finally, DL hasn't made THAT much progress here, actually. There have been serious efforts to apply DL to modern games (e.g. DeepMind with Starcraft), but what you've probably seen is "just" DL applied to some finite-state, 100% deterministic, complete-information, zero-sum games. A far cry from complex dynamic environments.
Which is not to say it cannot be done. Just that the incentives (both business and technological) are aligned differently -- too little bang for a lot of buck.
> HW resources: games run on extremely tight HW budgets
Come on, you could have decent AI back in the day that pinned me down and made me run for cover, then had me at that clingglingoh shit moment when a perfectly timed grenade lands at your feet just as you were starting to take a breath†. Today we're stuck with scripted sequences and playing whack-a-mole with sniper rifles.
You may be under appreciating how much effort goes into good old hacking in games, to make things look "natural" but with minimal HW footprint :) Cutting corners.
Especially back in the day!
It's more of an art. Applies to graphics, AI, audio...
I remember a discussion on gamedev.net once where exactly this was brought up. Its very hard or even impossible to tune an ANN to behave how the designers want it to. Simpler systems may not be as technically intelligent, but their behaviour can be tuned, encouraged, scripted etc to provide the experience that the designers wish.
Beyond that, I remember they also talked about how it simply wasn't worth it because game AI isn't about being smart, its about being fun, interesting and "looking smart" (ie looking humanlike, human flaws and all). Machine learning is simply solving a different set of problems than what games have.
Some games, if multiplayer and a bot is put in, can use paths learned by human players to appear more human.
We did some of this for racing games which really have pretty easy AI when compared with character games or strategy. An example is take ghost runs from real players, essentially splines from real players good and bad, but adjust the runtime play to the current vehicles but try to run that line. That way runs appear more human and probably can't be replicated by AI as well.
For racing there is also the typical rubber banding AI which tunes to the runtime play[1].
Most AI in games really come down to just scripts and action recipes. Zone based events/actions, path passed actions/events, follow/ranged/staged reactions, global actions/events, AI directors that can tune the game to the player or difficulty dynamically etc.
Left for Dead probably has the best AI director out there for tuning some great co-op games[2]. It does med drops, weapons, enemies appearing all based on the current state of the players and skill. Music also changed per player based on their situation and intensity of that situation.
The Director, sometimes referred to as the AI Director, or simply as AID is the artificial intelligence of Left 4 Dead that features a dynamic system for game dramatics, pacing, and difficulty.
Instead of set spawn points for enemies, the Director places enemies in varying positions and numbers based upon each player's current situation, status, skill, and location, creating a new experience for each play-through. The Director also creates mood and tension with emotional cues such as visual effects, dynamic music and character communication. Moreover, the Director is responsible for spawning additional health, ammo, weapons, and Special Infected, like the Witch or the Tank.
It should be noted that there is another Director in the game, which controls the music on a per-player scale, called the Music Director.
The goals are very different. AI in games needs to provide a challenge to the player whilst still being comprehensible. Most of all it's designed to be beatable. Part of the reason games make a good deep learning challenge is that they are consistent systems that people can comprehend and reason about pretty easily.
Most FPS games with the exception of titles like Alien: Isolation simply haven't needed anything complex. Essentially more complex AI with the same freedom wouldn't be noticed by the player in most FPS games. Given more freedom a more complex AI suffers from being less comprehensible as the player is less aware or unaware of the actions it took to do something clever. For example a clever enemy that flanks the player is experientially identical to a scripted event that spawns dumb enemies on the players flank. Further the advantage to the second technique is not only that the AI requires less work but the entire scenario can be carefully designed.
Which is not to say a more intelligent AI wouldn't make for a fun FPS game it's just people haven't been making those games.
I haven't worked in video games since the PS3/XBox360 but everything was bespoke on every platform for every game except for maybe low level audio in my ten years on PC/Mac/PS3/XBox360 and I had to review/examine code for games other than the titles I worked upon. Even games that used game engines/physics engines have heavy customization. I only worked at smaller studios but the practice of starting from almost scratch every time can make it hard to have a standard toolkit of AI, the reuse incentive was low.
I suspect machine learning (and other, older ai techniques) might work for games - but one would probably have to train them for the right goal: fun.
I suppose for some players and some games, it makes sense to train for "good" - but even with chess - is it really fun to play an ai you cannot realistically beat - ever?
I think the runaway smash success of Call of Duty changed the direction of FPS games considerably. The focus on advancing AI was replaced with spectacle.
Interesting game AI still doesn't look good. The "cinematic" approach is to replace all systematic stuff (with potentially stiff/unsolved in-between animations) with motion-captured, "realistic" looking sequences.
The same stuff that made critics laugh at enemies not seeing you when standing on a 0.5 square meter shadow in the middle of a well-lit room because you're technically "hidden in darkness" is what is now "solved" by removing the mechanics altogether in favor of safe and cool looking scripted sequences.
Yea, not to defend that type of gameplay, but this is basically the point. Uncharted and Tomb Raider and the like are out to make interactive movies. Its a great way to avoid the sort of awkward sequences you get in many games where an enemy winds up in a corner spinning around at the end of the map by accident and you can't proceed until you find him. The cinematic approach is exciting in the moment, if maybe a little boring when replayed or if you enjoy any sort of real difficulty.
There's about 3 sections like this in TR (2013). In the rest of the game, any hazards seen on screen are mostly dangerous. I always thought that the extra 'hazard' visuals and noisy audio were there to disorientate the player (along with a bit of shaky-cam) in the hope they'd mis-step the climbing/running/jumping, and thus increase the difficulty.
For skilled gamers (which I am most definitely not) I can see how this 'cheat' is annoying, but for me, who isn't the best at precision movement in 3D games, I found it helped me immensely during these types of sections to simply turn off the sound.
I'll be the devil's advocate: Maybe it's because players don't want more advanced AI? It's (IMO) gotten to the point where AI is good enough. There's certainly room for improvement but by and large it's serviceable to the point that at least in a mass-market FPS it doesn't actually need to be any better.
We might wish that the folks at EA or Activision make shiny cool AI (and I'm sure many of them there want to!) but in reality that doesn't really do a whole lot to benefit their paying customers.
Besides - "AI" in games is really about how to create stage pieces that simulate more complex behavior. Like all software development, it's mostly smoke and mirrors, and it's all about how smart you can set that up to give the user the impression of something magical.
What people really want is "artificial stupidity" (and FEAR is a good example). If the enemy had true AI you'd just die, and in fact most unconstrained AI bots are pretty lethal (and boring). What makes for a good game is entertaining and plausible behavior that nevertheless lets you win against ridiculous odds, etc.
E.g. an enemy coming out of cover at a different position than when they last popped out is cool, but working out that coming out of cover is just a bad idea and waiting in ambush would be more realistic and smarter, but lead to stalemates.
Heck, you hardly ever see even vaguely decent morale implementations ("hey you just effortlessly killed 80% of my unit, so I'll, um, charge you!!!").
Again, in EverQuest some enemies would run away and get help. In World of Warcraft they just mindlessly attack until dead. EverQuest's AIs (lame as they were) were simply too deadly for a truly mainstream MMO.
About retreating behaviour, this was slightly the case with Mount&Blade Warband, where units would now and then flee when their moral was low, which could happen due several factors.
Still I am unsure if historically anyone would be willing to charge alone against 100s of heavy cavalry units for a guy that pays ok.
Depending on the era, typically it was a full retreat and slaughter as soon as the shield wall broke. Not all the time, but that was just typically how it went.
Charging cavalry would be stupid. Soldiers knew no horse would challenge a bristling shield wall.
The parent didn't miss a thing. WoW does all of those things, and plenty more.
For a very incomplete example, you have sentry style mobs which run to activate an alarm and "bring help". You have mobs which run in fear and aggro any additional ones they path too near to.
Not all monsters in EQ fled - undead, for example, fought to the death. In EQ 'train' behavior was common when a fleeing monster or a pathing bug caused everything in the dungeon to chase after a player. That player would then run for a zone line to escape behind the safety of a loading screen.
In general most developers have noted that players hated this type of gameplay because it meant that one idiot could ruin an evening for 40+ other players in the dungeon because the 'train' would then clobber all the other players on the way back to their individual spawn points.
WoW also generally doesn't have zone lines that you can escape out of. The fleeing mechanic isn't something that's all that challenging to advanced players who know how to stun and slow. It actually makes encounters easier because the monsters stop doing damage at 20% health or whatever. Contemporary games have other ways of adding challenge.
You're right, I forgot. But it's much less organic and dangerous in general. In EQ for example enemy healers would help allies without actually joining the fight.
It currently depends on the player or game source:
- Deathwing, a multiplayer cooperative game based in the WH40K universe have an AI problem, which makes the game utterly boring as enemies will do exactly the same each time.
- AI bots have the additional value to fill less played games, expanding their lifetime value.
- Finally, I can't dedicate 100+ hours to become good in a multiplayer game, so I'll rather smooth the experience combining human players and AI bots.
For a AAA multiplayer-focused shooter, the incentives aren't there, because multiplayer. Single-player campaigns in that game are merely pretty tutorials for the "main event", as it were, so if they're going to invest money, its not going to be in AI. Single-player games are a different story though, I'd love to see less predictable AI in games like Mass Effect.
To me, AI is more than just the behavior of the agent NPCs. Its also about the overall world environment and how the world and gameplay mechanics work. There is a lot of untapped potential in simulating world behavior. For example, the "director" in Left for Dead games increased or decreased the difficulty depending on how the players navigate and play through the map.
I guess you missed out on the original Deus Ex. It's still one of the deepest story-driven games ever made, let alone first person shooters. Every situation in that game had multiple, radically different approaches. The story had some significant branches based on your decisions, too.
The AI was a joke, though, but that now seems to add to the charm. It goes really well with the campy voice acting and over-the-top characters.
It's a game I'll keep recommending over and over again. The sheer amount of player choice, customization, and environmental openness and interactivity is tough to beat, even today.
Go back and read the GP. That comment was about FPSes not having "deep single player gameplay". Deus Ex most definitely had deep single player gameplay. Its AI was easy to game in hilarious ways (i.e. a joke) but that didn't take away from the gameplay depth. On Realistic difficulty level JC often died in one headshot so you still had to be careful not to draw too much attention.
Did you ever play CoD (the original) singleplayer campaign? It was magnificent for its time, gritty like Saving Private Ryan, epic scores composed by Michael Giaccino, and full of historic flavor (ex: WW2 quotes upon death). You didn't play the CoD campaign and simply forget about Pegasus Bridge, or everyone getting mowed down in Stalingrad.
Once CoD:UO (and 2, and so on) came out, they began killing off the great historical single player experience they had.
Yeah, maybe S.T.A.L.K.E.R. as well. I don't really think Fallout counts, but it could if you really stretch what you consider an FPS.
No idea why I'm getting downvoted. There are literally only a handful of first person shooters that are story-driven given the great majority that aren't: Quake, Doom, Duke Nukem, Sin, Wolfenstein, etc.
Saying that you miss the "old days" when first person shooters had stories makes no sense other than stirring some misguided Southpark-esque "'member when..." nostalgia.
It sounds like you simply don't consider non-shallow games to be FPSes.
I mean, if "FPS" means "a first-person game where you often shoot things", then Deus Ex, Bioshock, Half-Life, Thief, Fallout 3/4, Skyrim, etc., can all qualify. Hell, throw in Dungeon Master, and maybe even Portal and Minecraft. Of course one can argue where to draw the line based on how much "shooting" takes place.
But people often say "FPS" to mean specifically "games like Quake and whatnot". Under that definition, shallow gameplay is part of what makes a game an FPS.
> But people often say "FPS" to mean specifically "games like Quake and whatnot". Under that definition, shallow gameplay is part of what makes a game an FPS.
That seems to be unfair to Quake - there's a fair amount of depth and strategy involved, mostly with the hogging of powerups. I thought Quake 3 was just a game about two guys bumblebee dancing while trying to shoot the other, until my mind was expanded by a top Quake 3 player explaining his thought processes in the below video - the vast bulk of the talk is about map control, not reflexes.
In context, I just meant shallow in the sense of not having the things that the person I was replying to suggested FPSes lack - compelling stories, etc.
Well game genres are rarely defined by the strict definition of their name. Role-playing games rarely have you actually play a role, they're defined as levels and stats and items you can pick up from loot crates. You can play an arcade game on a home console or PC, no quarters required. I play card games on my phone without actually owning a deck of cards.
An FPS has to be a shooter that's in first-person view, but does that make every game where you shoot something with a first-person camera view an FPS? What if the game has other elements? Which definition wins out? Is Fallout more RPG, or is it more FPS? Or is it a turn-based strategy game? Most people would say it's an RPG that happens to have guns and is played in first-person mode and part of the game mechanics is reminiscent of turn-based games.
When you say "FPS", it's a pretty strict definition, because if it's an RPG that happens to be played in first-person with a gun, it's going to be called an RPG first. Maybe RPG-FPS. But FPS really means "run around with a gun and your main interaction with the world is shooting it". There is an entire world of games that do exactly that, and we call them FPS games. Borderlands is an FPS with hints of MMO, dungeon crawler, and RPG, but since the main interaction with the world is running around with a gun and shooting things, it's an FPS. I don't think that's a bad thing.
Sure. Isn't that what I just said? That people tend to use "FPS" to mean a genre rather than just a description of mechanics.
(The point being, it doesn't mean much to say that few FPSes have deep stories, because if a game has a deep story then people tend not to consider it an FPS.)
> But people often say "FPS" to mean specifically "games like Quake and whatnot". Under that definition, shallow gameplay is part of what makes a game an FPS.
You can still have deep games that are Quake-like, Half-Life being the canonical example. Deus Ex can be played, like Fallout, in third-person so I'd say it's disqualified.
Why is HN turning into reddit with random downvotes and no discussion? Must be the weird gaming crowd.
> You can still have deep games that are Quake-like, Half-Life being the canonical example.
Again, you're talking about the definition, not the thing. Half-life is very Quake-like in its mechanics (camera and controls), and not very Quake-like in its gameplay (exploration, puzzles, etc).
As such, saying something like "FPSes aren't deep" is more about terms than games. Whether you agree with it depends on whether you take "FPS" to mean Quake-like mechanics or Quake-like gameplay.
(Incidentally Deus Ex is first person. The newest ones have a hide-behind-cover feature that temporarily shows you in 3rd-person.)
I don't mean in terms of story and plot, but in terms of actual game mechanics.
Look at the old Rainbow Six games against the new ones, same for Ghost Recon. Hidden and Dangerous was a great game too.
Those games are actually hard, and have gameplay that isn't just "watch explosions, shoot some enemies, get shot, sit behind wall to recover HP".
Just look at Rainbow Six 3 against Rainbow Six: Vegas 2, the second one was about as linear as you could make a game, the first one gave you a lot of options in how you would achieve a mission.
BL2 was fun and I sunk 100+ hours into it and enjoyed it a lot, the writing was good other than Tiny Tina who was just annoying. There was nothing complex it about it though, the weapon tiers were well defined and the gameplay boiled down to "farm for better guns" after awhile.
No one plays CoD for the single player. Spectacle isn't the focus, multiplayer is.
The whole genre of linear single player FPSes is sort of dead. Lots of mixed genre games that tie in RPG elements with big open worlds and character customization though that are doing quite well and could benefit from better AI.
Even with a friend though we can't reliably beat the top level AI in Ghost Recon Wildlands so it can't be that bad.
I personally like the interactive movie feeling, the scripted events and the scenes. I did never enjoy CoD in multiplayer which I find too hectic. The battlefield series with a more slow-paced and strategic gameplay suited me better in multiplayer. However I generally don't enjoy competing in MP that much anymore - too little time and interest to train enough to be competitive with the younger players.
I play CoD mostly for single player, but not really by choice. The multiplayer population on PC dies so quickly there's not much point to it. I'm also pretty terrible at it.
Linear single player FPS is definitely not dead, although multiplayer is the current focus. As a quick example, DOOM (2016) has both linear single player and multiplayer sides, but the single player side was much better received.
I, like others here, also play these games exclusively in single player mode.
I suspect that there's an element of self-selection going on here; there are lots of people who play the single player, but an onliner can't see them because when that onliner goes online it's 100% people who go online that one sees there.
There could be ten times that many playing it for the single player and they'd remain completely invisible.
I play all FPSes, CoD including, exclusively for single-player. In fact, if they were MP-only (or had weak SP) I wouldn't buy them at all. What attracts me to CoD is definitely the spectacle; the feeling of being in a Hollywood war movie.
I love FPS but hate multiplayer. Firstly, my ping sucks so I get killed very easily. Second, I dont play that much so get killed by the kids who are playing all day. Hence I rarely play multiplayer if I can avoid it.
Another reason could be the push to competitive gameplay. Plenty of people would buy similar titles and never touch the campaign, making spending a lot of time on AI not worth the time.
To be honest, I'm a little bitter how many sad console ports are released on PC. Many games would be very good if they even pretended to adapt themselves to mouse/keyboard input, but the body shop responsible for the PC ports apparently don't care.
AI in games is misunderstood as sophistication of reasoning. What makes AI in a game subjectively good is that it demonstrates a reasonable intent that the player can observe and anticipate. If you can see what the AI is going to do and thwart it, the AI is good. If it surprises you once and a while it is great. Surprise implies that you recognize what the AI is doing most of the time and sometimes it does something else that also makes sense.
AI is often at its best when it does something stupid that is understandable. For example, in Halo when you kill a bunch of the big guys, sometimes the little guys drop their guns and run away. This makes them very vulnerable, but it is fun. A smarter AI (one that would win more) would only pop out when you aren't facing them, or if cornered just shoot back very accurately from two points. But getting hit from behind isn't much fun, and getting shot at head on from two directions is also not much fun.
Good AI is usually a mix of good game design (and art) as well as good engineering.
Every AI has to "cheat" or it would utterly destroy you.
For example, AI can micro manage way better than you can, it can do a billion APMs. It has complete situational awareness at all times and never gets distracted by real-life. In an RTS where scouting is key, it could fan out with as many drones as it can produce and gather way more information than a human player could.
You need to constrain your AI so that it's not impossible to defeat. For example, limit how many actions it can perform in a given situation, or make it stubbornly cling to some losing strategy for a while even when it could easily flip to the most optimal one in an instant.
It's not hard to make a bot do worse, however in many games there are no bots that play well without cheating.
Watch some StarCraft/StarCraft2 bots, it seems like an easy challenge, but they can't beat a good human player when they have to deal with the fog of war.
PS: Multi drone scouting tanks your economy and becomes a really bad idea. You want to send out one scout that can both gather useful information, not die, and not significantly hurt your economy. To the point where some very high level players don't always scout early.
An unshackled bot will eventually destroy even the best human players once they can lock in the right approach. It's only a matter of discovery.
Tic-tac-toe, checkers, chess, even Go have all fallen to computers.
As for scouting, the ability of an AI to endlessly harass and endure minimal damage because of precise unit movement becomes a problem. A human can't finesse that as well and still have attention left over for other, more urgent priorities.
It's probably the case that at a strategic level the AIs generally suck, but on a highly situational level they have an advantage that needs to be kept in check.
And when that happens we can nerf the bot. But, RTS like StarCraft are really difficult and with constant re balancing the optimal strategy keeps changing.
Remember, at the meta level you need to have just enough army to survive an all in, while maximizing resource collection and research. Further, if you don't use a range of strategy's people will just pick the counter to your game style. Do you build static defense vs harassment? What do you do for vision? And everything has a cost in time or resources.
Further, things like army composition, baiting, high ground, choke points etc. make combat very tactical which bots have issues with.
When they released an API for Brood War, an AI competition popped up shortly thereafter, and I expect that there will be one announced shortly for SC2.
This is a function of shitty AI, not infinite APMs.
Honestly, the AI in most games is downright terrible to start with, but for those where it's actually competent, you need to nerf it a bit or it becomes overwhelming.
AI never plays the way a player would play. It doesn't see your units, hear your movements or aim a gun. It knows the position of everything on the board at all times and then you simulate the kind of knowledge a player would have. It is all artificial. Every time an AI shoots and misses, that is a simulated mistake.
I'm curious why you say they'd have full awareness. An AI, treated as an agent, could have perfect memory, but you can always restrict it's view in a way that is similar to what a player is restricted to. In an overhead strategy game, the AI could be restricted to a viewport where they only have perfect knowledge of that viewport, everything else is based on the agent's model of the game state (just like a player relies on). In an FPS, same thing. The AI agents can be made to only see/hear things within certain directions and FOVs, relying on memory for everything else.
They can be given the same kind of information in a way that mimics a player's knowledge and perceptions without having to cheat by making them "forget" their perfect knowledge of the world state or act deliberately stupidly while having that perfect knowledge (of course, you still may need to make them stupid sometimes for the sake of fun).
I think the point is that the AI is part of the game and the game had perfect knowledge about the player.
If you're trying to make a bot that plays the game with only the information the player has then that's cool and interesting. But if you are designing an AI as part of the game then you're making them not consider their perfect knowledge by adding restrictions.
If you're playing a poker game then of course the AI knows what's in your hand. Telling it to purposefully play subotimally and telling it to not consider the player's hand to me is equally artifical although one might lead to more enjoyment.
The game knows, but the game is not the AI. It's an adjudicator, making sure that everything happens according to the rules. The AI is a component of the game (viewed as a whole) in the same way the player is.
A poker bot that knows what's in your hand is not playing poker. Not seeing other players hands is inherently part of playing the game. Further, an AI should be capable of using the same interface people do otherwise it's not a game X bot it's a cheating game X bot.
In Half Life, when they yell "cover me", one tries to flush you out and another cuts you off. What's really interesting is what all the other soldiers do: they run to random positions. Early builds didn't do that and the AI was just plain mean. Game AI is a constant balancing act between being good/engaging and not killing the player.
Civ is the same: the AI has routines that try to win, but also a whole bunch that role play.
I'm old enough to remember the reviews of HL2 which marveled at the same kind of AI. I distinctly remember my experience first playing, when enemy AI ducked behind a crate, and radioed for help. At the time this was amazing, as most enemy AI in other games would blindly run into your stream of virtual bullets - let alone radio for backup.
And I'm old enough to remember the marines from the first Half-Life, who seemingly had an AI that allowed them to flank you, throw grenades at you, and scatter when you threw grenades at them. Of course, most of it was likely very simple behaviors, but it seemed amazing at the time!
You could be forgiven for making that mistake. The Combine soldiers in HL2 functioned in much the same way, even better in some cases. I've played through both games a number of times and the firefights play out differently each time.
> What sets F.E.A.R. apart is the fact that [...] A* is used to plan actions as well as paths. [...] If the Player slams a door on a pursing enemy, the soldier can dynamically re-plan and decide to fire through the window, or flank through an alternate entrance.
Interesting idea. Clever use of a classic algorithm in a novel way.
The idea of reusing A* was amazing, but what it really means is that all the actions are implemented as C++ classes. This is just a consequence (of reuse A*); but in fact it's a breakthrough in terms of planning runtime. On current average machines, GOAP in F.E.A.R. builds plans in far less than 1 milli-second.
Whereas academic planners at the time were struggling with PDDL (a symbolic declarative language for describing planning domains -- i.e. problems and actions which can appear in plans), GOAP rewrites all the actions in C++. Then, no problem for procedural preconditions and postconditions, for instance: just call C++ code to check what you have to.
What I'm wondering is, how does it work out certain situations? For example: The ultimate goal of an enemy AI is to shoot at the player. To do this, it must have a line of sight to the player. Figuring out where to stand seems to me equivalent to solving a perspective projection using the level geometry as constraints. Does it actually try to do this, or does it just not bother moving into line of sight and just moves towards the player's position?
A* was pretty new back then. Previous iteration of games just 2-3 years older used older algos, or invented new path finding algos due CPU constraints.
I was speaking about RTS and in the sense of Age of Empires 1 and Empire Earth. The main dev of both this titles Rick Goodwell mentioned A* was used in Empire Earth the first time, older AoE1 used an older less CPU intensive algo.
@omginternets:
> dates back ... extension of ... adds a few heuristics.
Blabla, BS.
Fact is Empire Earth was one of the very first computer games to use A* algo. Age of Empires 1 used a worse faster different algo.
Fact is in the age before Wikipedia and Google, decade old papers of obscure algos were more or less lost and forgotten. They were written on paper with no digital copy readly available. So game devs often reinvented things without not knowing of previous work, it took several years until the early 2000s that this old stuff got scanned and made public viewable.
> The main dev of both this titles Rick Goodwell mentioned A* was used in Empire Earth the first time, older AoE1 used an older less CPU intensive algo.
Non-FPS excellent AI:
DF has already been mentioned, but an excellent DOS-based game that I used to play on my 386 was Commanche Maximum OverKill. (helicopter combat sim)
The game proudly stated this in the manual: (bad quote from memory)
"...with a smart AI that changes it's behaviour every 3 minutes..."
This stuck with me because it actually worked. If you repeated an action long enough, the AI changed how it tried to kill you.
Scenario: You are in your helicopter trying to blow up tanks and helicopters, and "Mission Targets". The lower you fly, the longer you evade radar, and the closer you can get to your target.
So you hide behind some hills, pop-up acquire a target on a fuel tank, fire your missile, and then duck down before the enemy missiles can get to you. You then repeat this process to get all of the targets, but if you take too long the tanks/helicopters will fly around the hill trying to find you (as opposed to sitting next to the targets dumbly forgetting you exist).
The game learned from your pattern, and adapted. IMHO this was superior to every other game that just had the enemy shoot faster (i.e. Unreal Tournament)
If you have F.E.A.R. on Steam, the SDK is still available and contains most of the AI code, be careful of licensing issues but it's interesting to study.
Patch the game to 1.08 first.
Then install the F.E.A.R. SDK.
Then find a copy of Visual Studio 2003.
Now, you can even recompile the whole game in Release, Final and Debug mode.
-- JustForFun.
The effects for the dis-integrator pistols on the spaceship were so simple yet so classic. It's one of the early games where you got to do lots of different fun things, like scuba diving with a spear gun, driving a snow mobile, etc rather than smashing crates in a bunker.
In his presentation, he observed that the AI reminded players of the first Half Life game, which came out seven years earlier. “It seems that we haven’t made much progress in seven years. There has to be more we can do with game AI.”
That's what came to mind reading this. I remember the AI and Half-Life, and while it sounds like they did better in this game (which I haven't played), it also sounds like an iterative step, and after seven years, that's not a lot. I happen to own this game on Steam from some humble Bundle pack or something, so I think I might have to break it out and have a play...
Edit: Sheesh. 17GB install for a 2006 game. That's steep.
There was a article years ago about the Deus Ex team trying to find tune their AI. They found that a dumber AI actually worked better for player enjoyment. Players would frequently think the AI cheated when they got flanked and hasn't seen the enemy move to their flank. The human players just ended up doing low fun strategies like using hall ways or other bottle necks to wait for the AI to attack. Will try to find the article later.
Oh really? This is exactly what Mass Effect 3 did with the cover buster mechanic, throwing in some randomness. Combated the bottlenecks by map design and giving AI grenades, gave cover buster and charging enemies distinctive appearance. Made for good gameplay.
This is because the Steam game actually includes the base game and both expansions (even though they are shown as separate items in Library, Steam downloads the files for them).
Playing against a bot programmed to fight intelligently and efficiently just wouldn't be fun for long. A friend and I tried playing against the Reaper bot in Quake years ago. It mopped the floor with us. Which in terms of my skill probably doesn't mean much but my friend was really good at Quake. The bot didn't let up, didn't pause, memorized weapon locations, move at a constant run, and never missed. It would even jump, 180, and beam you with a rocket. That made for fun novelty one evening but no one wants that for multiple levels.
There's a difference between a bot that's been programmed to act intelligently and a bot with superhuman abilities and reflexes. You can have the first part without the second.
I bet that a game AI model of a human mind's executive function would actually be embarrassingly simple. Something like a 7 element ring buffer of tasks and their parameters, with interrupts. When the bot tries to remember or do more than 7 things, it just starts forgetting stuff, which it might notice again later. Just like me.
League of Legends is a really good example of this. They've done a pretty good job of gimping their bots considering that simple player-made bots can be competitive at the highest levels of ranked play.
Many of the useful abilities in League of Legends are 'skill shots' - manually aimed, with travel time and wind-up animation, and are thus missable or dodgeable
With superhuman reflexes, a bot can be nearly immune to skillshots in a 1-on-1 scenario. A bot can also always hit skillshots, up to its accuracy of prediction of your movement, and your reflexes in dodging.
In theory, a team of humans might demonstrate better teamwork, communication, and adaptation than a team of 5 AI. However, given how much of the game depends on mechanical 1v1 conflicts, I'd expect a simple bot to beat even the most expert human players.
F.E.A.R.s bots are by no means intelligent - they're really dumb and predictable, at least once you've played through a couple times - you know that they're going to seek another angle when they get blocked, and there's only a couple options for them to do that -
but it's fun when you're playing enemies who are seeking another angle, even a simple one. Compared to the other games on the market. F.E.A.R. remains the best FPS I've played.
Side note: I regularly played against the Frogbot's author (who used the handle Frog) at LANs. He was reknowned for being the most analytical and "bot-like" player of our scene.
no, he wasnt:( he was just better than you. Reaper on default skill 1 was an ok challenge for average players. Skill 3 was a competitive against good players, but still nothing special against deathmatch veteran spending days in gaming cafes or internet servers.
For reference best Quake bot, Omicron(dev went to work for ID software and wrote Quake3 AI etc) on highest skill level vs actually good dm player https://www.youtube.com/watch?v=hEeDXPkEnME
I played through HL2 again recently and it was fun but I found it to be over designed. HL2 (and Portal!) try way too hard to make the player feel clever. You'll find some nook or cranny or hidden path that always turns out to be only way to go.
I used to rag on the guns in the game too; they are not fun to use, but looking back I think that was a deliberate strategy to encourage the player to use the gravity gun more.
HL1 certainly had a much more organic feel to it. Like the abstract bases and hell of DOOM vs the uncanny valley cities of Duke Nukem 3D, the missile base of the original HL, which has no basis in reality in terms of its design, feels more authentic and believable than City 17.
Most of the battles in HL2 are either forgettable or boring (SHOOT A ROCKET AT THE THING!), but I must say I really enjoyed the one near the end of the game where you fight against soldiers on multiple levels as you climb your way up some kind of warehouse: https://youtu.be/91uWeqArrok?t=3h38m19s
As someone developing for VR I'm not sure I'd want to go on a weekend long "I'm gonna play through all of HL3" binge.
Even simple VR games can make you feel like you're moving when you're standing still or back you into a corner with enemies. HL3 might screw you up a little. HL2 did a very good job of matching the scene to the plot and that made for a more immersive experience. Add in VR and modern graphics and that's a level of realize that would probably be too much for a few people.
I think it is important to keep in mind that AI in games often not only needs to do the smartest thing but actually the smartest thing a human would do.
So in the case of F.E.A.R. the AI is simulating humans so they shouldn't seem smarter than that.
This starts at not microing to well in strategy games and not aiming to well in shooters but is almost limitless in how complicated one can make it.
What a weird coincidence, I just reinstalled and played a bit last night and was thinking about how incredible the enemy AI was for a what, 6 year old game? Older?
I remember play-testing this game, and feeling almost certain that they "dumbed-down" the AI between builds as it was too hard for us to beat.
Also had a few scary moments - such as that time our build crashed every few seconds, on a Friday!
I seem to remember that Titanfall's mooks had really great AI. Largely wasted because the players could easily murder entire squads without reloading, but they would attempt to move in waves, shout orders, flank etc.
I found FEAR's AI not as impressive as people made out (and still do).
I felt like the tactics used by every enemy in the game basically involved flanking the player from two sides, and never approaching directly unless there were no other ways around (which was rare, as the levels were basically one combat arena connected to another in linear fashion).
It was pretty easy to exploit this by basically charging the enemy and aiming for the head as if you were playing an old-school strafe shooter, which didn't give them enough time to formulate their flanking plan.
I found by doing this the game became trivially easy, even without using the bullet-time thing.
I play on hard or harder if possible, and yet F.E.A.R. still wasn't that challenging.
I found the enemies to be less dumb than your usual cannon fodder, but you'd mulch through them pretty fast if that was your goal. They did try a lot harder than those in other games, which was nice, but they weren't that much of an obstacle. Their patterns are somewhat predictable, so you can often anticipate where they're going to go, or what they're going to do.
The problem with the F.E.A.R. AI is they don't necessarily adapt to the player like real people will. You can do the same thing a hundred times and they'll fall for the same trick.
Getting ambushed? Well, poke out, draw their attention, and fall back to a more advantageous position. Human players would just wait it out, they know you have to go through there, but the AI, ironically, gets impatient. Their goal is to kill you, not to defend things.
I'd like an AI that gets wise to my tricks, that starts to react differently. If you're using grenades frequently they might field more heavily armored troops. If you're sniping they might snipe back. That'd force you to adapt, to switch it up, to avoid becoming predictable.
The problem is that requires a pretty robust AI to manage troops and a deeper objective than "kill player".
I think AI, in this case, is overkill. Create ~10 common enemy class and spawn them based on your strategy history, equipment and game pace. Each and every enemy would act differently like if you were more on sniping side, you would get snipers and fast units spawned. With mediocre AI this would make the game appear as having very good AI to regular player.
A large part of the predictability is how the units come in at pre-defined locations and/or based on pre-defined triggers. There's very little randomness in this department.
If that was more unpredictable, if each death switched things up slightly, you'd have a far harder time gaming the system.
Like you observe, that might also make the AI appear smarter since the flaws are less obvious.
Bummer dude. I'm having that problem in Fallout 4 lately. It just... isn't.. hard... :/ I try multiplayer games to get that fix but they're all so arbitrary. BF4 I get rammed by a jet halfway through my 20 minute run to a point. CSGO I get blown to pieces by fifteen Russian hackers on a 5v5 server. Overwatch has been pretty good about scratching the itch, though.
I've always loved BF games but with BF1 I've just kind of lost interest after about 12 hours of total play time. Not sure why but I just can't get motivated to actually play it.
It was one of the few online games I played these days, I've been sticking mostly to single-player RPG's and grand strategies.
Clearly I should have clarified that I played the game on the hardest difficulty, as I typically do with shooters. I didn't think to mention it because everyone I know that plays FPS games does that too.
Not only advanced A.I. is basically dead knowledge in modern games, also Bots.
Quake 3 Arena, Unreal Tournament and many more games had offline bots with whom you could play multiplayer maps. Most relied on predefined paths added with the map editor, but some of them worked without paths as well.
It was impressive how good Unreal Tournament 2004 bots handled cars and vast open maps.
Also RTS games category is dead, it usually also featured advanced A.I. to play against bots on random generated maps. Sadly, games like Age of Empires, Empire Earth, Command & Conquer are dead. (before an off topic comment derails the conversation: I know about the 8 year old SC2, I know about other kind of strategy games but they are not RTS, I know about Moba and tower defence but they are not RTS)
You need to give 0ad a try:
https://play0ad.com
It's very much alive and well, and the AI gets better with every release.
I'll be able to beat it on the hardest difficulty, and then the next release comes out and I have to come up with new strategies...
0AD was great two years ago, still in alpha though. I try it once a year but the progress is very slow, and things are more broken (AI) than two years ago (tried it in Dec 16). Don't get me wrong you can play many map styles, and get hours of gameplay out of it. It's an open source project, so one shouldn't compare it with other triple-A games, for a open source game it's superb and very much comparable to Age of Mythology . The project needs more supporters. Though 0AD is my biggest hope, maybe a sister project forms that use the same graphics engine and code base to develop a C&C Generals inspired game as well. In the era when Triple-A studios forgot about RTS, it's time to solve the problem of no new games through the community.
I miss Empire Earth... spent hours and hours on that game as a kid. Super advanced map editor, tons of variety in gameplay, even the single player scenarios were great. Thanks for reminding me of it.
It seem to me now that both Quake 3 Arena engine and of course the best RTS that our civilization have been able to make and really balance with some kind of magical equilibrium between 3 truly different races are well and alive in research labs and currently both styles of games with comebacks in the pipeline the champions nonsense in the FPS side of things and the new broodwar from blizzard.
One can argue that Chess or Go are friking old games and that we need to make Chess 4000 and or invent a new go, same apply to the good old broodwar from 98.
Do you know about the newer good RTS games like Eugen Systems' games (Wargame series), new Homeworld game, Grey Goo and perhaps a few other excellent additions to RTS genre after Starcraft?
I had great hopes in Act of Aggression which tried to be a C&C Generals clone. Sadly even after the second redux release it not a good game. And sadly beside all gameplay deficites the graphic engine looks as often worse than the 2004 original, and buildings cannot be freely built, and only in 90 degree steps and aligned like a chess board. A big let down. The other clone either Star Craft 2 (I dislike SC2, liked SC1 back then, but nowadays prefer realastic historic or modern era gameplay not SciFi/fantasy/etc) or are non-traditional-RTS-style gameplay.
Wrong. After Age of Empires 3 (2006) there was no new Age of Empire worth to mention.
(Age of Empire online was a Free2Play/whatever game based on the years older Age of Mythology engine. Microsoft closed the Ensemble Studios. Lately Microsoft asked a small unknown studio to recompile old Age of Empires 2 and Age of Mythology and add some community patches and rerelease those 15+ year old games as HD (not really any graphical changes, beside minor stuff, ad bigger resolution), and some new missions/campaigns. But we know the game and it runs still fine with community patches on Win7. And replaced the network lib with Steam, but it's a buggy mess - the original game run more stable. What the AoE community wants are real new games, not old games one played already for 15 years and hundreds of hours know very little secrete.)
Wrong about what? (Actually the year 2014 was wrong). But releasing a HD version with 3 expansions (they are named expansions on the wiki) in 2013, 2015 and as late as Dec 2016 (less than 6 months ago) definitely sounds to me like a game which is not dead.
Might be buggy but recent releases + active community isn't really dead at all.
Half Life 1, Far Cry 1, Fear 1 had really great A.I. Where HL1 and F1 were corridor shooter, where A.I. is easier, Far Cry 1 had A.I. in open world scenario where soldiers flamked you around a hill and such. The A.I. was written mainly in Lua game script. Sadly the implementation prevented save games.
That's about it. Sadly most game dev studios don't invest resources in good A.I. The stupid mass of soldiers you know from Call of Duty franchise is now everywhere.
Half-life 1 have incredible AI from boids that present a flock behavior to coackroaches that are scared of the light or the player, just to mention two attention to detail examples.
I want a game where you're in a city and there are many legals jobs that AI and players can do, but also there will be illegal ones that they can pick up and players have to be able to spot suspicious activity (ie, not walking like an AI or changing uniform, etc..) to hunt each other down.
Similar to this; set on a cruise ship with NPCs doing random tasks, you had to work out who your (Player) target was amongst NPCs and assassinate them quietly.
I think one of the Assasins Creed games also had a similar multiplayer.
oh yes that game is pretty much what I thinking of but in a city setting.
I initially thought that if i were to make the game I wouldn't be able to simulate the same paths as a human player so would need to use a waypoint clicking system to move until you're being attacked and your cover is blown.
That is tangentially similar to SpyParty, a game where one players goal is to spot the other player in a room with a bunch of AI. Quite fun and a good example of asymmetrical multiplayer.
So I had set up a test scenario, with an agent that could travel, buy stuff at shops, use axes, cut trees, and so forth. When I ran this test, I had set a goal of procuring timber.
What I expected the agent to do:
1. Go to shop
2. Buy axe
3. Go to forest
4. Cut tree
5. Drop axe
6. Pickup timber.
So I ran my GOAP test, and saw what the agent came up with:
1. Go to forest.
..
When I saw that step 1, I was disappointed, because the agent clearly should not be going to the forest when he has no axe yet.
But then, as a proud parent of my AI, I saw what the agent had actually planned:
1. Go to forest
2. Pick up firewood
3. Go to store
4. Sell firewood
5. Buy axe
6. Go to forest
7. Cut tree
8. Drop axe
9. Pickup timber
Hooray! I simply forget to give my agent money. But GOAP made him smart enough on how to get some money on his own.
I had of course equipped the agent with 'sell' action, and I had placed firewood in the forest, which I promptly had forgotten about when writing a test scenario.
I was so proud of that smart little agent!
Cool stuff, that GOAP!