## Generated by Codox

# Propeller 0.3.2

##### Released under the EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0

Yet another Push-based genetic programming system in Clojure.

## Installation

To install, add the following dependency to your project or build file:

    [net.clojars.lspector/propeller "0.3.2"]

## Topics

- A Guide to Propeller
- Adding Genetic Operators
- Adding a Problem
- Adding a Selection Method
- Additional Instructions
- # Downsample Functions
- Generating Documentation for Propeller

## Namespaces

### propeller.downsample

FIXME: write docs

Public variables and functions:

- assign-indices-to-data
- convert-to-elite-error
- convert-to-soft-error
- get-distance-between-cases
- initialize-case-distances
- merge-map-lists-at-index
- replace-close-zero-with-zero
- replace-mins-with-zero
- select-downsample-maxmin
- select-downsample-maxmin-adaptive
- select-downsample-random
- update-at-indices
- update-case-distances

### 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.

Public variables and functions:

- make-random-plushy
- plushy->push
- plushy->push-internal

### propeller.gp

Main genetic programming loop.

Public variables and functions:

- cleanup
- fill-defaults
- gp
- report

### propeller.problems.PSB1.count-odds

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- test-data
- train-and-test-data
- train-data

### propeller.problems.PSB1.grade

FIXME: write docs

Public variables and functions:

- -main
- error-function
- get-output
- instructions
- map-vals-input
- random-int
- test-data
- train-and-test-data
- train-data

### propeller.problems.PSB1.scrabble-score

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- scrabble-letter-values
- test-data
- train-and-test-data
- train-data

### propeller.problems.PSB1.small-or-large

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- test-data
- train-and-test-data
- train-data

### propeller.problems.PSB2.basement

BASEMENT from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- train-and-test-data

### propeller.problems.PSB2.bouncing-balls

BOUNCING BALLS from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- map-vals-input
- map-vals-output
- train-and-test-data

### propeller.problems.PSB2.bowling

BOWLING from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- train-and-test-data

### propeller.problems.PSB2.camel-case

CAMEL CASE from PSB2

Public variables and functions:

- -main
- cleanup-length
- error-function
- instructions
- random-char
- random-input
- train-and-test-data
- word-generator

### propeller.problems.PSB2.dice-game

DICE GAME from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- map-vals-input
- map-vals-output
- train-and-test-data

### propeller.problems.PSB2.find-pair

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- map-vals-input
- map-vals-output
- random-int
- test-data
- train-and-test-data
- train-data

### propeller.problems.PSB2.fizz-buzz

FIZZ BUZZ from PSB2 Given an integer x, return “Fizz” if x is divisible by 3, “Buzz” if x is divisible by 5, “FizzBuzz” if x is divisible by 3 and 5, and a string version of x if none of the above hold.

Public variables and functions:

- -main
- error-function
- instructions
- test-data
- train-and-test-data
- train-data

### propeller.problems.PSB2.fuel-cost

FUEL COST from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- test-data
- train-and-test-data
- train-data

### propeller.problems.PSB2.gcd

GCD GREATEST COMMON DIVISOR from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- map-vals-input
- map-vals-output
- random-int
- test-data
- train-and-test-data
- train-data

### propeller.problems.PSB2.luhn

LUHN from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- train-and-test-data

### propeller.problems.PSB2.middle-character

MIDDLE CHARACTER from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- train-and-test-data

### propeller.problems.PSB2.paired-digits

PAIRED DIGITS from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- random-char
- random-int
- train-and-test-data

### propeller.problems.PSB2.shopping-list

SHOPPING LIST from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- map-vals-input
- map-vals-output
- random-float
- train-and-test-data

### propeller.problems.PSB2.snow-day

SNOW DAY from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- map-vals-input
- map-vals-output
- train-and-test-data

### propeller.problems.PSB2.solve-boolean

SOLVE BOOLEAN from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- train-and-test-data

### propeller.problems.PSB2.spin-words

SPIN WORDS from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- random-char
- random-input
- train-and-test-data
- word-generator

### propeller.problems.PSB2.square-digits

SQUARE DIGITS from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- train-and-test-data

