Table of Contents
ATAI-20 Reykjavik University
Final Project:
Preparations
Summary: In the final project you will be working with OpenNARS for Research (a different version than ONA - OpenNARS for Applications), with the main purpose of doing AGI research using NARS. To help you get going with it, OpenNARS for Research comes with libraries of various examples of usage, including a graphical user interface for interacting with it. OpenNARS for Research is written in Java.
Aims: In this first part of the final project you will install OpenNARS for Research on your machine and get a first insight into some of the worlds that have been implemented so far, especially the TestChamber world.
Installation of OpenNARS for Research
The below assumes you are working on a Ubuntu machine. (Since OpenNARS is Java code you might be able to use a different platform, but unfortunately we cannot promise support for that.)
Prerequisites
Install Java:
sudo apt install default-jre sudo apt install default-jdk
Install Maven:
sudo apt install Maven
Set $JAVA_HOME:
export JAVA_HOME=$(realpath /usr/bin/javadoc | sed 's@bin/javadoc$@@')
Make new Directory:
mkdir OpenNARS cd OpenNARS
Clone repos:
git clone https://github.com/opennars/opennars-parent.git git clone https://github.com/opennars/opennars.git git clone https://github.com/opennars/opennars-applications.git git clone https://github.com/opennars/opennars-gui.git git clone https://github.com/opennars/opennars-lab.git
Build projects:
cd opennars-parent mvn clean install -Dmaven.javadoc.skip=true cd ../opennars mvn clean install -Dmaven.javadoc.skip=true cd ../opennars-applications mvn clean install -Dmaven.javadoc.skip=true cd ../opennars-gui mvn clean install -Dmaven.javadoc.skip=true cd ../opennars-lab mvn clean install -Dmaven.javadoc.skip=true
GitHub Link: https://github.com/opennars/opennars
There you can also find a Wiki and some documentation.
Your task
Start the GUI for interactive working with OpenNARS for Research:
cd opennars-lab/target jexec opennars-lab-3.0.4-SNAPSHOT.jar
Figure 1: The GUI that should be started
Start the TestChamber
You can see the Editor menu, the NARS command line/ trace and the TestChamber world. With the editor you can change the TestChamber, add new objects, give NARS knowledge and apply different goals.
In this first part of the final project you are meant to get some first experience on the OpenNARS for Research.
Example video: https://www.youtube.com/watch?v=hAO1zRj2z9A
Try out different things:
- Place new objects in the world:
- Stone Wall
- Grass Floor
- Switch
- Cable
- Lamp
- …
- Try what happens if you send a goal to NARS
- Give NARS some predefined knowledge
- Common Sense
- If you go somewhere you will be there
- If you are somewhere and pick something up you will hold it
- Load a predefined scenario from the editor menu
- Give NARS a command to go to the newly placed switch/ lamp/ …
- Try the “force action” submenu
- Give NARS the command to try things
- What happens in the NARS console?
- Open the Concept network and have a look at what happens there (Trace→Window→Concept Network)
- Have a look at the Code of the TestChamber, especially the EditorPanel.java file
- Especially at the “Predefined knowledge” section
- “common sense”
- “if you go to somewhere you will be there”
- “if you are somewhere and you pick whats there, you will hold it”
- And the different goals you can give the system
- “Try Things”
- “be somewhere”
- etc.
- Implement your own predefined knowledge section
- You can use the other knowledge sections to get a grasp on how things work.
This first part of the final project is meant for you to get to know OpenNARS for Research, so please try to figure out as much as possible about how it behaves.
Also have a look at
- The Microworld
- The Perception part
- NARPong
- How is the reward managed?
- How is information passed to NARS?
( NOT NECESSARY: Try to recreate you own pong example with only the most rudimentary features (Copy paste the code and remove everything unnecessary for NARS to play pong, such as keyboard control etc.)
You might be able to implement an easier way to let NARS play pong.
To make it available to use in the gui you will have to change the code of the launcher (../opennars-lab/src/main/java/org/opennars/lab/launcher))
Including their trace and have a look at the code wherever necessary to see what is passed to NARS, what commands are executed etc. The code can be found at ../opennars-lab/src/main/java/org/opennars/lab/…