Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Rule Engine for Game AI

I would like to use a rule engine for my game. It will be used for NPC AI, and GM AI.

What might be a good and fast Rule Engine for this purpose ? It must be Java and Open Source.

I would like to hear from people who have used Java Rule Engines for Artificial Intelligence about their experience.

like image 672
Sid Datta Avatar asked Feb 05 '09 01:02

Sid Datta


2 Answers

There are two choices that I've seen: Jess and Drools. Jess, frankly, has issues. It's not open source, nor is it free. It has a Lisp-like syntax, which is either a plus or a minus, depending on your point of view.

Drools, on the other hand, is both free, open-source, and under the JBoss umbrella, so it's likely to stay around for a while. The rules are invoked using straight Java, but are written using a DSL that is pretty intuitive to the non-programmer.

The only "gotcha" I've seen with Drools is that compiling the rules can be slow, so you'll want to run your compilation at startup or in a static block, sometime when the user won't mind waiting around a bit.

Good luck!

like image 198
rtperson Avatar answered Oct 09 '22 02:10

rtperson


Try Drools.

like image 28
duffymo Avatar answered Oct 09 '22 02:10

duffymo