Author Topic: Our take on grid-based tactics AI: Design philosophy  (Read 3274 times)

Archean Games

  • Posts: 16
  • Karma: 1
    • View Profile
    • Hearalds of the Order
    • Awards
Our take on grid-based tactics AI: Design philosophy
« on: September 11, 2019, 02:25:51 PM »
In my last article https://archeangames.itch.io/heralds-of-the-order/devlog/97239/our-take-on-grid-based-tactics-ai-overview, I wrote a general overview of our games AI, namely the main systems that made it tick. The plan was to take an in-depth dive into each of those systems in the following weeks. But reading some of the replies to that article I realized I hadn’t given much context to justify my gibberish. So before I get too bogged down in the "How?" I thought I should take some time and explain the "Why?". After all, this was supposed to be a general ideas box for struggling devs, as such the why is half the battle. And so in this article, I’ll look at the general design philosophy and the important questions that led us to all the systems we’ll be discussing.



What game are you making?

The first and probably most important question. Sorry if I’m stating the obvious but a first-person shooter isn’t going to have the same AI as a grand strategy game. The type of game your making is going to have a profound effect on the AI you need. Do you want its moves fast and efficient or do you want it to have a master plan tailored for every outcome? Will it be making its calculation one every turn or once every frame? In our case, we have a turn-based strategy. Since the calculations needed can be done in a relatively long span of time we could afford to factor in as much information as we wanted in the computers decision making. On the other hand, we didn’t want to let our AI’s crazy schemes run wild. We needed a way to be able to tailor its master plan ourselves, depending on the challenge we wanted to present each mission.


What kind of enemies do you want to have?

There are several different approaches to enemy design in every genre of game. Will you have weak mobs that try to overwhelm the player with numbers or do you have enemies that are just about as strong as the player? Is your AI just a simple agent orientating its way around the world or is it an omnipotent being which knows more about the game mechanics than even the developers? In Heralds of the order https://archeangames.itch.io/heralds-of-the-order, we wanted both the player and enemy teams to be made out of fairly simple but also fairly numerous units. We also wanted all the variable to be there to see for both sides, making it easy for them to make the most advantages decision in every scenario.


Is it fun?

The most important question for every game developer. It applies to every single aspect of your game from the level one sewer rats to the compulsory cooking mini-game. And it can be a so easily overlooked when you’re three months into programing your eighty-layer neural network. Always remember that you’re an entertainer not an academic. Your trying to engage an audience not win a noble peace prize. Think of your AI as a puzzle. You don’t want its solution to be glaringly obvious at first glance. But you do want it to have a solution and one you can reasonably expect an average player to find. A good example of what not to do is the first version of our AI. Having all the available information and the freedom to use it as it saw fit, it decides that the best strategy run from the approaching player and stack all of its units at the end of the level all around the boss. Yeah, it was probably the best strategy it could have concocted. It was also a horrible chore to fight against. Furthermore, if our game was going to be about 2 team grouping up and slamming into each other, why did waste so much time on a fancy level editor. This computer obviously couldn’t be trusted with this much freedom.


How smart does it look?

Another thing that we found from the playtesting the first AI is that even though it had one of the best strategies in mind. Most players we showed our game too felt as if they were fighting a random number generator. To them, it seemed to be acting irrational. Your players will usually have a set expectation of how an enemy in your should generally act. And while subverting those expectations can lead to interesting challenges you run the risk making your AI look random and buggy. Even when you don't want your player to know what decision your AI is going to make, why it's making those decisions should always be visible. If a part of your game feels buggy  than it might as well be. Making your AI look smart is usually easier that actually making it smart and in most cases thats as importaint or even more so.


The bumbling to come

With that out of the way, from next time onwards I'll be getting down and dirty in the programming trenches of our game. We're reaching an important milestone in our development. The first chapter of our game(6 story missions) is almost done. We'll be releasing it for free by the end of September. We hope that this will help us generate a large enough following to justify the work needed to finish the rest of our game. If not we'll just have to leave it as a passion project sacrificed at the altar of real life.

