MonkeyBrains or Libgdx-AI

I wondered which AI system to use in my wip game, a generic and powerful (implemented by AI experts) or a hand made try that is possibly going to give me lot of headaches and end up with a botched thing.

Well, I suppose the best way is the first one so I started to inform myself about the different alternatives, ending up to two main candidates:

Well, I could read that both have their good things and their bad things (mainly that one is intended to be for 2D/2.5D and the other is just though for JME).

First of all I would like to know which one has “more future” as a framework/lib to use with JME as I can see that MonkeyBrains last change was 11 month ago and Libgdx-AI just a few days. I also could see that @atomix did a fork of it (but there has been a year since the last change).

However, in what I’m more interested at the moment is on it maturity, stability and functionality regarding using it with JME.

So… my main question is just the one in the title, what should I use (or you recommend me to use right now), MonkeyBrains, Libgdx-AI, or other?.

Thanks in advance for any advice on the topic.

Not knowing the details of your project I can not recommend which is better for you but I can tell you how I made the decision. I needed a light weight AI framework that was opened enough for me to extend and already included the basic behaviors that I needed for my space game. I also needed a framework that can trigger child behaviors based on some event on the parent behavior. MonkeyBrains gave me all of that with a bonus of a hit point and inventory system built in that I can extend. As for the maintenance issue, MonkeyBrains is so straight forward and simple, that I just created my own personal branch and have already created a ton of personal extensions. If you do not intent on extending your AI framework much, then you should just look at the behaviors of MonkeyBrains and see if they meet your game needs. If they don’t and you really don’t want to extend them, they you should look at other options.

Thanks for your response.
Well, my game is just another RPG. It uses all AIs used on such games and I’m thinking on extending them to be some more but I’m not a pro on this so I want the complex things to be done (yeep, a little bit lazy but if someone has already done it, why to do it again? xD). Well, the main doubt I have with MonkeyBrains is that it seems to hardly use the spatials as it main “objects” and I would like to use my own logic in it (the spatials are just my visual things). Another thing that I worry is the activity on it (it seems to be stopped since a lot time ago while Libgdx-AI seems more active).

I think that I will finally try LIbgdx-AI and give it a try (The only thing I don’t “like” from it is that it is though more for 2D but it also seems that the author is having more in mind it usage in 3D games). However, it is always good to have more advice and hear experienced people.

I don’t know MonkeyBrain but this seems very strange. Spatials ARE visual things. Adding artificial intelligence to it is non sense.

What do you mean by 3D? Do you want to have 3d mazes in which to find a way, or 3D motion like in a space shooter? because the logic and AI in most of the RPG I know is effectivelly in two dimensions (and a half for levels).

And if you need only a state machine or a behavior tree, it’s not dependent of the number of dimensions you need. Do you already know which technologies you will need? BTrees, FSM, A*, vector fields… I think gdx-ai offers much more options.

1 Like

Well, what I mean with 3D is, for example, flying AIs.

I’m not too much concerned with the technologies as I can really do it with anyone of them. Well, which state system is the best for my case?, o don’t think there is a “best” one. Each one has it things. About algorithms… I need almost “all” of them, depending the entity being implemented.

Isn’t it what the Agent is precisely doing (I suppose is done like that so it can make the spatial behavior directly but in my case I have a logic layer so I want to work with it instead of directly with the spatial)?

Yeah, I think it’s already been discussed before that the MonkeyBrains design is kind of broken since it follows the broken “spatial is a game object” antipattern.

…because it enforces a way of doing thing to the developer. Which is exactly the way of doing things for the example provided, but when you want to do something “new” you want to replace most of the things.

We switched from MonkeyBrains to Libgdx-AI just recently (to be honest, the implementation was barely started). Mainly since MB is tied to JME versions and at least it would required some maintaining. Libgdx-AI seems like a good framework. And it is actively maintained.

Yes, and if you have to replace all of the MonkeyBrains code with your own then why bother in the first place?

I’m not sure I understand your comment.

It seemed like MonkeyBrains codified a direct to to Spatial right in the core. Maybe I misunderstood as I haven’t seen the javadoc.

I was actually expanding: not only it follows the spatial=game logic antipattern, but also provide a framework that does everything: health, weapon, inventory… problem is, maybe you want to do things differently.

So the answer is : LibGDX-AI :smile:

You will probably want to use behavior trees because it rocks ^^
And you will surely be bothered by the BT edition (and its awful indentation system) because it sucks ^^

I haven’t found any good way to edit behavior trees for LibGDX-AI, so I plan to create a graphic editor (in JavaFX) similar to the Unreal Engine 4 one. I think it would be a great addition to this lib. Maybe we can work together ?

This is valid for any other monkey of course !


Yep, I’ll go for that. I think it fits best with what I want.

I’ve been reading lots of things about that and I discovered that what I was making was a kind of BT xD (obviously, a hand made without knowing “official” patterns so… well, I’ll go for a already done :smile:).

Hm… I wanted to implemented a file parser and when I saw that I though it was just what I was looking for, why do you think it sucks???

Ok, that is just awesome so I hope you find people to help!.

In my opinion I’m not ready to help at that magnitude, I have lots of things to learn and a game to finish first. Once I finish the project I’m on, I’ll be glad to help on anything for JME, I find it community amazing ;).

Why don’t use Lemur?, wouldn’t it be more beneficial for the JME community to use more it and make it grow?.

As I understand it, it’s a separate stand-alone tool kind of like an IDE. Not really Lemur territory since Lemur is JME-specific.

Right, I missed that when I though on it :S.

Lemur is awesome… unfortunately it lacks some advanced widget support to make it rival with desktop gui toolkit like swing.

It would be really really cool to make desktop applications… with JME! :smile:

Since behavior trees are generaly external ressources like a texture or a model, the edition tool I’m talking about is more out of game.

The kind of editor I’m talking about could be connected to the jMonkey SDK, of course. But this would ask to integrate the behavior tree logic to JME, or else you would have a tool to create BT, but no framework to use them in-game.

LibGDX-AI is a very mature framework and will maybe become an optional dependancy one day for jMonkey (like Bullet), thought. Then, a behavior tree editor and inspector would be a great tool indside the engine, at runtime ! But this is another thread :smile:

As the main author of gdx-ai I like the idea of a graphical editor and I’d be glad to contribute.
I’m not a JavaFX expert though.


At the bottom of this page you can find link to some graphical editors for behavior trees for gdx-ai