private void UpdateParticleFitness(SwarmParticle particle) { double currentFitness = FitnessStrategy.GetFitness(particle.GetPosition()); if (currentFitness < particle.GetCurrentFitness()) { particle.SetCurrentLocationAsBest(); } particle.SetCurrentFitness(currentFitness); }
protected Vector3d GetColour(SwarmParticle particle) { double fitness = particle.GetCurrentFitness(); return new Vector3d(0.0, fitness/70.0, 0.6); }