### propeller.problems.PSB2.substitution-cipher

SUBSTITUTION CIPHER from PSB2

Public variables and functions:

- -main
- error-function
- instructions
- map-vals-input
- map-vals-output
- train-and-test-data

### propeller.problems.PSB2.twitter

TWITTER from PSB2 Given a string representing a tweet, validate whether the tweet meets Twitter’s original character requirements. If the tweet has more than 140 characters, return the string “Too many characters”. If the tweet is empty, return the string “You didn’t type anything”. Otherwise, return “Your tweet has X characters”, where the X is the number of characters in the tweet.

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- train-and-test-data

### propeller.problems.UBall5D

FIXME: write docs

Public variables and functions:

- -main
- data
- error-function
- get-random-input
- instructions
- map-vals-input
- test-data
- train-and-test-data
- train-data

### propeller.problems.boolean.mul3

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- target-function
- train-and-test-data

### propeller.problems.boolean.mul4

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- target-function
- train-and-test-data

### propeller.problems.complex-regression

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- train-and-test-data

### propeller.problems.data-creation

FIXME: write docs

Public variables and functions:

- edge-cases-for-problem
- generate-data
- generate-data-find-pair
- generate-data-for-all-problems
- generate-data-for-problem
- generate-data-gcd
- read-data
- read-data-formatted
- read-string-and-convert
- save-data-for-all-problems
- save-data-for-problem
- save-train-test-data
- scrabble-score-read-data-formatted
- testing-cases-for-problem
- training-cases-for-problem

### propeller.problems.float-regression

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- train-and-test-data

### propeller.problems.integer-regression

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- train-and-test-data

### propeller.problems.simple-classification

FIXME: write docs

Public variables and functions:

- -main
- error-function
- instructions
- train-and-test-data

### propeller.problems.software.number-io

