--
Roll
--
more times:
Roll to find the nucleotide to mutate.
Depending on the roll:
If the roll is between 1 through 18, inclusive, select that nucleotide.
Otherwise, skip mutation and
clone
the genome again.
Roll to see what kind of mutation to perform.
Depending on the roll:
If the roll is between 1 through 14, inclusive, perform a
transition
on the selected nucleotide.
If the roll is between 15 through 17, inclusive, perform a
complementing transversion
on the selected nucleotide to the base it pairs with.
Otherwise, perform the
other transversion
on the selected nucleotide.
Select the correct amino acid for the new codon.
Depending on the change to the codon:
If the mutation caused a change in the amino acid being coded, then
kill
it and start again with the previous generation.
Otherwise,
clone
this genome for the next generation.
Print
results.
OK
A
G
C
T
Select the amino acid for the codon
--
Ala
Arg
Asn
Asp
Cys
Gln
Glu
Gly
His
Ile
Leu
Lys
Met
Phe
Pro
Ser
Thr
Trp
Tyr
Val
STOP