Firefight Friday #20: Dehumanize the Enemy

Welcome back to Firefight Fridays. Last week we wrapped up our coverage of the scenarios in the core box with “Crossing the River Styx”. We are nearing the end of Firefight Fridays, but before we call it a wrap, I have two more things to talk about. This week I will be doing an overview of the bot in Firefight Tactical. I have covered the bot elsewhere, mostly on YouTube, but I wanted to make sure I talked about it as part of this series and use the freedom to talk about why I designed it the way that I did. Let’s go.

Emphasize Unpredictability

Before we start talking about the nuts and bolts, I want to talk philosophy for a second. I designed Firefight Tactical to be a head to head tournament type game from the ground up. Several months into the development after GMT had agreed to pick it up, Jason Carr asked whether I could design a bot for it. I flatly declined. After thinking about it for about one hour I changed my mind and decided to try. My thought was that I would have the best chance to do it properly since I knew the system the best. I was told the assumption on the part of GMT was that I would do it given that I design artificial intelligence professionally. “Oh ya…”, I thought. As a result, I approached writing the bot much like I was writing an AI.

My first stop though, as is usually the case in my design process, was to think about what I personally don’t like to see in bots. My biggest grievance is always with predictability. Even if there is an optimal play in a given circumstance, I don’t want it to be a foregone conclusion that the bot will play a certain way. Further, I didn’t want the bot to play “soullessly”. In other words, I didn’t want the bot to play in such a way that it wasn’t reminiscent of a human player you might go up against. These three guiding principles are what created the bot as it exists today.

Emulating Choice

A bot card consists of two or more boxes called nodes. The nodes in turn contain triggers, which may result in an action corresponding to the containing node. A human player surveys the game state, and looks for the move that is some mixture of positively impactful and most likely to succeed. Often, the human will choose an option that is less likely to succeed if the potential impact is adequately large, especially under duress. The bot works the same way.

When resolving the bot’s turn you evaluate the card from top to bottom. The nodes and triggers are balanced in such a way to maximize the chance that the bot will find one of the most impactful things it can do to improve its chances of winning the scenario. The top trigger within each node is the one that is least likely to trigger based on the game state, but represents a situation that is “too good to pass up.” The bottom trigger of a node on the other hand depends on which node it is in. The top node of the card gets evaluated first, but only contains triggers that are so obvious it wouldn’t make sense if the bot ignored the situation. The bottom node on the other hand is much more liberal and is more likely to result in actions where a person would think “well, I have to do something.”

This recipe is spiced up a little bit with the additional of overrides. An override is a specialty version of an action (think Snipe instead of Fire, that piggybacks off the normal triggers and biases the bot to perform the more colorful actions in the game if possible.

Each trigger in the game is evaluated using the same logic ultimately. First it looks to see whether the trigger describes the current state of the game anywhere. If it does, it looks to see what is the best unit that could potentially change that game state by using the node’s action. Where things get more interesting is in how ties are broken. The specifics vary by node, but almost always reference the bot’s current objective. This keeps things nice and flexible and means that you will use the same logic for activation whether the bot is the attacker or defender.

Keep Them on Their Toes

The bot is run by a small deck of cards. Each card has a unique ID, and while there is some ability to customize or randomize the deck (will come back to that) there is one rule that must be followed. While you can mix and match cards from different bot decks, you must have exactly one copy of each card number. The reason for this is that while the cards within the deck may be different, the distribution for the nodes of each type is consistent. This was key to designing the bot because I wanted to ensure there was as much variability and unpredictability as possible while avoiding any lopsided and senseless bot logic.

Each bot turn you simply draw the top card of the bot deck and resolve it. Eventually you will draw the shuffle card and reshuffle the bot discard pile into a fresh deck. All of this comes together to mean that the bot will (hopefully) take no stupid turns while also being impossible to anticipate. Even playing the same scenario with the same bot can result in very different play due to the order of the cards in the bot deck as well as the natural variability already inherent in the game.

You All Have People in Mind as You Read This

As I mentioned earlier, I wanted to avoid the bot feeling soulless. To address this, I decided I was going to design two bots (to start) that would have logic that was an extreme caricature of how people play games. The two bots are the Reckless Bot and the Cautious Bot. Reckless Bot will always go for the long shot. They don’t care about the odds and want to win with as much style as possible, as quickly as possible. Games against Reckless Bot rarely go long, either because they go for the Hail Mary play and it doesn’t work out, or because it did work out and you got crushed. Cautious Bot on the other hand plays the long game. It is more about continuous pressure and trying to make sure it doesn’t take any unnecessary risks.

You can play against these bots for as long as you like and have a good time. It may even be a good idea for the purpose of practice to go against a playstyle to which you often lose. The intent though is to shuffle them together. Much like how every one of us will be reckless at times and cautious at others, the bot will be the same. This livens up play against the bot a good bit and adds huge replay value to your solo plays. In other words, there is no “solving” this bot.

The Bot Cheats

I did want the bot to play as close to a human opponent as possible, but there was one concession that must be made to make sure the bot offers a serious challenge (ask the testers). That is that the bot will ALWAYS take an action once it has decided on it, even if there is no corresponding die in the dice pool. If there is such a die, it will take that one as normal. If there isn’t, it will instead use any die, prioritizing taking the die that you need the most. Put simply, if you are attacking in the scenario it will take the die that corresponds to your movement. If you are defending, it will take the die that corresponds to your aggression. Due to this cheat, the bot is turning the screws on you as much as it can. Your options will dwindle much more rapidly against the bot than they will against a human player. This helps a bit to make the difference between playing against a human mind vs a deck of 8-16 pieces of card stock.

When a Plan Comes Together

That will do it for this week. I am very happy with the bot in Firefight Tactical. I think it offers an excellent challenge while being reminiscent of the choices a human player would take. Even better, once you have the rules down the bot plays significantly faster than your average human opponent.  Next week will be the last article of Firefight Fridays. We will be talking about making custom scenarios. In a lot of ways this is how all the other articles will tie together. See you next week!


Previous Firefight Friday Articles

Sam London
Author: Sam London

Please note: I reserve the right to delete comments that are offensive or off-topic.

We'd love to hear from you! Please take a minute to share your comments.