3

I am looking for behavior tree implementations in any language, I would like to learn more about how they are implemented and used so can roll my own but I could only find one Owyl, unfortunately, it does not contain examples of how it is used.

Any one know any other open source ones that I can browse through the code see some examples of how they are used etc?

EDIT: Behavior tree is the name of the data structure.

SashaZd
  • 3,315
  • 1
  • 26
  • 48
Hamza Yerlikaya
  • 49,047
  • 44
  • 147
  • 241

6 Answers6

5

Here's a few I've found:

This Q on GameDev could be helpful, too.

Community
  • 1
  • 1
gap
  • 2,766
  • 2
  • 28
  • 37
3

Take a look at https://skill.codeplex.com/. this is a BehaviorTree code generator for unity. you can download source code and see if it is useful.

2

I did my own behavior tree implementation in C++ and used some modified code from the Protothreads Library. Coroutines in C is also a good read. Using this one can implement a coroutine system that allows one to run multiple behaviors concurrently without the use of multiple threads. Basically each tree node would have its own coroutine.

trenki
  • 7,133
  • 7
  • 49
  • 61
1

I don't know that I understand you right but I think to implement a tree you'r better choice is to use an formal language such as F# or Haskell. With Haskell you can use flexible and fast tree-structures and with F# you have an multiparadigm Language to parse and handle tree structures in oo Code.

I hope that helps you.

kockiren
  • 711
  • 1
  • 12
  • 33
  • take a look @ http://en.wikipedia.org/wiki/Noam_Chomsky and http://en.wikipedia.org/wiki/Formal_language – kockiren Jun 03 '10 at 12:23
0

https://github.com/TencentOpen/behaviac is a really excellent one.

behaviac supports the behavior tree, finite state machine and hierarchical task network. Behaviors can be designed and debugged in the designer, exported and executed by the game.

The C++ version is suitable for the client and server side.

and, it is open sourced!

raptoravis
  • 145
  • 1
  • 6
0

You can find behavior trees implemented in .NET in the YVision framework. We found them to be particularly suited for the development of Natural User Interface (NUI) applications. It's not open-source but it's free to use and you can find information on how we implemented them in the tutorials: http://www.yvision.com/support/tutorials/

EDIT: Let me add that we use behavior trees for a lot more than just AI. Even the synchronization of the subsystem in the game loop is define by them. Check the cases page to find the range of applications we are using them: robotics, camera-based interaction, augmented reality, etc. Download the framework, try the samples and please give us feedback on our implementation.

Antao Almada
  • 445
  • 5
  • 12