Close

Ivan's Brainz

A project log for Ivan the Teambuilt Robot

An e-NABLE robotics project to give hands to those without use of their hands. Designed with your help.

les-hallLes Hall 09/15/2015 at 08:180 Comments

I have made two steps forward in the work of giving Ivan some "Brainz". The most significant of the two is getting Bowler Studio up and running plus delving into it slightly, and the least significant of the two is a little side experiment that I did.

Since it will take at least a week to get my DyIO for use with Bowler Studio, I am using the old school technique of controlling an Arduino from Processing, thereby turning the Arduino into a physical I/O unit for the Processing program. I put an LED and a CdS cell (light detector) on the Arduino's circuit board, with the LED close to and / or leaning over the CdS cell. This allows Ivan to control the LED's brightness with PWM (Pulse Width Modulation) and detect the LED's brightness at the same time.

For Ivan's Brainz I wrote a fully interconnected neural network with one output neuron (the LED) and one input neuron (the CdS cell). Ivan can have anywhere from 2 to 1024 neurons before the computer gets painfully slow. At 1024 neurons, each computational cycle is slow enough that the rotation of the visualization of the neural net is kinda smooth to the eye. At smaller sizes the rotation is quite smooth.

Note that at 1024 Neurons we have 1024 Weights * 1024 Neurons = 1 MegaWeights. That's a lot of computation to do in real time yet this Mac running the new blazingly fast Processing built on Java is up to the task. Here is a photo with 1024 Neurons:

Really Les? 1024 fully interconnected neurons to control one LED, really? OK it's overkill, lol! So here is Ivan's Brainz with 16 neurons and weights illustrated:

In these photos the input node is green and the output node is red. The net is trained without correction, meaning that it is kinda not so smart. That's just for now and soon I will add training such that Ivan learns to blink his LED. I will do that by adding a training multiplier which is large when Ivan's green node goes high and low in some way such as sinusoidal.

There is a lot more detail to what's going on such as the sigmoidal transfer function of Ivan's neurons, the random initialization, and thingies like that but I won't get into too much detail. Suffice to say that before long I will have this setup controlling Ivan's rotating base and there will be some objective function and Ivan will learn to do that as well.

As to Bowler Studio, I have gone through three or for of the many tutorials and found them to be quite excellent in their simplicity of explanation and detail of example. At first Bowler Studio would not run on my Mac but within half a day (it was late) @Kevin Harrington responded to my message with a fix. He has helped and / or advised a few times since than and I'm happy to have his support. In fact, when I eggsplained to Kevin that I wanted to build a machine intelligence for Ivan, Kevin went out and found the WalnutIQ library which I think I'll use and also some others, plus added cloud support so we can put Ivan's Brainz on Google's cloud servers. Then, by parallelizing Ivan's Brainz, Ivan can possibly get super smart.

That's actually doable on a budget because Google does per minute billing of it's cloud services. So we can set up a super cluster and use it only for a few minutes or half an hour or whatever (there is some lower limit no doubt), and have Ivan learn at a rapid pace and interact rapidly then analyze the results later. Plus Ivan can have less Brainz for longer intervals on the same budget. Googles' fastest "high compute" server costs only $76.77 per month. That's full time. 30 of them for one day is the same price. I can afford that on my shoestring budget, so once we get Ivan all coded up and tested, we can all interact with him virtually and physically!

Oh and by the way Ivan can have more than one body. So if you choose to, you can build a pphysicality for Ivan also. I say "Go for it!"!

Les

Discussions