fbpx

Using Artificial Intelligence in an RPG

by | Oct 3, 2019 | Development

When you hear the term “AI”, what pops into mind? Robots? Androids? The protagonist of Ex Machina?

Well, in Wheel of Fate, we’ve got something really different going on here. Obviously, the game is about a wheel. But this is not just any wheel! This is a wheel that has the power to act as your very own virtual dungeon master. You may know that in our game, when the wheel spins, the results of that spin affect your entire world and change the game dynamically. However, we’re not only talking about randomization and a basic RNG god. Nope. We have a smart RNG god – a wheel infused with a machine learning ability. This ability allows the wheel to adapt the game, your environment, the ambient lighting, loot, enemies and more to your personal choices in dialogue, your game progress and success in battle!

So let’s dive into that a little more, shall we? Let’s talk about how the AI works in Wheel of Fate. I’m going to use an actual in-game experience to iterate this. This may get complicated, but bear with us. 

Here’s what happened:

We had the AI working in such a way that it would carry over each character and playthrough into the next one. In other words, the choices you made in one playthrough, carried over to the next. I equipped a Brace of Endurance for every party member (which adds 100hp). I also favoured picking up “Of the Giant” (which adds 25 hp per piece), over other pieces that gave me more resistance or DPS.

Now, the AI has a decision pathway where it can assist the player along their chosen path. This can manifest within the story, the loot, enemies, etc. In this particular instance, the AI decided to assist me in my goal by giving me lots of HP for my characters. After about 5 playthroughs, I was suddenly getting Of the Giant in every loot drop and also in all the town’s stores. I picked up over 15 pieces of it in just 2 playthroughs! The AI also controls the loot RNG, which made sure all the pieces I collected were different. I never got 3 of the same piece, but I instead was able to complete the set. For example, I was getting all sorts of cloth, metal, leather armours, different weapon types and more that all had different stats. Yet, all of them were of the Giant type. As I was getting closer to bosses in the dungeon, I was faced with several dragons and other difficult enemies that all have a very high DPS, countering my high level HP.

So, I decided to go in another direction and started taking off endurance pieces in favour of DPS. It took some time, but I started to see my loot change to “Of the Unicorn” or “Sharpened”, which gave me more DPS stats. 

The creatures I faced were also adjusting to my new choices. In this instance the AI decided it wanted to counter my decision, so I started getting more and more stun based creatures which countered my increase in DPS. I got a Spider Queen boss that has one of the nastiest stun attacks in the game! This was coupled with the very aggressive choices I was making in my dialogue, which inevitably lead to more combat oriented spin results, which as a whole, increased the difficulty of groups I faced. 

Needless to say, it was a very interesting set of playthroughs!