-
Notifications
You must be signed in to change notification settings - Fork 1
/
EP notes
23 lines (19 loc) · 2.08 KB
/
EP notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Here’s something I’ve had some success with in preventing early plateauing: Watch the standard deviations of the parameters you’re optimizing (in your case, keys). When a parameter’s standard deviation gets below a certain point (i.e., most individuals have the same character on a particular key), randomly choose an individual and reset that parameter (i.e., swap the “stale” key with any other key). Do this for all parameters at the beginning or end of every generation.
The nice thing about this method is, since it’s not fitness-based, it can help shake the population off a local extremum before it has the chance to get really stuck there (i.e., when only one or two parameters have settled across the population, rather than every parameter).
work out a good mutation percentage and method
fix variable and local variable names
#add elitism
in roulette selection should i increase variability between values to select worse ones more often?
address comments
clean up print statements
parents don't have to be monogamous, so you don't have to copy part of the generation
figure out how to mutate all chromosomes by percent. should you iterate over each letter in a keyboard and if a random number is within the probability, switch with something random? generate a list of random indicies
mapping the fitness landscape would be interesting
proposed mutation function: take in a percent, for every letter in the chromosome if the random number is below the percent, swap it with another. This is very computationally intense, perhaps a seed should be pregenerated.
Better way is to iterate over chromosomes and if it is randomly chosen then perform swaps
heatmap
assign each a random number, sort by a random number, then take the 40% smallest
when printing results, change them so that they are spaced uniformly for increased readability
====roulette selection should select mating. parents besides the elite should not be preserved.
should elite keyboards have a chance of being mutated? probably
check mutation and elite selection probabilities before running because they are set very high right now