ai-junkie tutorial on neural networks

Started by
3 comments, last by asperitas 21 years, 6 months ago
question 1 On page six of the neural network tutorial, there is an equation that sums up all of the weights multiplied by their corresponding inputs. eg. i1*w1 + i2*w2 + ... + in*wn - t >= 0 where t is some threshold how do you know that this will always be greater than or equal than zero? question 2 In the CGenAlg::Epoch method of the minesweeper code. why will the roulette wheel crash if the value of iNumElite is not even? I think that these are questions that will be that obvious when i hear the answer that i will shoot myself. sorry for not asking at the ai-junkie forum but for some reason i cant create a user there. thx for any help
__________________________Sir Robin the Not-quite-so-brave-as-Sir-Launcelot who had nearly fought the Dragon of Angnor,who had nearly stood up to the viscious Chicken of Bristol and who had personally wet himself at the Battle of Badon Hill
Advertisement
Hi there,

Tis weird indeed that you cannot create a user. Maybe EZBoard is having a bad day! Anyway, here are the answers to your questions.

"i1*w1 + i2*w2 + ... + in*wn - t >= 0
where t is some threshold

how do you know that this will always be greater than or equal than zero?"


What this equation is saying, is that if the LHS is greater than zero then the neuron fires, if the LHS is less the neuron doesn''t fire. Get it now?

"In the CGenAlg::Epoch method of the minesweeper code. why will the roulette wheel crash if the value of iNumElite is not even?"

Because the crossover function creates offspring in pairs. If iNumElite is odd then there will be an odd amount of offspring to create and the epoch function will crash. It''s just the way I coded it. You can easily fix it by coding a crossover function that just creates one offspring instead of two.

I hope that last piece of advice is correct because I''m in a rush and relying entirely on my memory... which ain''t too good nowadays. ;0)



ai-junkie.com
quote:Original post by fup
You can easily fix it by coding a crossover function that just creates one offspring instead of two.

That would be akin to letting the runt of the litter die at birth!

Timkin

i figured out the roulette wheel question after i posted but thanks for explaining the threshold thing
__________________________Sir Robin the Not-quite-so-brave-as-Sir-Launcelot who had nearly fought the Dragon of Angnor,who had nearly stood up to the viscious Chicken of Bristol and who had personally wet himself at the Battle of Badon Hill
i figured out the roulette wheel question after i posted but thanks for explaining the threshold thing
__________________________Sir Robin the Not-quite-so-brave-as-Sir-Launcelot who had nearly fought the Dragon of Angnor,who had nearly stood up to the viscious Chicken of Bristol and who had personally wet himself at the Battle of Badon Hill

This topic is closed to new replies.

Advertisement