Artificial neural net on a prop?
m00tykins
Posts: 73
in Propeller 1
Hey all,
Ive been gone a while, putting software on hold while I'm working on a robot base for my next propeller project. I'm working on a simple walking bugbot with a "peripheral nervous system" that would handle basic functions, like moving the legs correctly, to leave higher-level functions to be handled by a prop/other mcu, like deciding where to go, in a horse-and-rider configuration. If you're interested I'm using BEAM nervous nets for those low-level functions.
Anyway, I'm still not done with the base (I thoroughly melted a micro servo the other day trying to solder a five-wire cable onto the motor and potentiometer leads lol) but once I've gotten it working the ultimate goal was to have a prop brain controlling it, which might be able to learn or at least give it some kind of bug-like intelligence. Which brings me to my question here... has anyone tried making a neural net on the propeller? I don't mean a feedforward perceptron chain, I mean an actual, biologically-inspired spiking neural net with feedback and connections between neurons that can be individually strengthened or weakened...
Has anyone attempted something like this? I saw humanoido's horribly expensive big brain thing, but did anyone actually program the beast? Has anyone made a neural net, regardless of type, actually run on the prop?
Thanks everyone!!!ļ
Ive been gone a while, putting software on hold while I'm working on a robot base for my next propeller project. I'm working on a simple walking bugbot with a "peripheral nervous system" that would handle basic functions, like moving the legs correctly, to leave higher-level functions to be handled by a prop/other mcu, like deciding where to go, in a horse-and-rider configuration. If you're interested I'm using BEAM nervous nets for those low-level functions.
Anyway, I'm still not done with the base (I thoroughly melted a micro servo the other day trying to solder a five-wire cable onto the motor and potentiometer leads lol) but once I've gotten it working the ultimate goal was to have a prop brain controlling it, which might be able to learn or at least give it some kind of bug-like intelligence. Which brings me to my question here... has anyone tried making a neural net on the propeller? I don't mean a feedforward perceptron chain, I mean an actual, biologically-inspired spiking neural net with feedback and connections between neurons that can be individually strengthened or weakened...
Has anyone attempted something like this? I saw humanoido's horribly expensive big brain thing, but did anyone actually program the beast? Has anyone made a neural net, regardless of type, actually run on the prop?
Thanks everyone!!!ļ
Comments
so yes - tell a bit more on how you use BEAM
what size of NW and what update rate do you envision?
Implementing straight forward NW as an integer simulation should not be complicated.
You want something to be able to train or learn from experience?
By dynamically adjusting the connection factors?
Fastest would be to write the core in PASM.
But we could easily start with a simulation e.g.in TACHYON since it is interactive,
nice to play.
Anyway, back to the prop: I'd like to get it to learn, yes, possibly using things like charge status and acceleration for "pain"/"pleasure".
As for the technical implementation, I'm thinking something similar to a cellular automaton, where neurons can only connect to their nearest neighbours. And as you might already be able to tell, I don't mind greatly over-simplifying biology, so a simple addition of inputs, with inhibitory inputs being negative numbers and excitatory being positive, would work fine. And a network in the 10-100 neuron range is my current complexity estimate.
However, none of this is set in stone, and the main point here was just to see what anyone else has *already* done, and what suggestions other more experienced experimenters (such as yourself) might give.
PS: Sorry about the belated response, I'm moving at the moment... you know how it is :P
http://www.movidius.com/solutions/machine-vision-algorithms/machine-learning
"The world's first discrete deep learning accelerator. A standalone, ultra-low power neural network compute accelerator inside a standard USB stick. See it first at the Embedded Vision Summit in Santa Clara, CA, May 2-4."
Cynthia was a robotic snail that would retract her head into her shell if you touched her shell.
But, if you touched her shell frequently she would "learn" that you are friendly and not retract her head so much.
But then after a time of no such affection she would forget, and retract her head again if you touched her shell.
Of course Cynthia's "learning" was just the charging of a capacitor when she was touched, which eventually inhibited the head retraction response. The capacitor then discharged if there was no touch input and she was back in "panic mode".
It's amazing what complicated behaviours you can get out of really simple circuitry.
Cybernetic Cynthia was a robot. Therefore a machine. Machines are traditionally female. Like ships and trains and such.
My father was Czechoslovakian. I never learned the Czech language. When he spoke English, even after thirty years in England, everything was a "he" or a "she". I never managed to figure out by which rules inanimate objects were one or the other.
In Finland all people are "han". No way to tell female from male.
It's all very confusing. Especially as it seems that now a days half the humans don't know what gender they are.
Whoa whoa whoa... Deep learning? Machine vision? Heck no... I'm not making an AI. Its more like Alife. A robot with self-sustaining and adaptive behavior. I don't need it solvin no rubiks cubes. Though multi-core CPUs are great at simple parallel AI/Alife tasks, like genetic algorithms, neural nets, cellular automata and the like.
Has *nobody* ever tried to make a neural net or any sort of Alife or AI algorithm on the prop? I'm sure someone must at least have made a chatterbot on the prop somewhere...
In addition I've played with NN's trained on my PC with FAST 2.2 which can generate C-code for the forward pass, example below.
Have had some thoughts about using this on a ActivityBot with Ping-sensor and/or PropCam to use for navigation, but never really got to it yet.
BTW It's a pity there's no C-code around for the PropCam (at least that I'm aware of), and mixing Spin and C is not completely straightforward. I have tried both spin2cpp and the spinwrap(?) software but not been been able to get working C-code out of the Spin-code available for PropCam. Less complex Spin-code has typically been ok though.
A new version of spin2cpp has been released, and there is a an interactive program now, too. I've used that in the past few days, converting OBEX Spin programs to C without any difficulty.
forums.parallax.com/discussion/164102/compiling-a-spin-program-on-the-pc
That looks like a feedforward neural net. So not really what I'm looking for, but a good start. I'll be using that code as a reference.
Great, I'll take a look at it, thx for notifying me.
The embedded code is indeed only the forward pass, i.e. 'run time code'. The back-propagation training happened on a PC with the FAST tool and then C-code was generated once the training met the preset goal. The run time code is then run on a Propeller.
The attached code again is a back-propagation NN where also the training can be done - albeit slowly - on a Propeller
The problem is, that neural net is nothing like biology. Even worms don't use a feedforward neural net with backpropagation :P
The most biologically-realistic, simple "neural net" I've found is Brian's Brain/other miscellaneous cellular automata. By restricting cells to a moore/von neumann neighborhood you can implement neural nets with feedback *without* enormous overhead.
But, I'm starting to think the propeller might not be the best fit for this. Sure, it comes with 8 cpus, but I need lots of low-performance CPUs more than I need 8 big ones.
Maybe using 16/32 picaxe 08m2 cpus would work better for my purposes. They're tiny, easily programmed, and can all fit reasonably well on a single piece of perfboard. And inter-processor communication isn't a big concern since using cellular automata means each cpu would only need to communicate with 4/6/8 other cpus at most.
Also, @MJB I'm still looking forward to your input
I don't get your thinking here. Wouldn't you have exactly the same problems with 8 smaller processors on top of having to add software (and possibly hardware) for them to communicate with each other?
on whatever hardware setup is fast enough.
If you have a ms update rate you can run lots of processing in between on 8 x 80MHz 32-bit COGs. Slow 8-bitters will probably not give you a lot of benefit.