One part of The Killing Stone that I’m especially proud of is the demon’s AI in bargaining. Despite the mechanic being fairly simple, it needed to do a lot of heavy lifting for the core premise of the game, feeling like you’re facing off in a battle of wits against ancient and powerful demon lords.

At its core, the algorithm looks at how good or bad an outcome would be, considers its options against each of those outcomes, and picks the best one. My fellow code nerds may recognize this as a fairly simple Utility AI.
But no self-respecting devil would ever play it that straight. It would have its own petty priorities. It would try to play mind games with you. So, like a lot of human players, it uses the first round partly to pursue the outcomes it actually wants, but also to feel out the player and misdirect.

Before the AI was implemented, we could play bargains against random enemy plays. It was a very temporary implementation, but even that random version provided useful data!
Humans are so good at seeing patterns, we often see them where there are none. So it wasn’t surprising that when the game randomly selected exactly the same bids as the human, humans called it out. What was really useful though, was hearing how often my colleagues called this “cheating.”
The AI doesn’t cheat at all. It chooses its moves before you’ve even played, so it can’t possibly take your future movements into account. But it DOES try to guess!
So I was walking a fine line between making the AI appear intelligent and aware of the player’s intelligence, but I also had to avoid situations where it looked like the demon was acting on information it doesn’t really have.
Add to that, if the player is able to maneuver the AI into a state where it behaves predictably, it no longer feels like a high-stakes battle of wits against an intimidating foe.
But adding true randomness was dangerous because if the demon ever plays a move that doesn’t make sense, it will again break the magic. So instead, if the demon’s and player’s moves are ever too aligned, it will abruptly change its strategy.

When playtest feedback started to say things like “personality” and “mind game” and how good it feels to “trick” or “outmaneuver” the demon, I knew we really had something.

No one has yet noticed that the different demon lords have different priorities in bargaining (at least not that I’ve heard), but I’m sure they will.

The Killing Stone is out now in Early Access, sitting at 96% Very Positive on Steam! If that sounds like your thing, check it out, and good luck in all your machinations against the devil!