Artificial Intuition

Started by
56 comments, last by Paul Cunningham 23 years, 2 months ago
Well, I won''t be the guy summwrizing, I just can''t stop talking
On the other hand, NN stands for Neural Network. It''s one of the trends of Artificial Intelligence programming.
I never tried it, but I did Biology and a Neuron is a very simple cell that, depending on its input will emit a different message. Input come from others neurons of course, and originally from the electrical impulses of perceptor organs (eye, ears, etc).
The real thing I don''t really know how to formulate in terms of computer is the complexity of the "inside" of a neuron. The thing that make the neuron emit a message or another (actually, it''s all electrical impulses, or not).

The idea is to have lots of neurons connected to each other, and generating some sort of clever result...

But if someone had ONE just ONE example, I would be sooo grateful (not code, just the concept. Some neurons, what they do, how they connect, and why I wouldn''t use a classic branching system instead).

youpla :-P
-----------------------------Sancte Isidore ora pro nobis !
Advertisement
I agree, I would love to find a tutorial on the net that explained it properly. I think though to explain vectors is; forget the word vector... Just treat it like a magic box (for the time being... but you shouldn''t forever ) which you supply an input and optain an output.

Template thing: If you have certain template NN''s that you could apply to a situation. These NN''s would have some based Input and Output vectors that were already supplied (for the task at hand) and would then most likely be able to handle such tasks without having to learn the whole process again


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
Okay, I'm reading this thread, and I'm noticing a lot of confusion regarding artificial neural networks (I say artificial because we all have one in our heads, desu ne). I consider ANNs to be sort of my spécialité, so here goes:

First, some ANN specific terminology.

Neuron: The basic unit of an ANN. Recieves inputs on one side, and has one output (which may go to one or more neurons)
Synapse: The connection between two neurons
Layer: An array of neurons

