#### Archived

This topic is now archived and is closed to further replies.

# Neuron generator

This topic is 5617 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

Hey, I made something new, a neuron generator. Neurons have 1/n inputs and 1 output. Allthough this is only for 1 purpose ( all the same neurons).The same system can be used for several other outputs. This is what it does: the user tells a number. ( like 100 ). The neuron keeps modifying its adjustment. ( eventually it "knows" how to go to 100). This is what 1 neuron normally does. Now every time the neuron is calculating its output, another neuron is added. The output is the neuron with the best score. After the best output is displayed, ALL neurons are getting the adjustment of that best neuron. With 1 neuron, it takes about half a minute/a few min, with 1 point adjustment over 14% randomness. With the neuron generator, it takes only 10/30 seconds. It keeps adding neurons. ( The limit atm is 10.000.000 neurons ). [edited by - AIRmichael on July 26, 2002 3:04:44 PM]

#### Share this post

##### Share on other sites
thats pretty confusing, what are you sayin you have coded learning "" neurons or something ? please elaborate .

#### Share this post

##### Share on other sites
The number of neurons increases, and the modifications of the best neuron is used again. I just found out, rand()%50 as coincidence, and only 1 signal strenth, it STILL finds the number! After about 300 neurons , 300+299+298... n neuron calculations.

#### Share this post

##### Share on other sites
Ummm... could you explain just a little more explicitly? You''re kinda losing me on what you mean by modifications, signal strength, and where rand () % 50 came in. Also, how many inputs do the neurons have? What are these inputs?

Maybe a code sample would show this better.

#### Share this post

##### Share on other sites
The output relies on 2 things, randomness + the adjustment of the neuron. When a neuron gets closer guessing to the user defined number, lets say 100, it gets a score. If that score is better, then the neuron checks what it did before. +adjustment is less this time , for example. So it makes the adjustment less. (adjust the output).

With "modify" i mean, adjusting the adjustment of all the other neurons, to the settings of the best neuron.

The coincidence, is random, so its the moment when the output relied on randomness, and isnt better because of its new adjustment. With 1 neuron, and with a to big coincidence, it won''t never learn better, cause it thinks it "improved" itself, but it was just randomness. So it leads it to the wrong track. It went worse for example, but the neuron thinks its his fault, and does something else to fix it. Due the fact that it relies to much on coincidence, it wont get any better. With new neurons added in realtime, it gets smarter and smarter. And finds the number eventually.

Eventually, a new neuron is added.
Wow just found out, that with 500 coincidence, and 1 effectiveness, it still finds the number, after 300 neurons. So its pretty clear that it can find all numbers, no matter how much coincidence sounds, but it has to have enough neurons.

#### Share this post

##### Share on other sites
May want to look into neural nets if this sorta thing interests you. Try the http://www.ai-depot.com, and maybe do a quick search for fup''s tutorial.

#### Share this post

##### Share on other sites
Thx, I already saved the site, i just found out

#### Share this post

##### Share on other sites
it seems you are generating your score based on a known number, how will you evolve it without a "given" to score by?

Dreddnafious Maelstrom

"If i saw farther, it was because I stood on the shoulders of giants."

Sir Isaac Newton

#### Share this post

##### Share on other sites
throw a dice and feed the neurons with the values?

#### Share this post

##### Share on other sites
You always have to give a neuron a score, else it wont envolve. BTW that number can be changed to something else though, it doesnt matter. But it has to know when its improving or not. Allthough with randomness in it included as well.
( yeah its like the dice).

#### Share this post

##### Share on other sites
dunno if I understood you right, but in my opinion these suspicious random values and 10.000.000 neurons sounds very very weird. Did you already check the cascade correlation algorithm ? your approach may be similar to this ...

#### Share this post

##### Share on other sites
quote:
Original post by AIRmichael
Already did such thing, but not with the neuron generator though. The options where "food" and "water". After a while it goes well. And it only had a few neurons.

I am not surprised that you were able to construct a design by hand, but I am more interested in your ''neuron generator''.

I am not sure what you mean by ''food'' and ''water''. If these are two possible decisions that are represented by opposite ends of the output spectrum then the problem could still be (and probably is) linear. I am looking for a highly dimensional problem to test your ''neuron generator'' (hence my sugestion of the two-spirals problem). I would be interested to see the results of such a problem, or perhaps, a more indepth description of your ''food'' & ''water'' problem.

- mongrelProgrammer

#### Share this post

##### Share on other sites
Unfortunately, I can''t even figure out what on earth what the OP is talking about! I mean, what exactly is a "neuron generator"?

