Monday, July 29, 2013

Rat Brain

I've been working on a Neural Network I like to call the Rat Brain.  In the past, I've played with neural networks that used forward propagation and although they work, they require an insane amount of training to properly weight all of the nodes.

I read a book by Jeff Hawkins called On Intelligence and I wanted to see if I could write an AI that learns more like a human than a pre tested neural network.  So, the Rat Brain Project was born.  Not this one, but I thought I would reference it because this is actually a Rat Brain driving a car.

The first test is to have an object (Blue Box) on a rope that is of fixed length.  There is a hunk of cheese (yellow box) on one of the sides of the rope.  The robot brain must learn to go to the cheese.  The interface looks like this:
  1. Distance to one of the sides.
  2. Hunger (Internal Desire)
  3. Left Vision: (True or False) Can I see the cheese on the left side?
  4. Right Vision: (True or False) Can I see the cheese on the right side?
  1. 00: Stop
  2. 01: Right
  3. 10: Left
The rat can definitely get the cheese.  Right now I have successfully been able to have the brain map the nodes as designed.  I haven't added any of the other inputs yet, but it will go back and forth forever.  This is the node tree that is generated:
At any time during the test I can hit the pause button and look at the node tree.  I'm also generating extensive logging.

So, this may look like a lot of nodes but there are really only three memory nodes (Orange circles).  The inputs are the first circles on the top, and the single output (O1) is on the bottom.

My future tasks will be to introduce the additional inputs and problem solving.  I'm also missing degradation of the connection strengths and nodes over time.  The system should store sequences into short term memory but release that information if a better path is learned.  There is a lot of work to do still but it is a fun project.  If anyone is interested in talking shop with me let me know and I can start posting the algorithms and node designs.

Happy Coding!

Friday, April 19, 2013

From .NET to Java

I started studying code development in Java using Eclipse and decided to blog a little on my experience.

So far I have built three different applications. 
  1. A console application.  I followed the tutorials here:
  2. A Hello World GUI Application.  Using Swing, I was able to plop a label and a button on to a form in the designer.  It was very easy to figure out how to hook up an event and set the label text when clicking the button.  But, I have to say that this designer was pretty bad.  So if you know of a better one please let me know in comments.
  3. A Servlet: I found a video that walked me through adding a servlet and choosing an Apache Tomcat v6.0 virtual server.  This part I really liked.  Writing the servlet to return some html was pretty simple.  There seems to be a lot of files that were created so I will begin to go through their functions.
Next Steps:
I will begin looking into deploying my servlet and looking at JSP.  After that, I'll try to hook up my sample to a database to push and pull some data.

I will start blogging some of the tips that I learn along the way. 

Happy Coding!