NEW BLOG POST

You weren't doing anything on a Friday afternoon were you?

Here's 4 thousand words about the new and improved Chronicles behavior planning and how I leveraged reinforcement learning techniques used by Chess and Go algorithms to make my baddies smart and efficient. Enjoy!

https://blog.brianna.town/the-bigger-better-chronicles-npc-behavior-system

#gamedev #indiedev #blog

The Bigger Better Chronicles NPC Behavior System

I wrote about Chronicles` action system ~sigh~ over three years ago and over the intervening horrors of modern existence it has grown int...

The Ebonheim Chronicle
@britown This is oddly topical for me: I've been noodling around with behaviour planning/selection stuff in my current project for a couple weeks, so it's interesting to see other approaches to it :)
@britown excellent article, brought me right back to my graduate algorithms days doing decision trees and alpha/beta pruning :)
@britown Do actors in this system also consider the possible actions of others or just their own?
@kampffrosch the simulation begins when it's the actor's turn within the turn so anyone who goes before then has already "gone" which they can react to but it can't know what actors that go after it will do or what the player will do. For the multi turn sim it does still simulate end of turn things like timers ticking down and drowning/hazards

@britown I see, thanks!

Another question:
How do you handle hidden information?
Let's say the player places a trap that should be invisible to the enemy.
Now if the enemy simulates the outcome of moving into the traps tile it'd notice it takes damage and avoid the tile (possible getting stuck in a hallway).
Do you simulate as if the trap wasn't there?

@kampffrosch good question yeah actors have an awareness concept. They don't gain or lose score for things they don't know about. This includes things like walking into a trap, or like they get score for shooting where they think you are even if they don't know exactly where you are. Normally they would lose score for friendly fire but if said friend is obscured they wouldn't know they're hitting them, things like that
@kampffrosch additionally, the function that iterates through the action list to simulate forward is the same for preview as it is when a real turn happens just with a flag so it's trivial to, say, "if executing for preview, and the current actor doesn't know about this trap they're triggering, don't execute it"