Git Product home page Git Product logo

simplebehaviourtree's Introduction

Behaviour Tree

Behaviour tree implementation in C#

A Behavior Tree (BT) is a mathematical model of plan execution used in computer science, robotics, control systems and video games. They describe switchings between a finite set of tasks in a modular fashion. Their strength comes from their ability to create very complex tasks composed of simple tasks, without worrying how the simple tasks are implemented. BTs present some similarities to hierarchical state machines with the key difference that the main building block of a behavior is a task rather than a state. Its ease of human understanding make BTs less error prone and very popular in the game developer community.

What is it?

A behaviour tree consists of 4 types of nodes:

  • Root Node
  • Selector Node
  • Sequence Node
  • Action Node

Root node - an idle node that does nothing except from being the root of the tree

Selector node - iterates over child nodes and ticks them, until the first child fails

Sequence node - iterates over child nodes and ticks them, finds the first child that has not yet succeeded

Action node - actually does your work like moving the character to a nearest cover or shoot at the closest target

Action nodes are leaf nodes in the tree, meaning they cannot have any children... unless you add them ๐Ÿ˜

API

Currently the SimpleBehaviourTree works, somewhat. There are still some components missing like serialization, which I guess render's it as useless for now...

But wait!

I am going to work on this project in order to add things like serialization components, ticker engine component and Unity wrappers.

simplebehaviourtree's People

Stargazers

 avatar  avatar  avatar

Watchers

 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.