Reply to topic  [ 5 posts ] 
Genetic Algorithms and Neural Nets 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
Well, the other day I had an idea to make something at work work better.

It involved neural nets (lol, I like to go for the easy things).

Anyway, I started today by teaching myself genetic algorithms. It's a fairly trivial example as all it does is find how to achieve a target value by using single digit numbers and the standard operators.

Got that working this morning.

Now I'm working on the next part. I had the idea to do a talk on it at work so I came up with an idea that would work well with it.

I'm creating a neural network (within an iPhone app) that I'm going to use genetic algorithms to "teach" it how to recognise faces :D Well, to begin with it's only hand drawn "stick-man" faces on a 64x64 "screen".

It's actually not as hard as I always used to think it was.

I might write it up on my blog once I've done it. Essentially you take the "value" (1 or 0) from each pixel of the image and input it into each neuron in the first layer of the network. Each neuron then multiplies each input by a weight and adds them all together if this is higher than the threshold value then you output a 1 otherwise a 0. You take these outputs and put them through another layer using the same maths. Then you pass it in to the required number of output neurons and the output of that is your answer. (i.e. 1 = face, 0 = not a face).

Anyway, I'm currently building the network. The hardest part is setting up the reusable stuff for the first time.

Looking forward to getting it finished though :D

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Fri Oct 12, 2012 5:45 pm
Profile WWW
What's a life?
User avatar

Joined: Thu Apr 23, 2009 6:27 pm
Posts: 12251
Reply with quote
Have you seen this
http://news.dice.com/2012/08/23/generat ... thmically/

And a live demo here
http://iobound.com/pareidoloop/

You get results like this
Image

_________________
All the best,
Paul
brataccas wrote:
your posts are just combo chains of funny win

I’m on Twitter, tweeting away... My Photos Random Avatar Explanation


Fri Oct 12, 2012 6:21 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
That's very cool. Had a look at a few of them. The results vary a lot.

However... BOOM!

Neural net is working!

I've not got any training going through it at the moment it's just a single neural net that analyses a random array of 4096 "pixels".

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Fri Oct 12, 2012 7:42 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
Fogmeister wrote:
Essentially you take the "value" (1 or 0) from each pixel of the image and input it into each neuron in the first layer of the network.

So there's 2^24 interconnections between layer? That would take a while to do on a wire-wrap prototyping board if you were doing it the old way with comparators and resistors :D

Be interesting to compare the "intelligence" to biological examples. That's the same number of "brain cells" as a slug, but the "synapse" count is much higher up the scale - nearer that of a fly.

http://en.wikipedia.org/wiki/List_of_an ... of_neurons

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Sat Oct 13, 2012 6:38 am
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
https://www.coursera.org/course/neuralnets

Might be of some interest :)

There are more on http://www.openculture.com/free_certificate_courses but that seemed the most suitable)

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Mon Oct 15, 2012 5:01 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.