Skip to content

Instantly share code, notes, and snippets.

@zeryx
Created February 4, 2014 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeryx/8814246 to your computer and use it in GitHub Desktop.
Save zeryx/8814246 to your computer and use it in GitHub Desktop.
current.resize(boost::extents[ini1.popsize][ini1.wtqt]);
if(iter==0) // if this is the first iteration, populate with randoms
{
for(int j=0;j<ini1.popsize;j++) // create individuals
{
for(int k=0;k<ini1.wtqt;k++) // randomize the "genes" (weights in this case) for the entire chroma
{
current[j][k].weight=RNG_normal( prob.RNG_SD );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment