Add function to calculate an individuals fitness.