Example #1
0
    public IEnumerator Evaluate(IBlackBox box)
    {
        if (optimizer != null)
        {
            optimizer.InstantiateCandidate(box);
            yield return(new WaitForSeconds(optimizer.TrialDuration));

            optimizer.DestroyCandidate(box);

            float fit = optimizer.GetFitness(box);

            FitnessInfo fitness = new FitnessInfo(fit, fit);
            dict.Add(box, fitness);
        }
    }