clojush.simplification

apply-simplification-step-to-genome

(apply-simplification-step-to-genome genome simplification-step-probabilities)

Takes a genome and a map of transformation/probability pairs. Picks a transformation probabilistically, and then applies it to the genome by silencing/unsilencing/no-oping random genes that aren’t already of that type.

auto-simplify

(auto-simplify ind error-function steps print? progress-interval)(auto-simplify ind error-function steps print? progress-interval maintain-ancestors)

Auto-simplifies the provided individual.

auto-simplify-from-program

(auto-simplify-from-program p error-function steps print? progress-interval)

auto-simplify-plush

(auto-simplify-plush ind error-function steps print-progress-interval)(auto-simplify-plush ind error-function steps print-progress-interval simplification-step-probabilities)

Automatically simplifies the genome of an individual without changing its error vector on the training set, based on the error-function. steps is the number of hill-climbing evaluations to test. print-progress-interval is how often to print progress of the simplification; if it is set to 0, then nothing will be printed. simplification-step-probabilities is a map of probabilities that are used to select what change to make during each step of the simplification. Each change is represented as a map with the following options for the keys, each of which has an integer of how many of those changes to make: :silence - number of unsilenced or no-op genes to set :silent = true :unsilence - number of silenced or no-op genes to set :silent = false :no-op - number of unsilenced or silenced genes to set :silent = :no-op

change-silent-at-indices

(change-silent-at-indices genome indices new-value)

Changes the value of the :silent tag on the gene at each index of indices into new-value.

choose-random-k-without-replacement

(choose-random-k-without-replacement k elements)

Selects k random elements of input list, without replacement. If fewer than k exist, selects all.

remove-paren-pair

(remove-paren-pair program)

Removes one random pair of parens from a program. Cannot remove outermost pair.

select-random-weighted-item

(select-random-weighted-item prob-map)

Given map of item/probability key/values, picks an item probabilistically based on the probabilities.