In this chapter, we dug into how a behavior tree works, and then we looked at each individual type of node that can make up a behavior tree. We also learned the different scenarios where some nodes would be more helpful than others. After looking at some off-the-shelf solutions available in the Unity asset store, we applied this knowledge by implementing our own basic behavior tree framework in C# and explored its inner workings. With the knowledge and the tools out of the way, we created a sample behavior tree using our framework to test the concepts learned throughout the chapter. We then went on to explore the implementation of HomeRock, a sample card game that showcases an AI opponent. This knowledge prepares us to harness the power of behavior trees in games and take our AI implementations to the next level.
In the next chapter, Chapter 7, Using Fuzzy Logic to Make...