change() public method

public change ( List p_params ) : List
p_params List
return List
Ejemplo n.º 1
0
 private void PerturbParams(int p_offset = 0)
 {
     // Get params from winner and use as basis for perturbing
     // Only update params if they were better than before, else reuse old
     if (m_currentBestCandidate > -1)
     {
         //IOptimizable best = m_optimizableControllers[m_currentBestCandidate];
         m_lastBestParams = m_currentParams[m_currentBestCandidate];
     }
     // Perturb and assign to candidates
     for (int i = p_offset; i < m_optimizableControllers.Length; i++)
     {
         m_currentParams[i] = m_changer.change(m_lastBestParams, m_paramsMin, m_paramsMax, m_testCount); // different perturbation to each
     }
 }
Ejemplo n.º 2
0
 private void PerturbParams()
 {
     // Get params from winner and use as basis for perturbing
     // Only update params if they were better than before, else reuse old
     if (m_currentBestCandidate > -1)
     {
         IOptimizable best = m_optimizables[m_currentBestCandidate];
         m_lastBestParams = best.GetParams();
     }
     // Perturb and assign to candidates
     for (int i = 0; i < m_optimizables.Length; i++)
     {
         IOptimizable opt          = m_optimizables[i];
         List <float> newObjParams = m_changer.change(m_lastBestParams);
         // Debug.Log("new params for "+i+" sample at i=10:  _" + newObjParams[10]+"_");
         opt.SetParams(newObjParams);
     }
 }