Thanks! and thanks again for giving me the idea for this post! hmm, I'd have to look at how you implemented a binary tree for handling botting. I'd assume you implemented some sort of selector logic to your nodes which at that point you just kind of have a behavior tree that you have limited yourself to two nodes and less flexibility haha. I'd be interested to take a look at an example of how you setup your binary trees to work!
Thanks!
So I started implementing Chefs Assistant last night to play around with using behavior trees for quest bots. Here is a diagram of what my behavior tree looks like.
(Could break up some of these actions into more sequences like "walk to bucket", then "get bucket" but lucid chart wants me to buy premium for unlimited shapes which is a joke).
Things to remember when reading this diagram
Sequences read left to right and if a node fails we restart
Selectors read left to right and if a node responds with a success we consider that good enough and move on.
Conditions return success or failure
Actions return success (lets pretend they never fail for sake of simplicity lol. But in the real world you would probably have some extra stuff for handling that.)
So Looking at the chart above it makes the most sense to me to use one base "sequence" since like you said quests "usually involve a long sequence of linear and dependent steps".
You can see that we start to have a pattern arise as well with each of our steps. We generally have a "selector" which checks if the step is complete (the left child node of each step "selector" for instance "Has Bucket of Milk" which will return successful if the player has a bucket of milk"). And if it is not we move into a sub sequence for that step. All you need to remember for reading these trees is that for the most part they read left to right and once you get to a "leaf" (a node with no children) you move back to the very top.
Another point that this diagram drives home from the original post is that behavior trees read exactly like English. This tree reads exactly like what the steps to complete the quest are. If you are new to tree traversal or behavior tree traversal i could try and animate what going through one of the steps branches would look like (or just watch the videos in the original post and that should help, then come back to this.)
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.