You are on page 1of 3

1.

create 5 starting words


set:
goal = "banana" word1 = [random 6 letters]
Start word2 = [random 6 letters]
set: .
generation = 0 .
word50 = [random 6 letters]

genration += 1

*MORE DETAILS IN PAGE A*

2 evaluate the similarity of each word:

repeat for each word and each letter:

if the currentLetter is in the correct position


and is the correct letter
*MORE DETAILS IN PAGE B*
then increase point of that word by 2
OR
4. Recreate from the last gen:
 if the currentLetter gets the just the correct
letter, then increase point of that word by 1
Collect all letters from the last generation
and use that to create new word 
then mutate those new word

WordPoint == 12?
False
True

3. elimination process

"Ended up with banana repeat until there're 25 array left{


at the generation: "
(Generation) print( => Find the word with the least score and set the
- Generation whole thing to "None"
- all 50 words with their ratings
) => If there's a tie, then delete randomly
}

rearrange by having the first 25 arrays as the ones


with letters, the rest are variables with "None"
End
This is Page A Start

word number = 0
IF word number is 50 True End
letter number = 0

false

word number += 1
letter number set to 0

true

letter number += 1 false IF letter number is 6

IF
[letter number (x) of
word number (y)] true point of the current word += 2
is the correct letter and
 in the correct position

false

ELIF
[letter number (x) of
true point of the current word += 1
word number (y)]
is the correct letter only
Start This is Page B

End

Loop through all words array and collect


all the letters that each array has
(eliminate duplicates), and put them into
an array "letter pool"

True
go through all arrays starting from the
first one

No more arrays?

go to the next array False

False Array == None?

(Mutate)
random 6 letters from the
random one letter from the
"letter pool" and create a
new word and replace it
new word
with ANY random letter

You might also like