I see English isn''t your first language so it must be difficult to get your idea across sometimes. Is it possible to illustrate your idea with a little code?

Stimulate

#### Share this post

##### Share on other sites
I forgot to mention... if you don''t know what the two spiral problem is have a look here:

http://www.faqs.org/faqs/ai-faq/neural-nets/part3/section-10.html

Stimulate

#### Share this post

##### Share on other sites
I''ll read about the 2 spiral problem later on, its to hot to read that much

Either way, the food and water prob was still linear though. Allthough I also did something else for the "food" problem. I layed the food at differant area''s. The chosen food was just picked randomnly. With only the "speed" neuron, it goes faster/slower at situations where the food was close and further away. Combined with the distance, it afcourse goes faster and faster.

Heres a piece of code btw of the neurons being added (not the food/water prob):

void Neurons::neuronGen(int scanned_neuron)
{
neuron_gen_output[scanned_neuron] = (rand()%random) * 1.0f + adjustment_gen[scanned_neuron];
// calculate the score
if (neuron_gen_output[scanned_neuron] > desired_gen_output)
{
neuron_gen_score[scanned_neuron] = neuron_gen_output[scanned_neuron] - desired_gen_output;
}
if (neuron_gen_output[scanned_neuron] < desired_gen_output)
{
neuron_gen_score[scanned_neuron] = desired_gen_output - neuron_gen_output[scanned_neuron];
}

etc...

Find the best neuron...

for (int n = 0; n < neuron_gen_number; n++)
{
adjustment_gen[n] = adjustment_gen[neuron_gen_best];

}

Signal strength ( not finished atm )

void Neurons::signalStrength()
{
signal_strength = neuron_precision_float + (rand()%10 / 10.0f) + signal_adjustment;
// improvement
if (brain_improvement < brain_improvement_old)
{
if (signal_strength > signal_strength_old)
signal_adjustment += 1.0f;
if (signal_strength < signal_strength_old)
signal_adjustment -= 1.0f;
}
// not a improvement
if (brain_improvement > brain_improvement_old)
{
if (signal_strength > signal_strength_old)
signal_adjustment -= 1.0f;
if (signal_strength < signal_strength_old)
signal_adjustment += 1.0f;
}
signal_strength_old = signal_strength;
}

This is just a part of the code though

#### Share this post

##### Share on other sites
Wow. That''s some verbose coding. How can you possibly stand that?

#### Share this post

##### Share on other sites
I could be way off the mark here, but does each of your neurons represent a rule of the form
if     condition     then     action

This would be the case if each neuron learns a mapping from a single input state to a single output state. Many neurons therefore learn many different mappings from inputs states to outputs states.

Assuming this to be the case and combining this with the fact that you are reinforcing neurons that learn more appropriate mappings, then as far as I can tell, you've just implemented a Classifier System, albeit in a convoluted and altogether messy way. Perhaps I'm wrong and I've misinterpreted something here. I respect that English is not your first language and that makes it hard to communicate, but could you elaborate more on exactly what it is that your system does please?

Perhaps explain how your system solves the following problem...

You're neuron generator is presented with a pile of apples and oranges. An external observer, who knows what sort of fruit each object is, is prepared to offer feedback to the generator about each attempt to classify one of the items. The generator must figure out what type of fruit (apple or orange) each object is when they are presented one at a time and in no particular order.

I hope this makes sense. If you could explain how your system solves this problem, or even if it can (or cannot) solve this problem, it would go a long way to helping us understand what your system does and whether it is a new technique for classification.

Cheers,

Timkin

[edited by - Timkin on July 29, 2002 9:46:02 PM]

#### Share this post

##### Share on other sites
Yeah I''m a bit puzzled too. What task is the neuron generator intended to perform, and how does it accomplish the task?

Verbose coding is all good.

#### Share this post

##### Share on other sites
I can''t see that site...!
the spiral thing...

[Hugo Ferreira][Positronic Dreams][Stick Soldiers]
"Redundant book title: "Windows For Dummies".
"Camouflage condoms: So they won''t see you coming".

#### Share this post

##### Share on other sites
Just do a search for "two spiral problem neural network" in Google. there are loads of descriptions of it.

Stimulate

#### Share this post

##### Share on other sites
I still haven''t found a description.
All I find are solutions.

Can anyone throw a link here?

[Hugo Ferreira][Positronic Dreams][Stick Soldiers]
"Redundant book title: "Windows For Dummies".
"Camouflage condoms: So they won''t see you coming".