|

The resources available to modern game developers are unparalleled in their ease-of-use, simplicity, and professional results. Games built in premade engines like Unity and UDK can now visually compete with big-budget AAA titles, and scripting languages and alternative means of building logic (visual scripting) have brought gameplay into the same realm of accessibility. On the surface it appears that, given the right motivation, an aspiring developer could create an entire game without any outside assistance or knowledge of coding. However, there is one ‘sticking point’ left in the game development pipeline that is often overlooked: artificial intelligence. How will you configure the interactivity within your game? Unless your project specifically doesn’t require interactive logic, you’re eventually going to hit a brick wall in your development process. Let this article guide you towards a solution for your artificial intelligence woes, and help you finish a game that you’re proud of.
Learning to Think
So first off: what is artificial intelligence? In short, it’s when an “intelligent agent” receives information from its environment, makes a decision, and acts its decision back out on the environment. A great place to start learning about AI is through the free project www.ai-class.com, which is a series of videos, quizzes, and lectures that can take you from baseline to a pretty complete understanding of the concepts of artificial intelligence. After just a short time exploring the online classes, you’ll begin to realize that your traditional understanding of AI is probably a bit narrow. Rather than AI being just the brain of an NPC, it’s really an integral part of your entire game’s logic and probably the most important part of making your game something that can be interacted with. This might leave aspiring developers a bit frustrated with their own lack of knowledge and programming ability; even worse, it could be yet another reason for you to say “I don’t feel like making this anymore.” Hopefully we can make the daunting task of approaching artificial intelligence a bit more tangible, and get you motivated to face another tough, but entirely conquerable challenge in the game dev process.
So if you’ve started checking out ai-class.com, you’re beginning to get into the mindset of an AI developer - this isn’t the instantly-gratifying realm of visual arts. Rather, it is a thoughtful process of designing interacting systems. A great idea is to represent your AI’s logic visually or through some sort of easily accessible list system; for example, you might have an entity called Joe the NPC, along with a detailed list of his possible inputs and behaviors, looking something like this:

