官术网_书友最值得收藏!

Blackboards and their integration with Behavior Trees

Considering the Behavior Tree as a brain, we can think of a Blackboard as its memory—more specifically, the memory of the AI. The Blackboard stores (and sets) key values for the Behavior Tree to use.

They are called blackboards because, in a classroom, the blackboard is a place where a lot of information is conveyed, but most of it is shared among students; the single notes that are given out to students are personal. You can imagine the students as the different tasks (and nodes) of the Behavior Tree, and the Blackboard as a shared place for data.

Blackboards are fairly simple to understand, since they are only a little more complex than a data structure. The only difference lies in the possibility to assign to a Behavior Tree to a particular Blackboard, which is shared by every node of the tree. As a result, each node can read and/or write back to the Blackboard.

For those of you who are familiar with the Design Pattern of Blackboards, within the context of Unreal, they just cover the role of holding the memory for a Behavior Tree.

It works like a dictionary (the data structure), in which a key corresponds to a specific value type (e.g. a vector, a float, an actor, etc…, even another Blackboard Key). So, by using or recalling the key, it is possible to write or read the associated value.

Another cool feature of Blackboards is that they can be extended through inheritance. This means that another Blackboard can be a parent, and the child will inherit all the parent's pairs key-value, plus some specific ones that are contained in the child itself.

Now that we have covered the theory, let's look at how we can create a Behavior Tree and make it run. To do that, let's start by creating a new project.

主站蜘蛛池模板: 余姚市| 临沧市| 济宁市| 饶阳县| 皋兰县| 洞口县| 七台河市| 仙居县| 莎车县| 谷城县| 元朗区| 保康县| 崇信县| 外汇| 文登市| 本溪| 连城县| 安西县| 吴江市| 腾冲县| 集贤县| 涪陵区| 温宿县| 梁山县| 介休市| 新平| 邵阳市| 昭苏县| 鹤山市| 子洲县| 金塔县| 张北县| 贵港市| 永和县| 怀宁县| 伊宁市| 方正县| 德兴市| 郧西县| 鄢陵县| 崇明县|