save_count parameter does not work as documented.

Bug #531458 reported by Rick Stovall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ricks GA Solver
New
Medium
Rick Stovall

Bug Description

Per the config documentation:

## number of highest ranking chromosomes to be transfered without
## modification to the next generation.
save_count 1

As implemented in bc_bench.cpp this parameter instead confers automatic breeding selection on the top performers. I suggest the parameter should be renamed to "force_select" and the config docs altered to match. The implementing code from bc_bench.cpp is shown below:

(bc_bench.cpp:224)

  breeding_list.clear();

  // save the first unique genes without modification.
  save_count = (unsigned int) ceil(s_percent * gen_list.size());
  if (save_count > 0)
  {
   c_sorted::iterator b_curr = sorted.begin();
   c_sorted::iterator b_end = sorted.end();
   int count = save_count;
   while ((count--) && (b_curr != b_end))
   {
    breeding_list[b_curr->first] = b_curr->second;
    b_curr++;
   };
  };

Rick Stovall (fpstovall)
Changed in ricks-ga:
importance: Undecided → Medium
assignee: nobody → Rick Stovall (fpstovall)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.