Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3976048
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:45:29+00:00 2026-05-20T04:45:29+00:00

Currently I am working on a project that would use genetic algorithms to optimize

  • 0

Currently I am working on a project that would use genetic algorithms to optimize neural networks. I do realize this is probably not the best way to optimize them, but I’m new to both so I just wanted to try using them.

My plans are as follows (subject to change, a lot). My input neurons would be using a data set that could have just about any positive number (including decimals up to two places, so really they would be floating point numbers), but most likely between 0 to 20000. Because the importance is in how the numbers compare to each other in value rather than how big they are, they would first be divided by the highest number of all the values that would be inputted. They would them be multiplied by weights (any positive or negative float) before going to their hidden layer. Each neuron in the hidden layer would be summing all of it’s inputs until they were done being calculated. They would then be run through a logistics function and be outputted.

My environment is Visual studio C++ 2010 Express and I’m using the clr.

My problem lies in the genetic algorithm and how it would work. It would be adjusting the weights. My problem is that when it randomly changes a bit in one of the weights (mutation rate), it could make the weights extraordinarily high or low, causing overflow or some other error when multiplied by the input and added with the others. I have no idea how I would organize my chromosomes either. So, would it just be better to perform randomization by selection weights rather than bits at random and changing them to a random number within a defined range? Basically I am looking for suggestions on how to organize this without causing errors with making values end up too big or too small while maintaining performance.

Thanks, (and sorry if this should be in theoretical computer science, but I thought it wouldn’t fit in there)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:45:30+00:00Added an answer on May 20, 2026 at 4:45 am

    (Artificial) Neural Networks (ANNs) are notoriously difficult to optimize, and genetic algorithms (GAs) are a reasonably good approach to doing so (mainly because everything else tends to be very limited in how well it can work). Of course there are alternatives that work well too, but they are more complicated and subtle to program and tune correctly (back-propagation with simulated annealing and learning momentum). And I understand your are doing this project mostly to play around with those things.

    You might want to look at Evolutionary Neuro-controllers (ENC), this is a field where genetic (or evolutionary) algorithms are employed to train ANNs for complex navigation tasks (e.g. inter-planetary space missions is one of the applications of that I have personally done research on).

    For the ANN part, I would suggest that you don’t limit yourself to logistics functions (I know that the sigmoid is inspired from biological neurons, but that doesn’t mean they are the best all the time). Many other functions exist as well, logistics functions are used in part because they make back-propagation much faster and simpler to do. But, Radial-Basis functions work wonders as well (IMO and from what I have seen, most successful applications of ANNs used Radial-Basis functions, i.e. RBF-NN). Typically, people use either Gaussian functions, hyper-spherical functions and very often, triangular functions (called Fuzzy Networks, another huge class of ANNs).

    As for GAs, I would not recommend that type of mutation you are describing (i.e. to flip bits) for the reasons that you mentioned. People don’t use this kind of mutation when dealing with real-valued genes. One very easy mutation method is just to decide (with some probability) to mutate an individual, then pick one element of its gene to be mutated and then simply generate a new gene element to replace it using a random number generator (rand()). With this, you can limit the scale of the generated gene elements to avoid problems of turning your individual degenerate (i.e. one completely wrong gene element can make the entire individual useless). What are the genes? Well, for a ANN, typically a large vector containing all the weights of all the neurons in your net. You can guess that people rarely apply GAs if the number of neurons is too large. I would also recommend that you use Tournament Selection for selecting individuals for reproduction. As for cross-over (i.e. mixing two parents to make a child), just keep the order of the weights and pick for each element of the child a weight from either parent at random with equal probability.

    I have personally done what I described above and it works very well for certain problems (reduced size and high complexity, i.e. no obvious optimal solution).

    Finally, don’t expect it to work that easily. Typically, it will require a population size and a number of generation that is much much higher than what you would expect (after all, evolution is a very slow process!). So, don’t try a population of 10 individuals and run for 50 generations, and sadly say “OH I guess it doesn’t work…”. Try more in the order of thousands of individuals in the population and several thousands to a hundred thousand generations, depending on the scale of the problem your are applying it to, of course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.