Table of Contents

T-720-ATAI-2021 Main

ATAI-21 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

GUI
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.

Editor
Figure 2: The Editor

Trace
Figure 3: The Trace

World
Figure 4: The World

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:

  1. Place new objects in the world:
    1. Stone Wall
    2. Grass Floor
    3. Switch
    4. Cable
    5. Lamp
  2. Try what happens if you send a goal to NARS
  3. Give NARS some predefined knowledge
    1. Common Sense
    2. If you go somewhere you will be there
    3. If you are somewhere and pick something up you will hold it
  4. Load a predefined scenario from the editor menu
  5. Give NARS a command to go to the newly placed switch/ lamp/ …
  6. Try the “force action” submenu
  7. Give NARS the command to try things
    1. What happens in the NARS console?
    2. Open the Concept network and have a look at what happens there (Trace→Window→Concept Network)
  8. Have a look at the Code of the TestChamber, especially the EditorPanel.java file
    1. Especially at the “Predefined knowledge” section
      1. “common sense”
      2. “if you go to somewhere you will be there”
      3. “if you are somewhere and you pick whats there, you will hold it”
    2. And the different goals you can give the system
      1. “Try Things”
      2. “be somewhere”
      3. etc.
  9. Implement your own predefined knowledge section
  10. 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

  1. The Microworld
  2. The Perception part
  3. NARPong
    1. How is the reward managed?
    2. 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/…