If you'd like to know how we got here, check out our first blog https://archeangames.itch.io/heralds-of-the-order/devlog/47578/our-journey-with-heralds-of-the-order, summarizing our journey so far. if you would like to see this game finished consider signing up to our mailing list http://eepurl.com/dEgLZ9, to let us know you're interested in our work. You can play the current version of our DEMO https://archeangames.itch.io/heralds-of-the-order to tie you over until the new one is finished. And consider filling out this survey https://docs.google.com/forms/d/e/1FAIpQLSfW3mQLUFVojr2wJS2e-zptNxlovT9wRQdrJhVIGGviymzVSQ/viewform?usp=sf_link to let us know what you thought. As always if you want to see more from us visit our website http://heraldsoftheorder.com/ or our social media pages: Twitter https://twitter.com/ArcheanGames, Facebook https://www.facebook.com/ArcheanGames, Instagram https://www.instagram.com/archeangames/.

Visit our website to try our free demo: http://heraldsoftheorder.com/

Feel free to contact us at:
Gmail: archeangames@gmail.com
Twitter: https://twitter.com/ArcheanGames
Instagram: https://www.instagram.com/archeangames/
Facebook: https://www.facebook.com/ArcheanGames

Jubal

  • Megadux
    Executive Officer
  • Posts: 35495
  • Karma: 140
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Re: Our take on grid-based tactics AI: Design philosophy
« Reply #1 on: September 13, 2019, 12:06:18 AM »
Quote
Your players will usually have a set expectation of how an enemy in your should generally act. And while subverting those expectations can lead to interesting challenges you run the risk making your AI look random and buggy.

I especially liked this quote as a piece of design philosophy - the idea that AIs, to be taken seriously for story purposes, need not just to act rationally but to act according to a rationale that we can conceive of as human. It's something I tried to do when I did AI writing way back when (I failed miserably though mostly because I'm crap at optimising things so my AI ended up slowing the whole game down and breaking everything :( )

Also, a couple of thoughts:
> Sometime might you be interested in doing do a piece on design stuff for our main articles section? You've got a good writing style for it - it'd need to be maybe a bit more general design-philosophy or focusing on how to implement a particular thing, though you'd still be welcome to plug the project in there somewhere.
> Would you like a subforum for all your threads? I can gather them into one for you quite happily.
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Archean Games

  • Posts: 16
  • Karma: 1
    • View Profile
    • Hearalds of the Order
    • Awards
Re: Our take on grid-based tactics AI: Design philosophy
« Reply #2 on: September 13, 2019, 04:13:03 PM »
Quote
Your players will usually have a set expectation of how an enemy in your should generally act. And while subverting those expectations can lead to interesting challenges you run the risk making your AI look random and buggy.

I especially liked this quote as a piece of design philosophy - the idea that AIs, to be taken seriously for story purposes, need not just to act rationally but to act according to a rationale that we can conceive of as human. It's something I tried to do when I did AI writing way back when (I failed miserably though mostly because I'm crap at optimising things so my AI ended up slowing the whole game down and breaking everything :( )

Also, a couple of thoughts:
> Sometime might you be interested in doing do a piece on design stuff for our main articles section? You've got a good writing style for it - it'd need to be maybe a bit more general design-philosophy or focusing on how to implement a particular thing, though you'd still be welcome to plug the project in there somewhere.
> Would you like a subforum for all your threads? I can gather them into one for you quite happily.

It is a lesson we had to learn the hard way.
I'd be happy to write an article for the site but will need some help coming up with a topic. Also, I don't think we're that special to have sub-forum just for our dev blogs. And to be honest they'll probably get more views if we leave them here. Thanks for the offer though.
Visit our website to try our free demo: http://heraldsoftheorder.com/

Feel free to contact us at:
Gmail: archeangames@gmail.com
Twitter: https://twitter.com/ArcheanGames
Instagram: https://www.instagram.com/archeangames/
Facebook: https://www.facebook.com/ArcheanGames