Closed Akiira closed 9 years ago
Here's an idea based on some of the things we talked about
//(Sum of testSuite to population coverage ratios) – max is numOfEdges+numOfPredicates (Only test suite to cover anything and it covers everything), min is 0 (Covered nothing).
// sum – max is (numOfEdges+numOfPredicates)^2 * baseReward, min is 0
So heres a question, when an Organism covers an edge two or more times, do we want to give more fitness then if it covered it once, or less? If we give it more then that Organism would have a higher fitness then it really deserves. The fitness value might not be a good indicator of its actual quality.
Thats why I was thinking we give it some standard fitness value for covering an edge once, and for each time it covers it more then once we subtract a number from it.
For example if the base fitness is 1, and it covers the edge 3 times, then we take 1 - (1/2) - (1/4), to get its fitness. We could actually use the harmonic numbers to do this; the reason i suggest them is because it will still always give us a positive fitness if we start with a base of 1.
To take into account the populationEdgeCoverage we can still just divide the fitness by that. Though i just relized; if fitness depends on this meta data it will need to be recalculated for everyone if the meta data ever changes. So even if we are just replacing one organism with another we may need to recalculate fitness for everyone.
We need to decide on a fitness function to use. We have a couple of general ideas, like punishing for covering multiple edges, but deciding the best way to bring them all together will take some more thought. Now that we have a concrete implementation it may be advantageous to discuss this with Dr. Bui and Dr. El Ariss again.