Author Topic: Artificial Neural Network Robot  (Read 11193 times)

Offline jon

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Artificial Neural Network Robot
« on: December 26, 2010, 01:32:49 AM »
OK, I'm working  on building an irl biomorphic robot based using a cellular automaton simulating a neural network using a genetic algorithm to adjust the weights (design) of the network to facilitate learning. THAT was a mouthful

Here's a cut'n'paste from another forum which does not allow you to post in-progress projects, so here ya go:

"
Hello all,

This is a robot I've been planning for a while, but before I get started, I would like your input.

Since this is a complex project, it will progress in stages.
The software will initially consist of a 2-neuron braitenberg vehicle, learning optimal network weights through the use of a genetic algorithm. The genetic algorithm will test each neural network in real time by letting it control the robot, taking perhaps up to half an hour per generation as it tests each neural network individually for 5 minutes, evaluating fitness based on easily-defined measurements (such as an accelerometer, for example. see http://headphones.solarbotics.net/learnbot.html ). No processing will be done outside of the robot, such as on a supervising external computer. Once this basic scaffolding is complete, it should be able to be scaled up to a goal of about 30 neurons and numerous sensors, therefore achieving the same level of intelligence as a rotifer (a pond-dwelling multicellular protozoan). Because of this method of learning, a recurrent neural network is a viable option.

The current hardware I envision is a solarbotics scoutwalker3 base, a sumovore bs2 brainboard add-on, and either the spin stamp or the stamp stack 2p microcontroller ( http://www.hvwtech.com/products_view.asp?ProductID=565 ) . Although the spin stamp is a faster multicore processor, the ss2p has upgradeable eeprom (necessary for large ANNs) and is in-system programmable.

Here are some questions:

Which is better for an artificial neural network? The stamp stack 2p or the spin stamp?

Is a cellular automaton-based artificial neural network, such as brian's brain, a viable option? Rotifer CNS neurons are often bipolar, so the cellular automaton settings could be restricted down to a von-neumann neighborhood without much loss of realism. Would using a von-neumann neighborhood be less resource-intensive than a moore-neighborhood-based cellular automaton? What other changes to Brian's Brain, if any, would you recommend?

I want to be as realistic as possible since this is a project I am going to see through, so please provide constructive criticism. Thank you!

"

This was posted in a robotics forum, so I'll explain the non-alife-related jargon:

The spinstamp is a microprocessor based off of the propeller 9-core 32-bit 160mips robotics-oriented processor, programmable in C, Basic, Spin and assembly. See parallax.com

A link describing the less-powerful bs2pbb is provided. It features more memory and is in-system-programmable, a bonus for an ANN which takes up a lot of memory and could be hooked up as a slave to a better processor, like the propeller.

solarbotics.com provides the scoutwalker3 robot, which features a 4-neuron ANN and the ability to be hooked up to a parallax microcontroller (robotics processors are called a microcontroller in robojargon.)

After posting this I found an interesting cellular automata program which allows you to create your own CA rules.
 ( http://www.collidoscope.com/ca/ ) I was thinking I could use this to make a more advanced version of Brian's brain which more closely simulates an actual neural net.

A big problem with using a CA, though, is: how am I going to adjust "weights"? What will the weights even be in the CA... dynamic rule sets? Any ideas?

Anyway, happy holidays!!!!!
« Last Edit: December 28, 2010, 03:01:03 PM by jonlink0 »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: my biomorphic learning robot project
« Reply #1 on: December 27, 2010, 01:26:46 PM »
Don't know if we have any neural net gurus around.  The actual bots in Darwinbots are run with a simple stack based assembly language, so really light years apart from neural networks.

I'm not a super fan of neural networks either.  They're an interesting construct, but they do NOT model the way that the human brain actually works.  If they were called something less sexy like "cascading network" or something like that they would not be as popular as they are.  If you have a genetic algorithm culling neural networks then you're double especially approaching it from the wrong angle, since the ONLY strength neural networks have is that they're supposed to be somewhat self teaching and adaptable.

Also, if you're doing any sort of genetic algorithm, you will vastly increase the learning rate if you can simulate the robot's environment in code.  Actually having programs control the robot sounds fun, but it just means it's going to take FOREVER for the thing to work well.  If you can simulate it, you can throw thousands of generations of thousands of individual control programs at it.  And it parallelizes pretty well.  You could probably work it into some sort of OpenCL type thing and leverage the massive parallelity of graphics cards and really throw some computational resources at it.

it should be able to be scaled up to a goal of about 30 neurons and numerous sensors, therefore achieving the same level of intelligence as a rotifer
What makes you think that a 30 neuron network is as smart as a rotifer?  Moreover, what makes you think that more neurons are better?  Most things I've seen about neural networks indicate that there is actually an optimal network size based on the problem, and that more neurons are more often than not just as bad as not enough.  The neurons in some ways are like degrees in a best fit polynomial.  And like a best fit polynomial, more degrees/neurons just make the behavior more chaotic on the fringe of the problem space.

And in defense of rotifers, they are actually pretty intelligent.  If you actually dig in to a single bacteria cell, even, there is a LOT going on, with lots of clever machinery.  Just the fact that it can replicate itself is a HUGE engineering feat.

Is a cellular automaton-based artificial neural network, such as brian's brain, a viable option?
No.  Cellular automaton are cool, but they are more a curiosity than a practical solution.  They parallelize nicely, but I know of no high level construct (like a neural net, for instance)  that can be simulated with a cellular automaton that couldn't be simulated with less processing power without one. 

They make sense if you want to simulate something like a physical universe cheaply, since you're discretizing things, which computers like, but you also lose a lot of the complexity of actual physics and such, so even here it's a trade off.  So things they make sense for: simulating weather, erosion, etc.  Especially erosion, since it ties into heightfields for graphics rendering quite well.

...

It sounds like you have a bunch of cool constructs (robot, cellular automata, neural network, genetic algorithms), so you think you can stick them all together and get something even cooler.  But I don't think that's true.  It all seems aimless and directionless.

So let's start back at the beginning.  What's the actual goal here?  To build a program that can control any arbitrarily configured robot?  (adaptable) To build a program that can control a specific robot well?  To play around with neural networks?  Figure out exactly what you're trying to do and why, and you should be able to narrow down how best to get there.

Offline jon

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Re: my biomorphic learning robot project
« Reply #2 on: December 27, 2010, 04:59:33 PM »
The main goal of this project is to mimic biology, kind of like DB. If my goal was to make an obstacle-avoiding robot then I'm using a REALLY complex way to doing it...

The reason why I'm using a genetic algorithm on an ANN is to simulate species-level learning of complex behaviors. In a way, viruses and bacteria "learn" from their environment to replicate best, it's just that this learning is done outside of the lifetime of the organism. I'm basically using this evolution-based learned programming on an individual instead of a population.

Now, why do you say that neural networks do not imitate biology? I've seen some recurrent spiking neural networks that seem to be very realistic. I've also seen "advanced neural network-based research robots" that are glorified braitenberg vehicles though, so I do understand where you're coming from.
 
Also, I'm mainly interested in extra-cellular communication, since simulating all of the processes inside a cell is unnecessary and difficult. Although on a molecular level a rotifer is doing trillions of computations per second, if not more, the actual nervous system of a rotifer could easily be simulated with an advanced microcontroller.

Now, a cellular neural network, which is basically a cross between a CA and an ANN, might be more of what I was trying to get at, and is actually more biomorphic than both feedforward and recurrent neural nets (and of course a CA). Cellular neural networks also seem to have useful applications in vision processing, since they correspond well to the way the retinal ganglion cells of the human eye work for edge detection. (See http://en.wikipedia.org/wiki/Receptive_field)

After trying a few simulators, I've decided to go with this program:

http://www.ai-junkie.com/ann/evolved/nnt1.html

Since the source code is available, as well as a tutorial on combining genetic algorithms with neural networks to simulate a braitenberg vehicle (The first goal). In fact, if I wanted to complete phase 1 of the project, I could just copy the best evolved neural network into the robot microcontroller. Further modification of the program could make it use a population of one robot, etc...

I hope you don't mind me posting on something a little off-topic, since it isn't that related to DB, but I AM a fan of your work! Let me know if I am bothering you. And thank you so much for your willingness to help, I truly appreciate it. :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Artificial Neural Network Robot (name chg.)
« Reply #3 on: December 28, 2010, 01:45:18 PM »
Quote
Now, why do you say that neural networks do not imitate biology?

They were thought up at a time when little was understood about the brain.  We still don't understand all that much about the brain.  Specifically, there is some evidence that neurons themselves are actually rather sophisticated computing devices.  The simple gate-like nodes in the neural network don't necessarily reflect that.  Really, ANN aren't that interesting compared to other pattern recognition and learning algorithms, but because it has a sexy name, it gets lots of undue attention.

In that a recurrent neural network is Turing complete, I guess you could argue that you just have to take lots of nodes in the ANN in clusters to represent biological neurons (a neural net of neural nets or something like that), but I still think this is a case of gathering a dozen fake plastic trees and calling it a forest.

Second, there are exactly 0 problems (I know of) where ANN outperform other dedicated solutions for a given problem.  Their "strength" is that they can solve a wide variety of problems... badly.

For instance, I've been playing a lot of go in the past year.  The top computer programs still can't beat top level human players.  But they're still pretty strong.  Are these top level programs ANN?  No, they're actually monte carlo simulations.  They play millions of provisional games of go from the current position with fairly random moves and play the move that has the best payback for some given weighting of the imaginary games.  There are lots of other clever techniques like that for every single problem domain I know of.  You have to assume that the brain isn't stupid enough to rely on a bad general purpose algorithm when it could use sophisticated dedicated solutions to various problems.

So it seems incredibly unlikely to me that our brains are actually modeled entirely similarly to a ANN.  Maybe the part of our nervous system that feeds sensory inputs and outputs to and from the brain up through the brain stem works like that.  But the brain "proper" is almost certainly doing something else entirely.  Or think of it this way: if it was a ANN-type thing, wouldn't it make more sense to spread the processing power out along the entire body?  Instead of centralizing it in a central, easy-to-injure location?  That's the raison d'ĂȘtre of the internet, for instance.  You could make an argument for reaction times, etc. for centralizing the brain, but I still think the whole ANN idea is missing the point by a wide angle.  I think that modern multicore CPUs (with pipelines and caches and such) probably more closely models the way the brain works, not because it was trying to, but because it's solving practical general-computing problems which are similar (after a fashion) to the problems that the brain has to solve.

I think the neurons in the brain are like 1 khz processors or something like that.  Nothing to sneeze at!  For some rough numbers, take the estimated processing power from here and the number of neurons from here.  I get 10^14 IPS (simple instructions per second) and 10^11 neurons, which give about 1 khz per neuron.  My guess is that individual neurons do a great deal of work, like a beowulf cluster.

Quote
I hope you don't mind me posting on something a little off-topic, since it isn't that related to DB, but I AM a fan of your work! Let me know if I am bothering you. And thank you so much for your willingness to help, I truly appreciate it.

Not at all.  I'm sympathetic to wanting to discuss something that other people either don't understand or don't care about :)  Don't let my grumpy sour-puss attitude put you off.

Offline jon

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Re: Artificial Neural Network Robot (name chg.)
« Reply #4 on: December 28, 2010, 03:00:18 PM »
Yes, I agree that "Artificial Neural Network" is a bit of a misnomer.  Especially if you look at BEAM robots, microcores and bicores have very little in common with biological neurons, even though they are called "nervous nets" and "neural nets". I'll just call them cascading networks if you want, to show the name isn't clouding my judgement. The important thing is how all these technologies/curiosities/whatchamacallits are similar; they exhibit complex behavior derived from simple rules, without the behaviors being pre-programmed.

I'll just come out and say the goal of the project: To create "interesting" behavior, without it being pre-programmed. Specifically, combine various non-symbolic A.I approaches into a coherent unit. I'll admit some of the ideas I'm using (single-organism evolution, digital cellular automata) are stretching the original "biology-based" goal, but the true purpose of creating novel behavior and "order out of chaos" is kept. Using monte carlo simulations and other completely artificial methods of automated problem solving are more along the lines of symbolic AI.

You seem to be caught up on how inefficient and time-consuming it is to use all these weird technologies, but the point is not efficiency. The point is making a learning robot from the most simple building blocks possible. The less intelligence you program into it, the more learning it is capable of. The more simple the building blocks, the more impressive complexity is when it arises. I'm not adding cellular automata to the mix to further obfuscate the design, I'm adding them because they are even more simple than cascading networks while still generating novel behavior.

Offline jon

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Re: Artificial Neural Network Robot
« Reply #5 on: December 30, 2010, 02:24:19 PM »
Here's an example CNN circuit controlling a phototropic obstacle-avoiding robot. The "+" neurons constantly send action potentials, causing the motors to move when there is no sensory input. As an example, the robot moves forward until it hits something on the right side. The right contact switch activates, sending an AP to several interneurons which, ultimately, activate a neuron that sends an inhibitory AP to the left motor, causing the robot to turn left. This whole process takes 4 cycles. Similar circuits cause it to follow light. Note some interesting behavior: the robot moves forward in pulses, because there are gaps between action potentials caused by the neurons' refractory periods.

Offline jon

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Re: Artificial Neural Network Robot
« Reply #6 on: December 30, 2010, 03:32:30 PM »
This is the paper off of which my CNN circuit is partially based off of.


---

EDIT: Here is a video of a robot controlled by a genetic algorithm with a population of one.


http://www.youtube.com/watch?v=KHV7fWvnn_0&feature=related


--


EDIT2: oops, wrong youtube video, I meant this one:

http://www.youtube.com/watch?v=68AR5WOUxeg&feature=related
« Last Edit: December 31, 2010, 01:00:29 PM by jon »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Artificial Neural Network Robot
« Reply #7 on: December 31, 2010, 12:19:03 PM »
Houshalter has been there. :)

Offline jon

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Re: Artificial Neural Network Robot (name chg.)
« Reply #8 on: January 02, 2011, 11:42:21 AM »
Quote
Now, why do you say that neural networks do not imitate biology?

They were thought up at a time when little was understood about the brain.  We still don't understand all that much about the brain.  Specifically, there is some evidence that neurons themselves are actually rather sophisticated computing devices.  The simple gate-like nodes in the neural network don't necessarily reflect that.  Really, ANN aren't that interesting compared to other pattern recognition and learning algorithms, but because it has a sexy name, it gets lots of undue attention.

In that a recurrent neural network is Turing complete, I guess you could argue that you just have to take lots of nodes in the ANN in clusters to represent biological neurons (a neural net of neural nets or something like that), but I still think this is a case of gathering a dozen fake plastic trees and calling it a forest.

Second, there are exactly 0 problems (I know of) where ANN outperform other dedicated solutions for a given problem.  Their "strength" is that they can solve a wide variety of problems... badly.

For instance, I've been playing a lot of go in the past year.  The top computer programs still can't beat top level human players.  But they're still pretty strong.  Are these top level programs ANN?  No, they're actually monte carlo simulations.  They play millions of provisional games of go from the current position with fairly random moves and play the move that has the best payback for some given weighting of the imaginary games.  There are lots of other clever techniques like that for every single problem domain I know of.  You have to assume that the brain isn't stupid enough to rely on a bad general purpose algorithm when it could use sophisticated dedicated solutions to various problems.

So it seems incredibly unlikely to me that our brains are actually modeled entirely similarly to a ANN.  Maybe the part of our nervous system that feeds sensory inputs and outputs to and from the brain up through the brain stem works like that.  But the brain "proper" is almost certainly doing something else entirely.  Or think of it this way: if it was a ANN-type thing, wouldn't it make more sense to spread the processing power out along the entire body?  Instead of centralizing it in a central, easy-to-injure location?  That's the raison d'ĂȘtre of the internet, for instance.  You could make an argument for reaction times, etc. for centralizing the brain, but I still think the whole ANN idea is missing the point by a wide angle.  I think that modern multicore CPUs (with pipelines and caches and such) probably more closely models the way the brain works, not because it was trying to, but because it's solving practical general-computing problems which are similar (after a fashion) to the problems that the brain has to solve.

I think the neurons in the brain are like 1 khz processors or something like that.  Nothing to sneeze at!  For some rough numbers, take the estimated processing power from here and the number of neurons from here.  I get 10^14 IPS (simple instructions per second) and 10^11 neurons, which give about 1 khz per neuron.  My guess is that individual neurons do a great deal of work, like a beowulf cluster.

Quote
I hope you don't mind me posting on something a little off-topic, since it isn't that related to DB, but I AM a fan of your work! Let me know if I am bothering you. And thank you so much for your willingness to help, I truly appreciate it.

Not at all.  I'm sympathetic to wanting to discuss something that other people either don't understand or don't care about :)  Don't let my grumpy sour-puss attitude put you off.

I don't know if I mentioned this yet, but thank you very much for your help! I really appreciate it.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Artificial Neural Network Robot
« Reply #9 on: January 03, 2011, 12:50:02 PM »
That's about all the feedback I can give you, btw.  You're well into territory I haven't really explored, let alone thought about.

So best of luck, let us know how it goes.

Offline jon

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Re: Artificial Neural Network Robot
« Reply #10 on: January 03, 2011, 12:54:49 PM »
I'll update you guys in about a month, or as soon as I have pictures, whichever comes first ;)

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Re: Artificial Neural Network Robot
« Reply #11 on: January 07, 2011, 05:11:49 PM »
Houshalter has been there. :)

Yah. I still think it's a cool idea, I just don't know how and don't have the patience to try :(

But he is way ahead of what I tried though. Good luck.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Artificial Neural Network Robot
« Reply #12 on: January 22, 2011, 11:48:08 AM »
Quote
They're an interesting construct, but they do NOT model the way that the human brain actually works. 

Quote
To create "interesting" behavior, without it being pre-programmed.


Just some comments:

The way I see it, I agree with Numsgil that a brain can be modeled w/o using neural networks. I believe a brain is like a really large computer program where some parts are more likely to morph then others.

If you just give a robot to do random stuff (Either it is a Neural Network or Code Based) all it will do is random stuff.

The beauty of the human brain is the balance of what parts of it are allowed to morph  and what are not. When that system gets unbalanced people get psychiatric disorders.

Here is an example of the 'pre coded' parts of our brain:

If you point to a monkey, he will still go for the wrong trey of food 50% of the time.

If you point to a dog, it is down to 5%

If you point to a human baby it is down to about 2%

I seen a documentary on this, so my numbers may be a little off, but it should illustrate the concept.

Offline jon

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Re: Artificial Neural Network Robot
« Reply #13 on: January 22, 2011, 12:21:03 PM »
Hello botsareus,

I agree that there are definitely some areas of the brain that are pre-coded. I also agree that it might, one day, be possible for us to make an artificial consciousness without using neural networks. However, currently the brain is not understood well enough for us to make such a program, and therefore I'm trying to avoid using non-biomorphic means.

It's hard for me to describe the goal of the project, because I just end up saying a different thing each time. But the best definition is that it is a research platform for different Alife technologies.

That said, it won't really be programmed to do random stuff. It will be programmed with a new goal for each experiment.

In general, the main non-morphing "program" is the hard-coded microcore in the scoutwalker, which, through a direct connection to the spinstamp, functions as a central pattern generator.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Artificial Neural Network Robot
« Reply #14 on: January 22, 2011, 12:24:48 PM »
Quote
It will be programmed with a new goal for each experiment.

Ah, nice.  8)
« Last Edit: January 22, 2011, 12:26:41 PM by Botsareus »