Code Snippet: iRobot Creates in Java

  • Running a Create agent with a robot: CreateIntroSession.java
  • Running nexting on a Create with a generate and test recursive random network, adaptive density, adaptive threshold in units, using gray code raw input and comparing predictions with returns (in the future) with Zephyr: CreateRawDataRecursiveRandomNetworkNexting.java
    Notes:
    • Use the class RandomNetwork for a non-adaptive random network
    • Use the class LTUThreshold for a non-adaptive threshold unit in the network
    • Modify the StateUpdate for not using the observation in the state
    • See the classes DiscoLogger and DiscoLogFile to respectively log and play raw binary data from a disco socket (should work with a Critterbot connection, a Create connection or a EMG signals connection but not with log files)
    • one unit is replaced every 1000 time steps (see in the main loop to change that)
    • You may quickly run out of memory. Use the option -Xmx2048 to give more memory to the Java Virtual Machine.

Dependencies

zephyr.plugin.core.api, rlpark.plugin.rltoys, rlpark.plugin.robot, rlpark.plugin.irobot

How to run this code

If the class contains a main method, then you can run it as a plain Java project (assuming RLPark and Zephyr are in the Java classpath). If it does not, then you need set up a Zephyr project (or an existing one) as described in the tutorial Using Zephyr Plugins

Documentation