-
Notifications
You must be signed in to change notification settings - Fork 19
Home
JSoar is a pure Java implementation of Soar. Soar is a general cognitive architecture for developing systems that exhibit intelligent behavior.
Note that JSoar is an implementation of Soar. To use it effectively, you'll still need to be able to program Soar. The Soar home page has a number of useful resources for learning Soar.
There are a few benefits to a pure-Java implementation of Soar:
- Idiomatic Java API in contrast to CSoar's SWIG-generated bindings.
- "Free" multi-language support (JRuby, Jython, Rhino (JavaScript), Groovy, Scala, Clojure, etc)
- A codebase and tools more friendly to rapid research prototyping
- Native libraries are optional and embedded in jar -- no special setup required
- Cleaner integration with "enterprisey" systems
- Frequently Anticipated Questions
- JSoarUsersGuide - Start here if you want to use JSoar in a project
- JSoarDevelopersGuide - Start here if you want to check out and compile the source code
- Javadoc - See links near the top of the README
JSoar most closely resembles CSoar 9.3. That said, there are some rarely used commands that were never ported, and some additional features that CSoar does not have (e.g., much more powerful I/O capabilities).
JSoar requires Java 11+.
For the most part, JSoar is a direct port of CSoar with minimal refactoring along the way. This means that many members are public (or package private) just like the structs the classes are based upon. As an additional precaution, whenever possible members are marked as final and initialized in a constructor. Refactoring is ongoing to make the codebase more idiomatic, performant, and friendly. Also note that the public interface of JSoar, the one used by client code, is very clean and well encapsulated.
One convention followed during the port was to include a string like this in the Javadoc for each method:
rete.cpp:1011:find_goal_for_match_set_change_assertion
Although the filename and line number aren't that interesting (and are probably no longer accurate), the method name is important. Preserving the original names in the comments allows us to go back later and keep track of where code went when moved from C to Java.