# Can a behavior tree represent the same logic as a finite state machine?

So I was just learning about Behaviour trees and I thought they're really cool. So I decided to use them in my games. But what I don't quite understand is:

Short: Can everything done in an FSM, be done in a BT?

Long: So one of the games I'm involved in has some RE (classical resident evil) mechanics. In RE, interaction with triggers could change. For ex see this video, take 2:40 as an example (it's the tiger statue puzzle from RE1) - basically, if you interact with it the first time, it says "It's a tiger statue, it appears to have holes in its eyes". If then you use the Blue gem on it, it rotates to the left (or right) revealing an item behind it, if you pickup the item you go back to the initial state. Use the red gem and it would rotate the other direction revealing another item, pickup it and you're back again. This is obviously an FSM. Here's how it looks:

So how can this tiger statue puzzle FSM be done in a BT? (if at all) - Is this more suited for an FSM? or a BT would be nice to use here as well?

Thanks for all tips/any help.

• This is a little open-ended. You have two different base questions and then follow up with additional questions. You might find this kind of discussion will work better at the gamedev.net forums, or you might want to sharpen your question into a single concrete problem you're trying to solve/understand. – Sean Middleditch Jun 14 '14 at 1:16
• Done. Down to one question. Even though I think they're all related and could be answered in one go. The main thing I want to understand is how to represent the FSM I showed as a BT. – vexe Jun 14 '14 at 1:53
• A computer scientist might give you an answer about whether or not theoretically any FSM can be expressed as an equivalent BT or vice versa. – Philipp Jun 14 '14 at 9:13
• I thought this was more a gamedev related thing? I'm just asking, how can I express the fsm in the video (tiger statue) as a BT? isn't this a basic gameplay thing..? – vexe Jun 14 '14 at 10:33