dgrmunch edited this page Dec 15, 2014 · 35 revisions

Welcome to the xmunch-atomspace (XA) wiki!

Introduction

XA allows the dynamic construction of neural and semantic networks for knowledge representation, reasoning and learning in an abstract space of atoms (vertices and edges). It intends to be a tool for helping in narrow AI, but also to be used in the implementation of cognitive architectures for the Artificial General Intelligence (AGI) community. Even though it is inspired by the OpenCog AtomSpace it is a different project with different goals and a completely independent architecture.

xa workspace

Knowledge 3D visualization.

XA implements an interface to communicate in real time with an Ubigraph server. This feature allows AI researchers and developers to visualize both declarative and procedural knowledge. With XA it is very easy to visualize both sub-symbolic representations or symbolic/semantic relations in real time, but also learning algorithms, atom-based state-machines and spreading activation.


Configuration

In order to see a 3D visualization of your atomspace during the execution of XA you need to have an Ubigraph server running on your machine (OS X, Linux or Windows). So, first of all, you have to download it. After downloading, you have to unzip the Ubigraph package and run an instance of the server:

   gunzip UbiGraph-<version>.<extension>
   cd UbiGraph-<version>
   ./bin/ubigraph_server & 

A black window will be displayed and the server will be accessible on http://127.0.0.1:20738/RPC2 by default (check the link on your browser, and you will get a 405 error).

After that, come back to your home directory and clone the xmunch-atomspace GitHub repository:

  $ git clone https://github.com/dgrmunch/xmunch-atomspace.git

If you want to run XA and the graphic server in different machines, remember to change the IP address of the Ubigraph RPC Server on the XA project. To do that, open the file xmunch-atomspace/src/main/java/com/xmunch/atomspace/aux/GlobalValues.java and modify the RPC_SERVER element with the new IP/Port:

RPC_SERVER{
		@Override
		public String get() {
	        	return "http://127.0.0.1:20738/RPC2";
                }
}

Execution

  1. Run the Ubigraph server as it has been explained.
   ...
   cd UbiGraph-<version>
  ./bin/ubigraph_server & 
  1. Clone the xmunch-atomspace project from GitHub:

    git clone https://github.com/dgrmunch/xmunch-atomspace.git

  2. Execute it by using Maven:

    mvn spring-boot:run &

  3. Clone the AtomSpace REST Parser project from GitHub:

    git clone https://github.com/dgrmunch/rest-atomspace-parser.git

  4. Add your instructions in xa-language to the file input.xa and execute the REST Parser by using Maven:

    mvn exec:java -Dexec.mainClass="com.xmunch.rest_atomspace_parser.App"

  5. If you want to create more atoms in real-time you can use the terminal input to submit new predicates to the parser. It will translate it to a REST API call which will be executed in your XA instance, updating the visualization on the Ubigraph server and the persistence.xa file.


Import Social Media data.

XA also can be used to load Social Media data. To do that, as it has been explained, you can use the AtomSpace REST Parser to connect to an already running instance of XA. Besides, you can use XA as a persistence and visualization library. So you can install it in a Maven repository to be imported in your Java projects:

  1. Clone the xmunch-atomspace project from GitHub and install it:

      git clone https://github.com/dgrmunch/xmunch-atomspace.git
      mvn clean install 

2. Add the dependency to your **pom.xml**:

```xml
<dependency>
    <groupId>com.xmunch</groupId>
    <artifactId>atomspace</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

It has been already implemented a stand-alone Facebook agent to retrieve and process social media information by using XA. It collects the last updates of your Facebook friends and loads them in a xmunch-atomspace (XA):

facebook-agent with xmunch-atomspace facebook-agent with xmunch-atomspace

To use it, once you have installed the Ubigraph package and the Ubigraph server is running (according to the configuration section above) you have to:

  1. Clone the facebook-agent project from GitHub:

    git clone https://github.com/dgrmunch/facebook-agent.git

  2. Execute it by using Maven:

    mvn spring-boot:run

  3. Open the web app that has been deployed in http://localhost:8080

  4. Follow the steps of the web to log in Facebook.

The last activity of your friends' feed will be loaded on the Ubigraph black window. You will have a persistent copy of that information in the file persistence.xa.

NOTE: Remember that persistence.xa is written in xa-language, an interoperable human and machine understandable language. The content of this file can be imported in any instance of XA and to JSON by using the AtomSpace REST Parser.


Disable 3D visualization

To execute XA without 3D visualization you have to set the AtomSpacesParam VISUALIZATION to FALSE. To do that, open the xmunch-atomspace/src/main/java/com/xmunch/atomspace/Main.java file and find this sequence of code:

atomSpaceParams.put(AtomSpaceParams.VISUALIZATION.get(),GlobalValues.TRUE.get());

Then, replace TRUE with FALSE, recompile the project and execute it. If you do this then you won't require the Ubigraph server.

xmunch-atomspace xmunch-atomspace xmunch-atomspace xmunch-atomspace xmunch-atomspace

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.