propeller.genome
The genetic material in Propeller. A plushy
is a list of Push instructions that represent a Push program. They hold the genetic material for an individual
. In the initial population, we create random plushys.
make-random-plushy
(make-random-plushy instructions max-initial-plushy-size)
Creates and returns a new plushy made of random instructions and of a maximum size of max-initial-plushy-size.
plushy->push
(plushy->push plushy)
(plushy->push plushy argmap)
Returns the Push program expressed by the given plushy representation.
The function takes in a plushy representation as input and converts it into a Push program by iteratively processing the plushy elements and adding instructions to the push program. It also handles the case where there are open instructions that need to be closed before the end of the program.