propeller.problems.PSB2.fuel-cost
FUEL COST from PSB2
Given a vector of positive integers, divide each by 3, round the result down to the nearest integer, and subtract 2. Return the sum of all of the new integers in the vector
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
error-function
(error-function argmap data individual)
Finds the behaviors and errors of an individual: Error is 0 if the value and the program’s selected behavior match, or 1 if they differ, or 1000000 if no behavior is produced. The behavior is here defined as the final top item on the INTEGER stack.
instructions
stack-specific instructions, input instructions, close, and constants
random-int
(random-int)
Random integer between -100 and 100