Coder Social home page Coder Social logo

behaviortree's Introduction

BehaviorTree

BehaviorTree project in C++ that I wrote for fun xD

Nodes

Tree node types

Tree

  • BehaviorTree

Composite

  • Selector
  • Sequence
  • Parallel
    tick all subtrees each time
    StopOnFail : stop and return when one subtree fails

Decorator

  • Loop
    loop X times or infinite loop
  • UntilSuccess
  • UntilFailure
  • BlackboardComparator
    compare two blackboard entries or compare one entry to value
    AbortMode : suspend or abort subtree when comparison fails
  • BlackboardCondition
    detect if blackboard key is set
    AbortMode : suspend or abort subtree when condition fails

Action

  • Action
    base class of all actions

Blackboard

Storage of key-value pairs with observers

Operations

  • Set
  • Get
  • Has
  • Remove
  • RegisterObserver
  • UnregisterObserver

Data Types

  • int
  • float
  • bool

can support other built-in/custom data types

Example

An agent is roaming around in 1D space and can be interrupted by pressing the SPACE key

Nodes Used

Basic Nodes

  • BehaviorTree
  • Selector
  • BlackboardCondition
  • Sequence

Custom Actions

  • FindRandomDestination
  • MoveTo
  • StayIdle

Tree Graph

ExampleTreeGraph

behaviortree's People

Contributors

amaranthyan avatar

Stargazers

天宇 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.