Wednesday, July 16, 2014

A leap in artificial intelligence ? Building 2

Building Gaia - Tools and Environment


The past few days were funny. And with a big surprise. And one two blames for myself.

Working on the development of Gaia is a nice challenge. In more then one aspect.
I promised to keep you up updated on the progress, so here is her second round.


Gaia's tools.


Her toolkit has been generalized and the individual tools can be chained in tool sequences.

Gaia's toolkit and examples of tool sequences.

She can combine whatever tools she wants in whatever length. 
After running a sequence she will receive an evaluation as the output of running the sequence.
As you can see in the figure (T-L-F example) , she can apply a sequence more then once before receiving the evaluation.

There is still some work to do on the evaluation functions as they are extremely important for what and when Gaia is learning.

A reference to the sequence, the evaluation and some contextual information is stored in her experience centre.
Her mechanism to exploit her learning process, as it is registered by the experience centre, still needs some improvements.

Most of the tools can receive one or more configuration parameters, another choice for our learning A.I.

If she creates a tool sequence that doesn't make sense at a particular moment in time, running it will simply return a very bad evaluation. For example using a memory manipulation tool on an empty memory makes no sense. Applying the tool later in time does.

And of course other tools are on their way.



Environment

For developing Gaia, to see when she is doing what, several tools are necessary.
The first specialized tools are shown in the picture below.

Gaia's environment tools so far.

CouchDB is used to store her memory and experience center in a persistent way so it can be reloaded at any time. Both take the form of JSON documents.
As CouchDB allows to retrieve old revisions of documents, it is possible to go to an old combination of memory and experience center and restart from that point. 
Extremely practical in case of unintended changes due to a developers experience that was not so successful.

Every change in her memory is also send to the mutation server that stores them for possible later playback. 
Using the efficient websocket protocol enables a real-time visualization of what's going on.

That the real-time viewing and the playback possibilities are very useful was shown today.


Visual bug discovery


The video below is an camera registration of the real-time display.
(Using a direct screen registration requested to much clock cycles.)

When running a test run with Gaia I was looking at how her memory was evolving over time.
Suddenly I was triggered by something unexpected.

Snapshot of the real-time memory mutations

First let me explain what you in these snapshots and video.

Every dot in the image is a pattern in memory that has been modified since this tool was listening to the mutations.
This run started with some 76 000 patterns in memory which are not shown.

The graphical tool used let new patterns appear in the center. New for the graphical interface, not necessarily for Gaia.
As time goes on these early patterns move to the outside.

The bright spots are patterns that have recently "fired". If they are in the middle they are new, if they are not it was an existing pattern in memory.

The geometric figure in the middle is just an artifact of the graphical tool. It has nothing to do with the memory of Gaia. The tool can't simply keep up with the high speed of Gaia.

In the playback tool, things are slowed down on purpose, so the graphical tool has enough time to display everything.
The picture below shows approximately the same moment in time.

Snapshot of the replay of memory mutations.


Interpretation of the visualizations

In the video and snapshots you can clearly see two rings of bright spots on the outside.

All the spots in a circle have fired for the first time (for the graphical tool) at approximately the same time. They appeared in the middle and have all gradually moved to the outside afterwards.

It is most unlikely that a same set of patterns (same "ring") will fire again. 

The only valid explanation is that the same text is seen a second time.
And as I wrote in a previous post this shouldn't happen.

Triggered by this, I discovered that there was a bug in the file selection section that might re-use a file even if it had already been submitted to Gaia.

Another thing that can be seen in the video is that this same phenomena appears several times.
If it would have been just another file that is read for the second time, the patterns would appear in circles also, but not the same ones.
Which is the case.

And yes there was another bug causing a stream to be read again instead of moving forward in the stream.

A question you might ask:

Why is there a dark band between the two bright ones? Shouldn't there be one bright band for each file that is read a second time?

Well, not necessarily.

As explained above she has several tools she can use.
Each bright band is a phase in which she uses a tool sequence that consumes the sensor byte stream.

The patterns in the dark band between them are created during a phase where a series of memory operations modify the patterns, but nothing is read. And they will only occasionally fire when she continues reading. 


The video below shows a part of a second identical run, this time with a video recording.
To realize an identical run needed some manual interference in Gaia's functioning, else it would not have been an identical situation.




Concluding I must say that the time invested in making this visualization has already proven to be worth it.
I'm not sure that discovering both flaws would have been easy without them.



Ronald Poell
2014-07-16





Support

If you like to support the development of this new kind of AI you can donate Bitcoins (or fragments of it) at

1HadqhKD5EdCDpTorgxP9P8akKqycEUkwk


When Gaia will be more mature and she will be able to interact with the environment she might also need to spent money. She is not there yet but Bitcoin donations for her can already been done at:

1PyyRd6k5kSuuErAnJNpvdoNCW5ZPgD9fb