Number IO from iJava (http://ijava.cs.umass.edu/)

Public variables and functions:

- -main
- error-function
- instructions
- random-float
- random-int
- train-and-test-data

### propeller.problems.software.smallest

SMALLEST PROBLEM from C. Le Goues et al., "The ManyBugs and IntroClass Benchmarks

Public variables and functions:

- -main
- error-function
- instructions
- random-int
- train-and-test-data

### propeller.problems.string-classification

String Classification:

Public variables and functions:

- -main
- error-function
- instructions
- train-and-test-data

### propeller.problems.valiant

Possibly impossible to solve with genetic programming. Stems from the work of Leslie Valiant and involves determining the parity of an unknown subsequence of a larger sequence of bits.

Public variables and functions:

- -main
- error-function
- instructions
- train-and-test-data

### propeller.push.instructions

Push Instructions

Public variables and functions:

- def-instruction
- generate-instructions
- get-literal-type
- get-stack-instructions
- get-vector-literal-type
- instruction-table
- make-instruction
- make-metadata
- opens

### propeller.push.instructions.bool

BOOLEAN Instructions, created with `propeller.push.instructions/def-instruction`. List of instructions can be found at Additional Instructions.

Public variables and functions:

### propeller.push.instructions.character

CHAR Instructions, created with `propeller.push.instructions/def-instruction`. List of instructions can be found at Additional Instructions.

Public variables and functions:

### propeller.push.instructions.code

CODE Instructions, created with `propeller.push.instructions/def-instruction`. List of instructions can be found at Additional Instructions.

Public variables and functions:

### propeller.push.instructions.input-output

INPUT and OUTPUT Instructions. Additional instructions can be found at Additional Instructions.

Public variables and functions:

- _print
- handle-input-instruction

### propeller.push.instructions.numeric

FLOAT and INTEGER Instructions (polymorphic). Additional instructions can be found at Additional Instructions.

Public variables and functions:

- _add
- _dec
- _from_boolean
- _from_char
- _from_string
- _gt
- _gte
- _inc
- _lt
- _lte
- _max
- _min
- _mod
- _mult
- _quot
- _subtract

### propeller.push.instructions.parentheses

FIXME: write docs

Public variables and functions:

- opens

### propeller.push.instructions.polymorphic

Polymorphic Instructions (for all stacks, with the exception of non-data ones like input and output)

Public variables and functions:

- _deep_dup
- _dup
- _dup_items
- _dup_times
- _empty
- _eq
- _flush
- _pop
- _rot
- _shove
- _stack_depth
- _swap
- _yank
- _yank_dup

### propeller.push.instructions.string

STRING Instructions, created with `propeller.push.instructions/def-instruction`. List of instructions can be found at Additional Instructions.

Public variables and functions:

### propeller.push.instructions.vector

VECTOR instructions for all vector element subtypes: BOOLEAN, FLOAT, INTEGER, and STRING.

Public variables and functions:

- _butlast
- _concat
- _conj
- _contains
- _emptyvector
- _first
- _indexof
- _iterate
- _last
- _length
- _nth
- _occurrencesof
- _pushall
- _remove
- _replace
- _replacefirst
- _rest
- _reverse
- _set
- _subvec
- _take

### propeller.push.interpreter

Interprets Push programs.

Public variables and functions:

- interpret-one-step
- interpret-program

### propeller.push.limits

Values used by the Push instructions to keep the stack sizes within reasonable limits and values used by the Push instructions to keep computed values within reasonable size limits.

Public variables and functions:

- limit-code
- limit-number
- limit-string
- limit-vector
- max-code-depth
- max-code-points
- max-number-magnitude
- max-stack-items
- max-string-length
- max-vector-length
- min-number-magnitude

### propeller.push.state

Push states

Public variables and functions:

- empty-stack?
- example-state
- get-args-from-stacks
- peek-stack
- peek-stack-many
- pop-stack
- pop-stack-many
- print-state
- push-to-stack
- push-to-stack-many
- stack-size

### propeller.selection

Propeller includes many kinds of genetic operators to select parents within the population such as tournament selection, lexicase selection, and epsilon lexicase selection.

Public variables and functions:

- epsilon-lexicase-selection
- epsilon-list
- fitness-proportionate-selection
- lexicase-selection
- motley-batch-lexicase-selection
- select-parent
- tournament-selection

### propeller.simplification

To use Propeller’s auto-simplification system, simply include the following four command line arguments when running a problem:

Public variables and functions:

- auto-simplify-plushy
- choose-random-k
- delete-at-indices
- delete-k-random

### propeller.tools.calculus

Functions for calculus operations

Public variables and functions:

- deriv
- integrate

### propeller.tools.character

Functions for CHARs

Public variables and functions:

- get-ascii
- is-digit
- is-letter
- is-whitespace

### propeller.tools.distributions

Functions to calculate distribution.

Public variables and functions:

- cdf-norm
- pdf-norm
- quant-norm
- rand-norm

### propeller.tools.math

Math functions.

Public variables and functions:

- abs
- approx=
- ceil
- cos
- div
- exp
- floor
- log
- mean
- median
- median-absolute-deviation
- pow
- root
- round
- sign
- sin
- sqrt
- square
- step
- tan
- transpose

### propeller.tools.metrics

Functions to measure things.

Public variables and functions:

- argmax
- argmax-last
- argmins
- compute-next-row
- hamming-distance
- levenshtein-distance
- mean
- mean-of-colls
- median
- min-of-colls
- multiset-distance
- sequence-similarity

### propeller.utils

Useful functions.

Public variables and functions:

- bmx-distance
- break-up
- count-genes
- count-points
- depth
- drop-nth
- enforce-gene-length-limit
- ensure-list
- extract-genes
- filter-by-index
- first-non-nil
- gaussian-noise-factor
- indexof
- log
- not-lazy
- onenum
- perturb-with-gaussian-noise
- PI
- pmapallv
- pretty-map-println
- random-instruction
- remove-empty-genes
- round
- seq-zip

### propeller.variation

Propeller includes many kinds of genetic operators to create variation within the population. You can specify the rate of the variation genetic operators with the `:variation` map.

Public variables and functions:

- alternation
- bmx
- crossover
- new-individual
- tail-aligned-crossover
- uniform-addition
- uniform-deletion
- uniform-gap-addition
- uniform-gap-deletion
- uniform-replacement