Obviously the most interesting article I found on this website. What do you think about it ?

It lacks some code example, don't you know any ? I also read that state machines are not very flexible compared to behaviour trees... On top of that I'm not sure if there is a true link between state machines and the state pattern... is there ?

  • 1
    \$\begingroup\$ "State" just means the data that represents an object at that point. The "State Pattern" is a way to represent this state data in certain programming languages. And a "state machine" is a way to handle changes of behaviour based on an aspect of the object's state. This question should really be split into several because you're asking a few things that aren't very related. \$\endgroup\$
    – Kylotan
    Apr 23 '11 at 0:11
  • \$\begingroup\$ original article is no longer online. here's an archived copy: web.archive.org/web/20110429053741/http://altdevblogaday.org/… \$\endgroup\$ Apr 11 '15 at 2:09
  • \$\begingroup\$ I found these two implementations written in Java: gdx-ai jbt \$\endgroup\$
    – vesa
    Jul 15 '19 at 18:44

Behaviour trees are getting pretty big in the industry right now. Halo 3 uses them extensively for their AI (Halo 3 - Building a Better Battle).

Alex Champandard seems to be a big fan as well (Lots of articles on it on AIGameDev.com).

For code examples, take a look at:
http://magicscrollsofcode.blogspot.com/2010/12/behavior-trees-by-example-ai-in-android.html - The example is in Java, but self-explanatory)

To answer your latter question: State Machines: State Object versus sequential check: what are the pro/cons?

  • \$\begingroup\$ Can anyone find the BT SDK from GameBrainsAI? \$\endgroup\$
    – gap
    Mar 21 '12 at 13:42
  • \$\begingroup\$ It looks like that project has disappeared, which is a shame. \$\endgroup\$
    – Ray Dey
    Jun 7 '12 at 0:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.