The single neuron has n inputs, each of which is connected via a synapse to the output of another neuron. Each of these connections carries a weight. So, the first step in computing a neuron is to determine the net input to the neuron (neti) from the input vector (v) and the weight vector (w). This is computed using the dot product, such that neti = v.w (A note: usually the weights for an entire network are contained in a large matrix, and then one row of this matrix is used, but I'm only dealing with the single neuron here)

The second step is to calculate the activation of a neuronby passing the net input through an activation function ( a(x) ). However, usually this is the linear function (I've only seen one example where it is not), such that a(neti) = neti.

Then, the activation of the neuron is passed through an output function to determine the output of the neuron. There are roughly a dozen or so commonly used output functions, but I'm only going to mention one: the binary function. Define a threshold t, and the function is:
o(x) = 1 if x > t
o(x) = 0 if x < t
In other words, the neuron fires if the activiation is greater than t.

Now one neuron is pretty useless on its own, so to make computations more useful we generally group them into layers, and then stack the layers together, with each neuron in one layer connecting to every neuron in the next, forming a network. The following picture gives you an idea of the most common structure:


To use an ANN, first you have to train it. This is the most variable process in the network, and learning algorithms is still a relatively new field of research. I'm going to talk about the Backpropagation learning algorithm for a Fedd-forward ANN (FFANN, such as the picture above). This involves a lot of math and stuff, so I'm just going to give the basic jist of it. Initially, the network is random. So for any given input you get a random output. To train a FFANN well you must first devise a series of input/output pairs, that is, given a certain input, what should the output be. Then, you feed one input in and see what the network spits out. It'll probably be wrong. If it is, you calculate the error of the network (icky math here) and then backpropagate that error through the network, changing the weights of the connections. Then you try another input, and another, and repeat the process until the network is "good enough", i.e. a low error (0.01% or so).

Then, you should be able to give the network any input (even ones it hasn't seen before), and it should be able to give you a "good" output.

To review the example above, it takes five inputs, and then processes it down to 2 outputs by calculating the output values of all the neurons, eventually getting something on the output layer.

Now, I'd like to stress that the format I've put up there is by no means the best one for intuition. In fact it would suck. There's a lot of research going around about ANNs and creativity, and not much of it seems to be going anywhere. I'm about to start some research into three-dimensional arrays of matricies, as opposed to the traditional layers method.

But don't give up hope! If you want a network to suggest ideas for an AI, you could devise an evaluation formula to evaluate the sucess of any given idea the network had. You could then implement that as the determining factor in the training process. As you can probably see, training is really important. That's where the hard stuff is.

*Phew* Any questions? (Yes, there will be a test next week on this material)

Eric

Edited by - egerlach on July 31, 2000 7:17:00 PM
==============="Or a pointed stick!"
Wow... cool tute... Thanx egerlach for that... I always wanted someone to definitively explain it . My brain is numb now so I have no questions


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
egerlach : Why do you use separate activation and output functions? Couldn''t you just combine them into a single function?
Expecially if you use tanh or something similar as activation/output function.

When I read your post I wondered why did you say that activation function is usually linear but then I noticed that you had that output function too and it made more sense. In every case I have seen there has only been activation function, and naturally it has been almost always nonlinear (there wouldn''t be any reason to use multilayer networks with linear activation functions).

What kind of 3D approach are you going to take? A couple of 2D-layers and 2D input vector? It''s common method to use NNs with images.

-Ratsia
quote:Original post by dwarfsoft
I think though to explain vectors is; forget the word vector... Just treat it like a magic box


A vector is an ordered set (ie, array) of numbers, nothing more.

One of their popular uses is in visual programming, using a 2 or 3 element vector to represent a point or direction in 2D or 3D space.

But a vector, in the original mathematical sense, is just an ordered set of numbers

What I was meaning when I said "appropriate input/output vectors" was encoding the required info of the game state into a sequence (ie, ordered set) of numbers - these numbers would be the values on the input column of neurons. And the output is encoding the "intuititive decisions" of the system into a sequence of numbers - these would appear on the output column of neurons.

Egerlach is quite likely right when he says that this is bad for intuition - I possibly alluded to this when discussing getting training pairs...

Sam
Space Cadet''s DJ Random, Thinker, and Geek at heart.
SamSpace Cadet''s DJ Random, Thinker, and Geek at heart.
quote:Original post by dwarfsoft
I think though to explain vectors is; forget the word vector... Just treat it like a magic box


A vector is an ordered set (ie, array) of numbers, nothing more.

One of their popular uses is in visual programming, using a 2 or 3 element vector to represent a point or direction in 2D or 3D space.

But a vector, in the original mathematical sense, is just an ordered set of numbers

What I was meaning when I said "appropriate input/output vectors" was encoding the required info of the game state into a sequence (ie, ordered set) of numbers - these numbers would be the values on the input column of neurons. And the output is encoding the "intuititive decisions" of the system into a sequence of numbers - these would appear on the output column of neurons.

Egerlach is quite likely right when he says that this is bad for intuition - I possibly alluded to this when discussing getting training pairs...

Sam
Space Cadet''s DJ Random, Thinker, and Geek at heart.
SamSpace Cadet''s DJ Random, Thinker, and Geek at heart.
Woah! Am I seeing double . Anywho... I do understand vectors, I was just shortening my understanding of NN, which I was then informed was wrong... yay! I learn something new every day! Which is more than I do in my SQL lectures or Math lectures... Joy, sets as if we haven''t ever done predigate calculus before

But anyway, Now that we are all agreed that NN''s are gonna suck for what we were discussing its use for (I hope we all agreed right?) what can we use instead? As someone who just learned that he was wrong should always do... my long dark jacket fans out behind me as I disappear back into the shadows...

(I''m not joking about the jacket... I do this often, with a long black coat that allows me to sneak around in the shadows . Unfortunately it is not quite Matrix style material, but it IS effective )


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
I''ve read it twice now and it''s still sinking in. I think i''ll skip the exam for now Time to read it again

I love Game Design and it loves me back.

Our Goal is "Fun"!
I printed it out, so that it is there at the most crucial times... Maths and SQL lectures


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)

This topic is closed to new replies.

Advertisement