This type of diagram can help you wrap your mind around what’s going on within your AI system, what kinds of reactions you want to create, and how it all interacts with other events within the game. Clearly, as you build out your knowledge of coding and AI design, this diagram will become more complex; for example, “Player Hits ‘Action’” would be clarified to include that a raycast from the player would be required for “Action” to cue the resultant behavior. Even if your knowledge of programming/building an AI system is still next to nothing, these methods of organization will help you greatly when you either pair up with an AI-minded programmer, or learn the process yourself.
It’s Alive! It’s Alive!!
The part of learning AI that is undoubtedly the trickiest for aspiring game developers is actually implementing the code to control your NPCs, game feedback systems, etc. For years, this part of the process has been a straightforward case of programming and, for those unfamiliar with coding, difficult. Now, thanks to the advancements in game development technology, there are more options...but unfortunately implementation of your AI is still a tough process. A common question is: Why hasn’t this part of development been made as intuitive as other aspects of the pipeline? Many people have offered their input on what Chris Hecker described as “the Photoshop of AI”; or an easily accessible solution for non-programmers to work with artificial intelligence. An important talk by Professor Michael Mateas about this concept is available exclusively here (http://www.design3.com/industry-insight/item/2404-michael-mateas-presentation-revisiting-the-Photoshop-of-ai-debate), in which he spells out the problems with the idea of a “Photoshop of AI” and why artificial intelligence may never have an easy-to-use option. The gist of his argument is that because the options for AI interactions are nearly endless, a tool that took most of the work out for you cannot exist. For example, if our diagram above were instead for a sports game, the inputs and behaviors would be 100% different; the lack of consistency between games makes designing for all options redundant.
That being said, there are numerous options being developed to act as middleware between you and your engine to reduce the amount of direct coding required. An extensive list of resources can be found at the end of this article, and there may be even more that we overlooked (feel free to add in the comments section). In essence, these pieces of software are not intended to be the end-all “Photoshop of AI” - rather, they do what they can to make your interaction with AI systems more tangible, easy to understand, and intuitive. Commonly this involves removing the need for in-depth coding and replacing it with a modular, visually-driven interface; these systems (like the Xaitment suite shown below) intend to allow more intuitive adjustments to be made by designers without complex engineering to the underlying system. In effect they abstract the programmatic connections to a simplified visual interface. Most of these middleware programs are not free, and require the user to learn and develop additional skills specific to the software, but in doing so can offer a much easier (and faster) way to control your game’s AI processes.

The Pupil Must Become The Teacher
The most extreme difference between AI authoring and all other aspects of game development is that the software will not do extra work for you. You might apply a brush in Photoshop, drag it across the canvas, and achieve an end result that you couldn’t have planned on; similarly, you can tweak physics settings in Unity and discover new interactive dynamics. However, AI design requires that you know more than the software knows - you must have all your ideas in your head and use the code/middleware to achieve it. This fundamental difference explains why you haven’t ever found yourself ‘playing’ with AI tools as you might with Unity, UDK, Source or the variety of software used throughout the pipeline. In short, you must know more than your game in order for your AI interactions to be satisfactory; this might prove to be a difficult hurdle in your game development race, but if you truly dedicate to it, you can master the art of designing artificial intelligence in your games. If your time is spread too thin, don’t feel embarrassed to join up with someone more adept at programming - just make sure you get your intentions and ideas across clearly, and stay true to your original vision. No matter what choice you make, start looking into AI more deeply today to begin reaping the benefits it can offer to your game development projects.
design3 AI Resources
Unity:
1) https://www.design3.com/training-center/engines-sdks/unity/coding/basic-artificial-intelligence-part-1
2) https://www.design3.com/training-center/engines-sdks/unity/coding/basic-artificial-intelligence-part-2
Additional Resources:
1) https://www.ai-class.com
2) http://aigamedev.com
3) http://www.gameai.com
4) http://software.intel.com/en-us/articles/designing-artificial-intelligence-for-games-part-1/
AI Middleware:
1) http://www.xaitment.com/english/products/xaitcontrol/features.html
2) http://rivaltheory.com/
3) http://www.plus7systems.com/index.html
4) http://en.wikipedia.org/wiki/List_of_game_AI_middleware
Pat Flannery is currently a Production Assistant at design3 and has been busy shooting and editing lots of interviews with game developers and industry professionals. Find him on design3.com as “pflannery” or follow him on Twitter, @design3video. Original Artwork by Bill Kiley.
|
Is anyone working on game story as the emergent conflict of motivated AI/AGI NPCs?
http://www.gamasutra.com/view/news/34141/Future_of_Games_Graeme_Devin e_On_Drawin
g_The_Player_Into_A_Story.php#comment98653
http://www.gamasutra.com/blogs/DouglasLynn/20110525/7689/Gestalt_Game _Design.php
#comment104850
The following comment is far shorter:
http://www.gamasutra.com/blogs/LewisPulsipher/20120114/9238/Six_words _about_stor
ies_in_games.php#comment135161
Of course, I fully expect some better resourced team will start, later, towards a similar goal and I won't end up being the person who advances the State of the Art. However, I'm just happy to not be alone in thinking that there is value in this kind of 'unscripted' gaming experience. The key insight is to abandon the pre-determined Plot and seek to convey the Theme with whatever "Stories" are procedurally-generated by the "dramatis personae".
I have nothing against narratology in games. However, I think todays form story game is decided by market forces. Developers are trying to build off the financial success of the motion picture industry.
It seems like classic Pen and Paper RPGs already showed how computation and community could create compelling drama through gameplay. Scalable representations of social world building and atomic level AGI characterization could take RPG dramatic technology much further.
As a former Dungeon Master I recognised the potential for computing to replace that role, so that one or more players could take on a dungeon / quest with the machine automating the dice-rolls and fluctuating stats. At first I thought that it would make these games more immersive by hiding the mathematical model from the players, however without a strong compulsion to "stay in character" (especially, when engaged in a single-player campaign), I noticed that it became all to easy to muck around within the confines of the simulated world and in the long run spoil the atmosphere for yourself. Where a human DM would tell you to "stop being silly" a game would have to be programmed to recognise what could be reasonably defined as patterns of sillyness and discourage / penalise a player for that repeated out of character behaviour. For example:
http://www.edge-online.com/features/games-within-games-hoarding
Clearly, that much cheese should attract vermin - or start to rot before all of the cheese that exists in the game world can be obsessively-compulsively collected. Given that other NPCs appear to have access to these rooms it is surprising that nothing gets stolen - this phenomenon is symptomatic of something deeper, all games seem to be populated by NPCs that have digital objectivity when it would be much more natural if they had analog subjectivity (i.e. each reacting to the same stimuli non-identically within differently defined fuzzy thresholds; e.g. an NPC will change their attire in order to remain "warm" but different genders and races (of different age and infirmity) will feel the temperature uniquely.
Hence, an NPC wife can be trusted with a stockpile of weapons, but may try to sell some looted jewelry if you collect so much that she 'feels' that what she has taken will not be missed - it therefore becomes vital to include her in your good fortune lest she 'feels' neglected and passes a threshold where her entitlement exceeds her loyalty.
Games also tend to be too compartmentalized: actions in one place rarely have an impact elsewhere. Often your changes to a location lack persistence. Both of these have to do with the reliance on slow-to-access, unmodifiable DVDs. Next generation consoles should catch up with PC-style gaming experiences through use of high-capacity HDDs. There is even the opportunity to let a rich simulation run overnight ready for the next day's play session. These architectural issues have a massive impact on simulated AI "life".
When I played Oblivion I wished that actual skill would mean that my avatar could battle foes that he would otherwise be outmatched by on a strict stat-based dice-roll. I wanted proper sword fighting with location specific damage; parry, lean, duck and jumping over a sword swung at your legs. Height, weight and momentum would play a role:
You have a big armoured horse, so that helps you in combat. The horse would need stats of its own so that it didn't spook in combat and throw you off (this could be helped along by some balance mechanic where you would need to rein it in and then make a slow turn to avoid tilting so much that you fell out of the saddle). Again, this is about making the experience/interface more analog rather than primitively Riding/Walking digital. You should be able to turn the body of your avatar in the saddle - allowing them to both counter-balance and strike down on either side at the poor, unarmoured, serfs not on horseback - then use the other thumb stick to influence where the horse is heading, bearing in mind that the horse has a will of its own and can pathfind and pause before precipices without onerous levels of micro-management.
The more games you play the more you come to realise that they are all essentially about their control schemes (what buttons, triggers and sticks do what where in the game world), there is also AI and level design and sometimes story, characterisation, celebrity voice acting and orchestral music - and of course everyone will remark on the graphics so that tends to make itself a priority; even though a good game will transcend its poor presentation.
However, without an expressive analog control interface (with plenty of feedback through animation rather than superimposed stat bars, or numerical confetti) the simulation is starved of nuanced input. For example, an adventure set in the Wild West shouldn't follow the stale orthodoxy of the FPS just because it has guns in it as the ability to talk to strangers should depend upon how hard you squeeze the left trigger forming the cycle: equip -> hip -> sights <- hip <- holster. Lowering the player's weapon automatically on approaching a 'friendly' often occurs in an FPS so that you can be told some expository dialogue, yet often friends turn out to be foes and the game is forced to return your gun to its former aggresive posture so you have the option to shoot. This is bad as it denies player agency. Just think of all the movies where someone is told some information and when they figure out "The Mystery" and how they were previously misinformed they have the option to devise their revenge, or to effect a quickdraw, or punch them. Indeed, one of the key things that games get wrong is that conversations cannot be interrupted and in a generative narrative an NPC may believe he is revealing to you how dumb you have been to not figure out his machinations, but given an Open World you may well have gleaned information from several other sources and pieced together the puzzle all by yourself, permitting you to choose your moment to shoot them early on before "The Big Reveal" and see their surprised reaction. With conventional digital controls you could not have all this 'drama'.
The RPG should be about adopting a customisable role not grinding, with stats gradually increasing both with consistent success, demonstrable skill and kudos points awarded for completing quests in a manner that doesn't conflict with your character's defined role. Perhaps, this role is forced upon you at the outset and you are asked to "Play this part in this Adventure". Alternatively, you might have the psychology of your Open World Alter Ego probed by testing your responses to certain "cooked up" scenarios - this would be far more sophisticated than a Good / Evil narrative bias as its purpose would be to trim the vast set of quests it could potentially offer you in the game proper; no point offering you an evil path once you have established yourself as a goody... with further tests being used to delineate specific patterns of play, e.g: diplomatic/delegatory/stealthy/explosive.
Compound technologies are nice. Dipping a rag in oil and then tying it to the shaft of one of your arrows and firing it alight over a city walls at night into their stables to cause a distraction so you can sneak in to the keep through the sewers as the guards are busy rounding up all the horses should be emergent gameplay and not a pre-scripted "complete the following steps in order" mission.
Each game entity that you may pick up would have a table associated with it of all the other entities it could be combined with. The game would know oil burns fast, it would know a rag could be impregnated with oil (dipping the arrowhead in oil wouldn't be as effective, but you could dip it in poison), it would know that oil couldn't be attached to any object (slips off), but that a rag could be tied to most stuff (depends on its length and the circumference of the entity in question, so a medicated bandage could be tied the leg of your horse to cure it of its temporary lameness) and the whole arrow + rag + oil would have a compound weight that would affect ballistics so you would have to aim it at a steeper angle to get it over the city walls to hit the hay, to frighten the horses in the stable, to summon the guards, including the ones outside the weak spot of the city's defences (the sewers), allowing you to creep in and "do your business" (rescue the monster from the beautiful princess, or whatever...).
A web search for Storybricks will turn up links to a number of blogs that got a look at a very early version of the Storybricks system.
And...
Did you see the latest news about Google releasing AR HUD glasses by the end of 2012? Seems like AR LARPing could be big. It would solve many of the harder complexity problems associated with motivated chatbots.