title: Genetic Algorithm Implementation for weight optimization
body: <p>I am a data mining student and I have a problem that I was hoping that you guys could give me some advice on:</p>
  
  <p>I need a genetic algo that optimizes the weights between three inputs.  The weights need to be positive values AND they need to sum to 100%.</p>
  
  <p>The difficulty is in creating an encoding that satisfies the sum to 100% requirement.</p>
  
  <p>As a first pass, I thought that I could simply create a chrom with a series of numbers (ex.4,7,9).  Each weight would simply be its number divided by the sum of all of the chromosome's numbers (ex. 4/20=20%).</p>
  
  <p>The problem with this encoding method is that any change to the chromosome will change the sum of all the chromosome's numbers resulting in a change to all of the chromosome's weights.  This would seem to significantly limit the GA's ability to evolve a solution.</p>
  
  <p>Could you give any advice on how to approach this problem?</p>
  
  <p>I have read about real valued encoding and I do have an implementation of a GA but it will give me weights that may not necessarily add up to 100%.</p>