Jump to content


Learning AI


28 replies to this topic

#21 NomadRock

    Senior Member

  • Members
  • PipPipPipPip
  • 785 posts

Posted 10 November 2004 - 07:59 AM

These are some classic examples:

Optical character recognition.
Voice recognition.
Facial recognition.

starting to see the pattern?
Jesse Coyle

#22 ShadowHawk

    Member

  • Members
  • PipPip
  • 47 posts

Posted 10 November 2004 - 09:16 AM

Yes that are indeed nice examples but not that easy to make a program for :(.
It gets harder if u want a simple program that uses a NN to do stuff since most problems involve a lot of coding even before u start putting the NN inside.

#23 NomadRock

    Senior Member

  • Members
  • PipPipPipPip
  • 785 posts

Posted 10 November 2004 - 01:59 PM

Ok, here is an easy starter for Optical character recognition.

Define your input as 8x16 bits. Each bit corresponds to either a white or black pixel. Thus you have 128 input nodes. For output nodes you could have one for each character you will use, or simply 8 nodes representing the ASCII bits. I suggest you try it both ways.

Then grab yourself a 8x16 font (there are many) and train the thing. Once you are done test it on normal input. Also try changing some pixels, and notice how it still gets them mostly right. Now try combining two characters, and notice how it gives a .5 for both of them (if you use the first option of outputs)

Now allow greyscale input.

Now allow larger more general input and scale it down yourself using a good filter before running it through the net.

Now write a program that breaks an image up into rows and columns and runs each sector through the net and see if you can decode in image containing text into a text file.

See if you can write a program that lets you write on the screen with your mouse one character at a time, and feed the scaled results through your net.

Now it isn't all that difficult is it?
Jesse Coyle

#24 ShadowHawk

    Member

  • Members
  • PipPip
  • 47 posts

Posted 11 November 2004 - 10:53 AM

Well they are not really hard but it is a lot of coding and debugging. And determine the number of hidden layers and nodes in the layer is not trivial either.
It is just not a program u can make in lets say 16 hours or something and i was looking for a program that could be made verry quick that i could verry simply test and even work out on paper ( for debugging ).
Im in a fulltime job and i dont have much time for programming at home :( so i want small simple things.
But i might start on your idea it sounds not that hard.

#25 ciri

    New Member

  • Members
  • Pip
  • 8 posts

Posted 11 November 2004 - 02:21 PM

If you make any progress make sure to post pseudo or normal source codes :)

#26 ShadowHawk

    Member

  • Members
  • PipPip
  • 47 posts

Posted 11 November 2004 - 03:47 PM

Well if u want i have a complete set of sourcecode for a NeuralNet that can be generated from a genome. The only part missing is the generation of the genome but it is a lot more then i can post here.
If you want i can see if i can get from my laptop to my internet PC and mail it to you the code is not that bad and little documented.

#27 sumedhs

    New Member

  • Members
  • PipPip
  • 13 posts

Posted 13 November 2004 - 01:58 PM

NNs & GA is a good combination. Infact competitive learning or Darwinizm gives good & fast results. However there are some inherent problems that I faced while doing a projet which implements evolutionary NNs (Or NN + GA).
GA works on the principle of making the strong stronger & eliminating the weak. Now as for NNs; as rightly put by most; NN is a blackbox, you can never know why it behaves the way it behaves, just by looking at it. In fact you cant even know what it does, unless somebody tells you about the specifications.
Thus we can weigh or judge an entire NN (as a whole) for its strengths as compared to other trained NNs. Then maybe use GA for picking the strongest & mutation or crossover. But my point is that its very difficult to judge that what part of a perticular NN is the stronger one & what part is the weaker one. In other words what is it that is making the NN strong (in the gameplay) cannot be easily detected.
Hence if you consider a GA approach where each NN is a chromosome then its possible to find out how good the entire chromosome is.. but its very difficult to find which part of that perticular chromosome is stronger (or is making the chromosome stronger). In conventional GA if you want to do a crossover / mutation you will want to identify that part in a chromosome & make it better also identify the weaker part & replace it or make it better too. But this is not easily possible in NN + GA.

Just a passing thought. But let me clear myself. Inspite of this problem, NN+GA is a very good approach to solve the set of AI problem (that its meant for).

#28 ShadowHawk

    Member

  • Members
  • PipPip
  • 47 posts

Posted 13 November 2004 - 05:22 PM

Well that is the problem but it will be hard to compare 2 NN when they are not the same. I was ( time constraints froze the project :( ) implementing a NN with GA that will just create the NN even adding neurons and connections between them.
I have not got to the point of really testing all of it so the problem could emerge in my project as well.
But u dont want to optimize 1 neuron of the NN since u want a global optimalisation not a local one. If 1 neuron gets improved you can destabilize the entire NN and just end up with a NN that is actualy worst then the original one.

Sorry if im not clear i cant seem to find the correct words sometimes.

#29 sumedhs

    New Member

  • Members
  • PipPip
  • 13 posts

Posted 15 November 2004 - 07:50 AM

That is very correct ShadowHawk!
You will not want to optimize a single neuron in an NN but maybe you have streams on Composite NN. Like say for example you have one NN that plays defensive strategy, other NN that plays attacking strategy & you form a composite NN at the top of both the NNs which will decide whats the best move to play right now. (This is not simple aggregation).
What I meant was that I was myself locked in difficulties when I wanted to optimize a part of NN.
As for comparing 2 NNs a very simple approach which is commonly used in NN + GA implementations is that make the NN play series of games & the fitness functions (of GA) is simply the number of wins.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users