Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
import <Utilities/Sequence.sl>;
|
||||
|
||||
AllowedChars := " ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
initializeParent(randChars(1)) := AllowedChars[randChars];
|
||||
|
||||
Fitness(target(1), current(1)) :=
|
||||
let
|
||||
fit[i] := true when target[i] = current[i];
|
||||
in
|
||||
size(fit);
|
||||
|
||||
Mutate(letter(0), rate(0), randRate(0), randChar(0)) :=
|
||||
letter when randRate > rate
|
||||
else
|
||||
AllowedChars[randChar];
|
||||
|
||||
evolve(target(1), parent(1), C(0), P(0), rateRands(2), charRands(2)) :=
|
||||
let
|
||||
mutations[i] := Mutate(parent, P, rateRands[i], charRands[i]) foreach i within 1 ... C;
|
||||
fitnesses := Fitness(target, mutations);
|
||||
in
|
||||
mutations[firstIndexOf(fitnesses, vectorMax(fitnesses))];
|
||||
Loading…
Add table
Add a link
Reference in a new issue