[xkcd] Genetic Algorithms (23 Jan 2009)
[xkcd] Genetic Algorithms (23 Jan 2009)
Hover Text:
Just make sure you don't have it maximize instead of minimize.
Transcript
[Code displayed, presumably from an IDE.]
def getSolutionCosts(navigationCode): fuelStopCost = 15 extraComputationCost = 8
[There is a giant arrow pointing to the next line.]
thisAlgorithmBecomingSkynetCost = 999999999 waterCrossingCost = 45
Genetic algorithms tip:
Always include this in your fitness function.
1 comments
What if it overflows and the cost becomes negative?
3 0 Reply