-
Notifications
You must be signed in to change notification settings - Fork 19
Android Support
marinier edited this page Dec 13, 2023
·
3 revisions
JSoar will work on Android (tested with API 29) with the following caveats:
- Only the default interpreter has been tested.
- Only loading rete files has been tested.
- Very limited usage of RHS functions and commands have been tested.
- Have not tested advanced features such as learning or anything that uses a database.
The untested features may work -- in many cases there's no obvious reason they wouldn't work. Let us know if you try and what your results are.
There is an old Android branch that attempts to provide more complete support, such as loading Soar normal Soar files. It has not been updated in a long time and there are no plans to maintain it, so I wouldn't recommend it.
Changes from the maven branch:
- File handling needed to be changed so the source/pushd/popd commands would work properly with relative directories and files.
- There are two versions of the DB code. Can switch between them in code (should use a config)
- The Xerial/Dalvik version is about 1000x slower than jsoar on Windows (unit tests take 1.5 days). Debugging in a simulator is ok.
- The direct Android sqlite version is very comparable to jsoar on Windows on a real device, but 100-1000x slower on a simulator.
- Work was done in 2018. Since then there have been multiple new versions of Android, probably a new version of Xerial, so these issues may be better now with newer versions, which may make the choice of which to use clearer.
- There have been more recent changes on the maven branch that have not been merged with the Android branch.
Other info:
- Default interpreter is not ported, only Tcl interpreter is supported. Services do not work on Android, so if want both will have to figure that out. (Current take is that we really only need the Tcl one, as it will also work fine with non-Tcl code.)
- Unit tests work and are correct, but they are a mess. Probably worth going through and removing commented out unit tests (e.g., the one that writes a rete file).
- Android doesn't handle dynamically loading files well, so best to have code packaged in a jar for an actual app
- If run in an app, need to give it memory permissions because an agent takes up pretty much the default available memory