Forums » General Pantheon Discussion

Bazgrim's 05-MAR-18 VoT Dev Q&A Summary - AI in Pantheon

    • 2886 posts
    March 6, 2018 7:09 PM PST

    This past Monday, a couple of developers from Visionary Realms made a rare appearance on the Voices of Terminus show to discuss the AI/Disposition system in Pantheon. The developers were:

    Ben “Kilsin” Walters - Community & Web Manager

    Tod “Zippyzee” Curtis - Senior Programmer

    Zippyzee is the programmer in charge of creating the AI system, so the VoT hosts took turns asking him questions about it. Keep in mind that the following questions and answers may have been paraphrased for the sake of clarity and duplicate or unanswerable questions have been omitted. In chronological order:

    Can you describe some of the challenges of creating AI in a game?

    In this game, I came on the team after a lot of the core game was done, but they didn’t have a dedicated AI system. So I basically had to design a system the way I wanted it to work and that involved pages of drawings and diagrams, keeping in mind how AI worked in other games. I spent some time on the Vanguard emulator team and putting together the AI system was something I did for them. I realized some of the limitations it had, so with Pantheon, once I had a rough idea of how I wanted it to work, I ran it by the team and they told me to go for it. Then of course there are technical challenges to actually put it into code, and then integrate that code with all the other code that other people have put in. There’s a lot of work that goes into just getting the structure done. Once you have the structure done, you can start adding certain behaviors, but a lot of times it has to be edited or redone. Eventually you get to a point where you think it’s doing everything you want it to do and what you want it to do down the road, so you can continue to add extra layers of interest. So far, it’s worked out really well. We occasionally have some bugs that are hard to chase down, but I like to think ahead when I put it together, so it’s easy to make adjustments. I try to make it open-ended and flexible, so I’m looking forward to seeing how it grows in the future.

    Will new behaviors and dispositions be added over time?

    Definitely, because there’s actually not many in the game right now. The whole point of the system is that if someone comes up with something creative that they want to assign to a number of NPCs and it fits the mold of a disposition, we come up with a clever name and map out what it would do. It’s as simple as me creating that disposition and the code that the NPC would check every so often. For example, a pyrophobic needs to check for fire every second or so. The fire would be the stimulus, and if it detects that there’s fire nearby, it will trigger a flee routine with certain parameters that tell it how to flee the fire. We as developers look at this game not as something that is set in stone and be expanded upon later as an afterthought. This is something that will continually be improved and added to as something that we would want to play forever if we could. We don’t want to be tied down to simply tacking things onto the original game. This system is something we want to look at as something that keeps things fresh over time as players discover and have to react to new dispositions.

    What’s the most hilarious AI bug you’ve seen so far?

    Zippyzee: The pyrophobic disposition that I had working got broken at some point, and Joppa attached it to the wolves in Thronefast. I got a report from another dev that the wolves were fighting them with their butt. So of course I got on and tested it, and came to find out that if you had a torch equipped, the wolves were trying to melee while at the same time, trying to run away from the fire. The code was basically making them fly up backwards at the player. I’m sure there will be more to come as we add more layers, but I’m a very thorough tester. I don’t like to create bugs and by now I have a good idea of how these things break, so I spend a lot of time trying to break my own code.

    Kilsin: The only AI bug I’ve seen that I thought was pretty funny was when I was playing around with some dev commands before one of our dev test sessions. I was trying to see how many mobs I could get to train in Thronefast without breaking anything, and I managed to get nearly all of them. But as I was trying to get away, I couldn't get them to leash. I was trying to use all sorts of dev hacks and flying commands, but it wasn't working. I ended up going through a wall of the castle and fell down into the water below. I saw some weird shadows on the ground, so I looked up and there was about 50 mobs just flying through the air, going from one side to the other.

    Will the mob AI change based on the group makeup?

    Yes. I don’t have a lot of details on that, but that ties into not only my AI system, which sets up a stimulus for the mob, but also the ability system, which I’m not working on specifically. The ability system has a lot of conditionals in it which allows the designers to create a flowchart for different things that can happen based on different criteria. And last I knew, the makeup of the group definitely does have something to do with how mobs will use different abilities.

    Can you tell us about the AI mechanics in the world itself?

    As far as things that outwardly affect the whole world rather than attached to an NPC, there’s not a whole lot of that in right now. But the systems are in place for it and I’ve done a few time-based things in the world. For example, once we reimplement the day/night cycle, players will notice some things that only happen during the night. Weather will be another thing that affects AI. There’s no weather in the game right now, but we have experimented with it before and it was amazing. Once it gets dark and rainy and lightning flashes across your screen and thunder booms in your ears, it immediately made me think of mobs that react to that. For example, they could run back into their cave to get out of the rain, while other things might come out of the ground or the lake and take advantage of the rain. That sort of thing will happen. There may be plans on an even bigger scale, but I don’t have any specifics on that yet.

    However, we have to find a balance between predictability and unpredictability. We don’t want it to be so simple that you can mindlessly repeat tasks every time, but if it’s too random, that can become frustrating for the player. Therefore, there has to at least be some sort of patterns that players can figure out. One system that I think would help with that is a player skill that, as you level it up, gives you more information to help identify the disposition a particular mob has. I’d like mobs to occasionally spawn with random dispositions, but without that system in place, it would sometimes be frustrating to never know what you’re up against.

    This balance is something we internally debate from time to time. The team is extremely diverse as far as what they want to do for the players and how these aspects of the game should be made, but at the same time, very respectful of each other’s views. These are very good debates for us to have because it allows us to experiment with different things to see what works best and then modify it as we go if we need to. A lot of companies don’t have that freedom because there’s usually just one person barking out commands. So if any of us see something that’s not what we would want to see in a game, it’s going to be taken seriously. That’s part of the pleasure of working on this team.

    Are there any specific hardware considerations on the server side when it comes to creating AI?

    No, AI takes a miniscule amount of computing time compared to everything else that goes on in the world. For example, NPC movement is much more computationally difficult than an NPC checking for stimuli. Our goal is always to write code to be as efficient as possible. Every once in a while I’ll turn the AI off to see if it has any effect on performance, and it really doesn’t. But we still want to be smart about it. For example, if there are no players in a zone, should all the NPCs in that zone still be going about their business and checking to see if they should be fighting other nearby NPCs? I think so, but that will start to add to the server load and that could be wasting cycles that we could be using for something else. A dream scenario for me would be that NPCs have a large path and wander by other NPCs, and as long as they are well fed in that there are enough other NPCs around to hunt, they will stay put. But if there is not enough food nearby, they’ll go a little bit farther to look for prey and affect other populations, maybe even setting up a foothold somewhere else. For that to happen, everything would have to be turned on all the time. That is the difference between a simulation and a game. We need to balance the two. Normally, we don’t want too much simulation because players will simulate things in their mind anyway as long as the game is fun enough. But these days, we can still add a lot of fun AI stuff without it negatively affecting gameplay.

    How does Pantheon’s AI system differ from a traditional MMORPG?

    It’s intentional that our AI system is built kind of like LEGO building blocks. I don’t want us to put something in with predetermined mechanics. It’s more like a sandbox where we can play around with attaching different actions to different stimuli. We have a big pool of actions and stimuli to choose from, and if we need something more particular, we can just make it and add it to the mix. That way, future creative team members can have an interface where they can easily put the “blocks” together to create new dispositions. I actually haven’t really seen what I would consider “good” AI in any MMORPG. Every mob is just told to do certain things and it’s pretty predictable. But what I like to do is stack multiple stimuli on one mob so multiple things might even be triggered at the same time, and a wider variety of behavior can take place.

    Is there a difference between a non-aggressive NPC and a hostile mob AI?

    There are some actions and stimuli that are based on whether the mob is always aggressive or always not aggressive. I had to hijack the aggro system to make it work with the AI system so that when a mob was aggroed it didn’t always just want to go attack the player. For example, an Alarmist may always be aggressive, but instead of attacking the player right away, it will go look for help. But if it’s not a hostile mob, of course it’s not going to be doing that.

    Can you recommend any good AI books for those that may be interested in game AI?

    I have some game AI books, but I haven’t read any that I really like. They tend to get into a specific way that the author likes to make a specific game and it isn’t really broad. But there are a lot of good websites. If you’re going to develop game AI, you’re probably going to be using an engine like Unity or Unreal and there are tons of tutorial videos on game AI. But I think it’s best to first explore the different overall philosophies of AI. I read a lot of books on math, science, particle physics, and quantum mechanics. My favorite book is called The Making of the Atomic Bomb by Richard Rhodes. It’s a fascinating book on how people work together to accomplish something that you’d think would be impossible.

    Will there be any traps or puzzles in dungeons?

    Traps are coming pretty soon in development. I’ve heard some questions from the creative team about how things like tripwires would function in a dungeon, so that’s something that they’re looking into. Personally, as far as puzzles go, I don’t want to just see a bunch of random switches and levers, and you have to figure out how they work to progress. It would have to be interesting in the context of the world, and there would have to be some sort of explanation as to why the NPCs built that. In a way, I think how well players pay attention to the world around them will play a part. For example, the other day, I was just wandering around Halnir Caves by myself and I noticed a crack in the wall. It piqued by curiosity so I went up and looked through. On the other side of this wall, I saw a wide open area with a door and a big statue leaning up against it. I had no idea what it was and I had no idea how to get there, but I could see it. It made me really wonder and want to figure out how to get there to see what it was. So there might be puzzles of not knowing how to get to a particular area that you can see.

    What do you see in the future of gaming AI?

    In a game like this, I actually don’t really want game AI to be like machine learning. We just don’t need that. As devs, we can adjust to teach the NPCs how to react as necessary. My dream MMO would be where all the rules of the world are created, a bunch of NPCs are put in with rules about how resources are gathered and how they build and survive, maybe how the weather affects the terrain, and then have a true simulation run for about 1000 years with enough randomness where you could have 12 different servers and every server has different outcomes. Then you put the players in the midst of all that and let them figure out how to deal with the things NPCs are dealing with. How I see it, the future of MMOs is not in making combat better, but it’s in making more realistic worlds that immerse you because you can see how long things have been around and how your role fits into all of that.

    What would you add to the current Pantheon AI?

    What I’d like to do sooner rather than later is have the NPCs interact with the world a little more, like foraging for food. For example, if the players take all the food in an area, the NPCs wander a little further to look for more food. Maybe you could even lure one out that way if they won’t come out of their cave until there’s no food at the entrance. Those are the sorts of things I’d like to see added soon.

    *After the VoT hosts were done asking questions, the devs took some time to take various questions from the community in Twitch chat:*

    Will there be any items that are bound to character?

    The philosophy has been to really limit soulbound items and keep items freely tradeable as much as possible. There are certain exceptions though, such as epic quest rewards. And there may be some that are bound to account. But the goal has been to design items in such a way where we don’t have to rely on binding them to character.

    What is VR’s stance on RNG in today’s MMO’s?

    People blame RNG for a lot of things that aren’t RNG. They just haven’t figured what the parameters are that are causing things to happen. I avoid RNG for the most part, but if there are several good options that something can do, I think it should be a little random. It goes back to that balance of predictability and randomness. I think RNG gets blamed a lot when bad loot drops, but you can’t really get away from that - that has to be somewhat random. So it depends on the context. I don’t want RNG to take the place of good design. If you can come up with a flowchart that determines how different things happen, that’s going to be a better way of doing it.

    Will environmental effects have AI trees?

    The acclimation system that we have ties into that to a degree because people will be manipulating the environment. For example, if there are mobs that particularly vulnerable to a Gloom environment and your group is acclimated to Gloom with their gear, someone in your group might be able to create a Gloom effect, which would create a better scenario for that battle. Those sorts of things are in the works down the road.

    Will you be able to pull effectively without having a specific class?

    Zippyzee: We don’t want to make it so every class has the ability to pull effectively, but you do want to make it so that various group makeups have something they can do. Some may have an easier time than others, but there’ll always be a method.

    Kilsin: Basically, you won't always need a Monk, though it may be handy in certain situations. Rogues can do it with smoke tricks, and other classes can stun or mez. Players can creatively get around it. Instead of a puller, you could even just have an extra healer to heal through the extra damage, have an extra tank to split the mobs, CC to mez them, or have an extra dps to kill the mobs faster. There’s lots of different possibilities to make up for it. Some will work better than others, but that’s totally up to you. You won’t find yourself in a situation where you absolutely have to have a particular class.

    Will there be a disposition that causes mobs to chase you for extended distances?

    They actually all chase you for extended distances. We need dispositions that cause them to not chase you indefinitely. There will be mobs that flee. One might flee really early in a battle, but if you do enough damage, it may turn around and stand and fight. One might try to flee at all costs, even if it means jumping off a bridge to its death. As long as it’s fun and doesn’t break the game, we can pretty much do whatever we want. But yeah, trains are a real danger right now.

    If an area keeps getting overpowered by players, would the NPCs move or bring in reinforcements?

    That would be a more dynamic behavior that we could put into them, but I think if something like that is happening, we’ve done something else wrong with designing that area. We could just expand on what their doing to improve their defenses. I’m not dismissing dynamic behavior, we very well may do that - we have some ideas. But for now, we want to design things in such a way where it’s not required. One thing I’d like to do is have certain mobs that, as long as they’re alive, will continue to spawn more mobs, but if you kill them, they’re gone for maybe a full real world day. Those are the sorts of things that we could do that would have more of a long-term effect.

    If we have ideas for AI structures and interactions, what’s the best way to communicate them?

    I’ve seen a ton of great AI suggestions. People post about it on the forums all the time. I don’t always comment on them, but I read them and keep them in mind, so that’s probably the best way.

    Is there a chance for bosses or their henchman to randomly spawn with dispositions?

    That’s something that I would like to see, but we would have to have some ability for the players to figure it out. We wouldn’t want the difference between a group winning or wiping that encounter just to be because the boss randomly spawned with a certain disposition. There has to be some action or tell that NPCs give to hint at what they’re doing.

    What challenges are you facing at the moment concerning the AI?

    Not really any right now, which is what makes it fun. That part of the game is well ahead of other things and waiting for the rest of the game to catch up. We have zones to build, NPCs to place, art that needs to be rendered into the game, etc. There’s things that need to happen before there’s even any reason for me to add AI to the NPCs. Things are being done, but in general, programming is ahead of the creative team because without programming, the creative team can’t do anything. Programming has to get to a certain point first before the creative stuff can go in. And that creative stuff is a big deal - it’s a lot of work for a lot of people. Meanwhile, I don’t like to sit idly, so I’ve been working on improvements to the chat system or any bug that is a quality of life issue for our testers, because we don’t want them frustrated while they’re testing. There’s a lot of things going on, but not a lot about AI until the rest of things catch up. At that point, I’ll have a better idea of what I need.

    --------------------------------------------------------------

    I hope you found this summary helpful. If you want the complete experience, you can watch the full episode here.

    As always, thanks for reading,

    Baz


    This post was edited by Bazgrim at March 7, 2018 3:36 AM PST
    • 1315 posts
    March 6, 2018 7:53 PM PST

    Thanks for the transcription Baz.

    Trasak

    P.S. what did we decide on for the term? Was it Bazzeled?

    • 9115 posts
    March 6, 2018 8:22 PM PST

    Love your work, Baz, thanks mate! :)

    • 2886 posts
    March 7, 2018 3:29 AM PST

    Trasak said:

    Thanks for the transcription Baz.

    Trasak

    P.S. what did we decide on for the term? Was it Bazzeled?

    Lol it was Bambazzled! :P

    • 17 posts
    March 7, 2018 9:52 AM PST

    Thank ye for the write-up Baz.  I listened and enjoyed it on Twitch, but I do love 'hard copy' for reinforcement :)

    • 470 posts
    March 7, 2018 10:29 AM PST

    Appreciate it, Baz. Haven't had time to catch up this week so that summary helped.

    • 87 posts
    March 7, 2018 1:31 PM PST

    Thx for the summary baz  i just couldent stay awake =)

    • 17 posts
    March 7, 2018 4:34 PM PST

    Zippy said 

    " For example, if there are no players in a zone, should all the NPCs in that zone still be going about their business and checking to see if they should be fighting other nearby NPCs? I think so, ..."

    Puts me in mind of my earliest EQ story that I still tell today... I was running through N Karana avoiding everything possible as I was just a young druidess of less than 10 seasons. When I got here N K Guard Tower  That is exactly what I saw.  I had already done a 'who all zone' and there was only me.  I still wonder if the guards did that even when NO ONE was around heheh... does that not make them have a life, so to speak?

     

    Edit: How about letting the guard(s) have a night off once a week where they can go home and eat... *grins* or at least another npc to bring them some lunch...


    This post was edited by Jolie at March 7, 2018 4:39 PM PST
    • 9 posts
    March 8, 2018 6:05 AM PST

    Thank you Bazgrim!

    It was kind of you to put the time into posting the transcript of the Q&A for us.  These were great questions with fantastic answers.  

    • 28 posts
    March 8, 2018 7:33 PM PST

    Great work and thanks for the transcript Bazgrim!

    • 14 posts
    March 8, 2018 9:45 PM PST

    Wow.  Just wow.  Thank you for the time and effort, Baz.  It is appreciated.

    • 132 posts
    March 14, 2018 4:44 PM PDT

    This sounds amazing thanks for all the effort being put in. 

    • 801 posts
    March 18, 2018 7:27 PM PDT

    Kilsin said:

    Love your work, Baz, thanks mate! :)

     

    Can you guys hire this guy? even part time? hes been doing such a good job for the community and is well liked. I think its time we have someone younger to help model this game.

    Hes very accurate and good at what he does and corrects people all the time with proper information. Id like to see him as a junior Rep on the forums??

     

    What do you think? Id rather have people who care about development then someone who shuts you down for everything you say.

    • 39 posts
    March 25, 2018 2:48 PM PDT
    Are there any plans for NPCs to interact with one another? Some of the things I liked in eq1 and to a degree what I remember from eq2 were npc battles (orc raiding parties in high pass) small engagements Bentsen npc groups (not just guards killing helpless creatures that wondered too close). Eq to a lesser degree had these interactions motivated by stories in some parts (I remember a squire or something delivering messages). I realize this may be a pain but these types of interactions helped make the world feel alive (especially to someone who was solo most of the time) even if they were a little cheesy at times
    • 2886 posts
    March 27, 2018 5:11 PM PDT

    Squall said: Are there any plans for NPCs to interact with one another? Some of the things I liked in eq1 and to a degree what I remember from eq2 were npc battles (orc raiding parties in high pass) small engagements Bentsen npc groups (not just guards killing helpless creatures that wondered too close). Eq to a lesser degree had these interactions motivated by stories in some parts (I remember a squire or something delivering messages). I realize this may be a pain but these types of interactions helped make the world feel alive (especially to someone who was solo most of the time) even if they were a little cheesy at times

    In short, yes. Zippy alluded to that briefly in the interview. VR really takes no shortcuts in making the world feel alive and that is just one small part of it - wolves hunting deer, warring factions, etc.

    • 217 posts
    April 2, 2018 7:56 PM PDT

    Nice.. love it Baz.  Thnx VR and VoT!