What is it?
The Java Agent Simulator 3D (JAS3D) is a tool that provides the simulation of an autonomous agent in a discrete environment. The simulator allows a user to upload pre-compiled Java classes that represent behaviors for the agent. The agent then performs these behaviors within a discrete 3D environment where the user is able to view all interactions.
How does it work?
JAS3D was created using the Java 2 API. It is written entirely in Java, so it can run on any machine that has the JVM installed. JAS3D essentially represents an environment as a discrete set of cells which may be occupied by an agent, an obstacle, or nothing. The agent is equipped with sensors that detect its surroundings, and most behaviors rely on the sensor outputs to direct them.
How can I get it?
In order to run JAS3D, you will need to download and install the Java3D JRE from the Sun website.
If you plan to create custom behaviors, then you will also need to download and install the Java 2 SDK from the Sun website.
Once those have been installed, you should download the JAS3D JAR file. It contains all of the classes needed to run the simulator. You might also want to download the default map, which should be saved to the same directory as the JAR file, and an example behavior, which should be compiled and then loaded into the simulator as described below.
How do I use it?
Starting the Simulator
On machines that have been correctly configured, the JAS3D software can be executed simply by double-clicking the JAS3D.jar file. If this does not (after a few seconds of load time) begin the application, your machine may not have this "double-clicking" capability. In such a case, you should open a command (DOS) prompt in Windows and change the directory to wherever the JAS3D.jar file has been installed. (Generally, this will be in the directory C:\JAS3D.) Once you are in that directory, type the following command:
java -jar JAS3D.jar
Loading a Map
If the application does not begin with the preloaded default environment, you will only see a gray window with a menu bar. This means that the "default.map" file does not exist in the same directory as the JAS3D.jar file. If the "default.map" file is copied to this directory, the JAS3D will load the default map the next time it is executed. You may also choose to load a map from the File menu within the simulator.
Compiling a Behavior
The installation of the JAS3D software includes a batch file called CompileBehavior.bat. This file can be used to compile all of your behaviors. To avoid complexity, make sure that any Java source code for the behavior is saved into the C:\JAS3D directory. Then, to compile a behavior, simply drag the Java source (the .java file) over the CompileBehavior.bat icon. A command prompt window will appear and any compiler errors (hopefully none!) will be displayed within this window. Upon successful compilation, the class file will be created in the same directory as the source code.
If you choose to compile the behavior yourself, you need only open a command prompt window and type the following commands:
cd source_code_directory
javac -classpath C:\JAS3D\JAS3D.jar source_filename
Executing a Behavior
In order to execute a behavior that you've successfully compiled into a .class file, you need to start the simulator. (See Starting the Simulator above.) Then, you can click on the "Load Behavior" button for the current agent, and select the appropriate .class file with the "Open File..." dialog box.
Additional Questions
For any additional questions about the software, please first consult the JAS3D API. You may also download the full API to your system. The API should give you information concerning the available methods for each class when you're creating your custom behaviors. Please note that only public methods will be available for you to use. Methods that are protected are used solely by the JAS3D libraries.
Finally, questions may be addressed to Aaron Garrett at agarrett at jsu dot edu.
