What's the point of a blackboard for behavior trees?

I’ve made a lot of NPCs using UE4 behavior trees over the past several years, and I’m still puzzled by the design decisions behind blackboards, and the reason for their existence.

From my perspective, blackboards would make a lot more sense if a single blackboard INSTANCE and its values could be shared between multiple behavior tree instances, so different NPCs could all read from the same blackboard. As far as I’m aware, that’s not possible?

Also, since blackboards are basically a list of variables, wouldn’t it be useful to be able to treat those variables as getter and setter functions? It would empower the user and also mitigate data duplication. The risk for potential ‘stale’ blackboard values is real. Why put a value in the blackboard, if I can get it through a function from somewhere else?

Given those two problems, aren’t they redundant, or at least ready for a facelift?

For the last NPC that I made, not only was I ‘fine’ by avoiding using the blackboard altogether, arguably it made the code and BTs more clean and flexible.

2 Likes

As far as I’m aware, and from my experience:

They in fact can be used to share values between a group of actors.

Blackboards are made with the idea of being the memory part of the AI brain. As such they can hold any type of variable, which no struct, array, or map can successfully pull off alone. They are a collection of collections. I think of it as a neural net (or something like the crystarium UI for the upgrades in FF XIII) because the parts can form their own tiny networks, but they’re all contained in one big nebulous ball. I think it’s more of a simplicity’s sake kind of thing.