Created
December 11, 2017 00:10
-
-
Save fedden/261c3fae8dedd18e78c008660e22e3c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_fitness(dna): | |
| difference_one = abs(36 - np.sum(dna[:5])) | |
| difference_two = abs(360 - np.product(dna[-5:])) | |
| return difference_one + difference_two |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment