A Guide to Propeller
+Generated by Codox
Propeller 0.3.0
A Guide to Propeller
Propeller is an implementation of the Push programming language and the PushGP genetic programming system in Clojure.
For more information on Push and PushGP see http://pushlanguage.org.
Overview
diff --git a/docs/Adding_Genetic_Operators.html b/docs/Adding_Genetic_Operators.html index 966c6fd..704e915 100644 --- a/docs/Adding_Genetic_Operators.html +++ b/docs/Adding_Genetic_Operators.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
Adding Genetic Operators
+Generated by Codox
Propeller 0.3.0
Adding Genetic Operators
In addition to the already-included genetic operators, you can add your own!
Variation Genetic Operators
-
diff --git a/docs/Adding_Problem.html b/docs/Adding_Problem.html
index d676b4e..0abc369 100644
--- a/docs/Adding_Problem.html
+++ b/docs/Adding_Problem.html
@@ -1,6 +1,6 @@
-
- To add a new problem, you need training and test data. For Problem Synthesis Benchmark Problems (PSB2), you can fetch datasets using
psb2.core/fetch-examples
.
diff --git a/docs/Adding_Selection_Method.html b/docs/Adding_Selection_Method.html
index 848020e..d5ae63a 100644
--- a/docs/Adding_Selection_Method.html
+++ b/docs/Adding_Selection_Method.html
@@ -1,19 +1,22 @@
- - Define a selection method function in
propeller.selection
that selects an individual from the population - Add the selection method in
propeller.selection/select-parent
under thecase
call: - When runnning a problem, specify the selection method in
:parent-selection
. For example:
-
Generated by Codox
Propeller 0.3.0
Adding a Problem
+Generated by Codox
Propeller 0.3.0
Adding a Problem
In general, a problem file has 3 components: train-and-test-data
, instructions
, error-function
, and -main
.
Generated by Codox
Propeller 0.3.0
Adding a Selection Method
+Generated by Codox
Propeller 0.3.0
Adding a Selection Method
(defn select-parent
- "Selects a parent from the population using the specified method."
- [pop argmap]
- (case (:parent-selection argmap)
- :new-selection-method (new-selection-method )))
-
--
-
lein run -m propeller.problems.simple-regression :parent-selection :new-selection-method"
+ (defn select-parent
+ "Selects a parent from the population using the specified method."
+ [pop argmap]
+ (case (:parent-selection argmap)
+ :new-selection-method (new-selection-method )))
+ ```
+3. When runnning a problem, specify the selection method in `:parent-selection`.
+For example:
+ ```
+ lein run -m propeller.problems.simple-regression :parent-selection :new-selection-method"
+ ```
+
+
Generated by Codox
Propeller 0.3.0
Propeller 0.3.0
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.0"]
Topics
Namespaces
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.
Generated by Codox
Propeller 0.3.0
Propeller 0.3.0
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.0"]
Topics
Namespaces
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:
propeller.push.instructions.vector
Vector instructions for all vector element subtypes: BOOLEAN, FLOAT, INTEGER, and STRING.
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:
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:
propeller.session
The “session” namespace is for trying things out interactively. For example, you can use it to test a new Push instruction by running a program that uses it and seeing the result. You might just want to do this interactively in the REPL, but the session file makes it a little easier since it already requires most of the namespaces you’ll want to refer to.
-Public variables and functions:
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:
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:
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.
Generated by Codox
Propeller 0.3.0
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.
Generated by Codox
Propeller 0.3.0
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.
Generated by Codox
Propeller 0.3.0
propeller.gp
gp
(gp {:keys [population-size max-generations error-function instructions max-initial-plushy-size solution-error-threshold mapper], :or {solution-error-threshold 0.0, mapper pmap}, :as argmap})
Main GP loop.
-report
(report pop generation argmap)
Reports information each generation.
+Generated by Codox
Propeller 0.3.0
propeller.gp
gp
(gp {:keys [population-size max-generations error-function instructions max-initial-plushy-size solution-error-threshold mapper], :or {solution-error-threshold 0.0, mapper pmap}, :as argmap})
Main GP loop.
+On each iteration, it creates a population of random plushies using a mapper function and genome/make-random-plushy function, then it sorts the population by the total error using the error-function and sort-by function. It then takes the best individual from the sorted population, and if the parent selection is set to epsilon-lexicase, it adds the epsilons to the argmap.
+The function then checks if the custom-report argument is set, if so it calls that function passing the evaluated population, current generation and argmap. If not, it calls the report function passing the evaluated population, current generation and argmap.
+Then, it checks if the total error of the best individual is less than or equal to the solution-error-threshold or if the current generation is greater than or equal to the max-generations specified. If either is true, the function exits with the best individual or nil. If not, it creates new individuals for the next generation using the variation/new-individual function and the repeatedly function, and then continues to the next iteration of the loop.
+report
(report pop generation argmap)
Reports information for each generation.
Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.basement
BASEMENT from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.basement
BASEMENT from PSB2
Given a vector of integers, return the first index such that the sum of all integers from the start of the vector to that index (inclusive) is negative.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.bouncing-balls.html b/docs/propeller.problems.PSB2.bouncing-balls.html index 557fc98..80e6686 100644 --- a/docs/propeller.problems.PSB2.bouncing-balls.html +++ b/docs/propeller.problems.PSB2.bouncing-balls.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.bouncing-balls
BOUNCING BALLS from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.bouncing-balls
BOUNCING BALLS from PSB2
Given a starting height and a height after the first bounce of a dropped ball, calculate the bounciness index (height of first bounce / starting height). Then, given a number of bounces, use the bounciness index to calculate the total distance that the ball travels across those bounces.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.bowling.html b/docs/propeller.problems.PSB2.bowling.html index fddeaf5..0124beb 100644 --- a/docs/propeller.problems.PSB2.bowling.html +++ b/docs/propeller.problems.PSB2.bowling.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.bowling
BOWLING from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.bowling
BOWLING from PSB2
Given a string representing the individual bowls in a 10-frame round of 10 pin bowling, return the score of that round.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.camel-case.html b/docs/propeller.problems.PSB2.camel-case.html index ce15ca4..2564276 100644 --- a/docs/propeller.problems.PSB2.camel-case.html +++ b/docs/propeller.problems.PSB2.camel-case.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.camel-case
CAMEL CASE from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.camel-case
CAMEL CASE from PSB2
Take a string in kebab-case and convert all of the words to camelCase. Each group of words to convert is delimited by “-”, and each grouping is separated by a space. For example: “camel-case example-test-string” → “camelCase exampleTestString”
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.dice-game.html b/docs/propeller.problems.PSB2.dice-game.html index b4b739e..036b9c4 100644 --- a/docs/propeller.problems.PSB2.dice-game.html +++ b/docs/propeller.problems.PSB2.dice-game.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.dice-game
DICE GAME from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.dice-game
DICE GAME from PSB2
Peter has an n sided die and Colin has an m sided die. If they both roll their dice at the same time, return the probability that Peter rolls strictly higher than Colin.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.fizz-buzz.html b/docs/propeller.problems.PSB2.fizz-buzz.html index 256a169..4d97faa 100644 --- a/docs/propeller.problems.PSB2.fizz-buzz.html +++ b/docs/propeller.problems.PSB2.fizz-buzz.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
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.
+Generated by Codox
Propeller 0.3.0
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.
-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 STRING stack.
diff --git a/docs/propeller.problems.PSB2.fuel-cost.html b/docs/propeller.problems.PSB2.fuel-cost.html index 65bf2ed..5897ed0 100644 --- a/docs/propeller.problems.PSB2.fuel-cost.html +++ b/docs/propeller.problems.PSB2.fuel-cost.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.fuel-cost
FUEL COST from PSB2
+Generated by Codox
Propeller 0.3.0
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.
diff --git a/docs/propeller.problems.PSB2.gcd.html b/docs/propeller.problems.PSB2.gcd.html index e9fc928..170e2e1 100644 --- a/docs/propeller.problems.PSB2.gcd.html +++ b/docs/propeller.problems.PSB2.gcd.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.gcd
GCD GREATEST COMMON DIVISOR from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.gcd
GCD GREATEST COMMON DIVISOR from PSB2
Given two integers, return the largest integer that divides each of the integers evenly
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.luhn.html b/docs/propeller.problems.PSB2.luhn.html index 3afcc1a..f574c64 100644 --- a/docs/propeller.problems.PSB2.luhn.html +++ b/docs/propeller.problems.PSB2.luhn.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.luhn
LUHN from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.luhn
LUHN from PSB2
Given a vector of 16 digits, implement Luhn’s algorithm to verify a credit card number, such that it follows the following rules: double every other digit starting with the second digit. If any of the results are over 9, subtract 9 from them. Return the sum of all of the new digits.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.middle-character.html b/docs/propeller.problems.PSB2.middle-character.html index 19b9c1f..e3543a1 100644 --- a/docs/propeller.problems.PSB2.middle-character.html +++ b/docs/propeller.problems.PSB2.middle-character.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.middle-character
MIDDLE CHARACTER from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.middle-character
MIDDLE CHARACTER from PSB2
Given a string, return the middle character as a string if it is odd length; return the two middle characters as a string if it is even length.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.paired-digits.html b/docs/propeller.problems.PSB2.paired-digits.html index a19161f..cebf5eb 100644 --- a/docs/propeller.problems.PSB2.paired-digits.html +++ b/docs/propeller.problems.PSB2.paired-digits.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.paired-digits
PAIRED DIGITS from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.paired-digits
PAIRED DIGITS from PSB2
Given a string of digits, return the sum of the digits whose following digit is the same.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.shopping-list.html b/docs/propeller.problems.PSB2.shopping-list.html index 8c81bcd..52b4e26 100644 --- a/docs/propeller.problems.PSB2.shopping-list.html +++ b/docs/propeller.problems.PSB2.shopping-list.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.shopping-list
DICE GAME from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.shopping-list
DICE GAME from PSB2
Peter has an n sided die and Colin has an m sided die. If they both roll their dice at the same time, return the probability that Peter rolls strictly higher than Colin.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.snow-day.html b/docs/propeller.problems.PSB2.snow-day.html index fe725bf..5ed8514 100644 --- a/docs/propeller.problems.PSB2.snow-day.html +++ b/docs/propeller.problems.PSB2.snow-day.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.snow-day
SNOW DAY from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.snow-day
SNOW DAY from PSB2
Given an integer representing a number of hours and 3 floats representing how much snow is on the ground, the rate of snow fall, and the proportion of snow melting per hour, return the amount of snow on the ground after the amount of hours given. Each hour is considered a discrete event of adding snow and then melting, not a continuous process.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.solve-boolean.html b/docs/propeller.problems.PSB2.solve-boolean.html index aef5199..5931c97 100644 --- a/docs/propeller.problems.PSB2.solve-boolean.html +++ b/docs/propeller.problems.PSB2.solve-boolean.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.solve-boolean
SOLVE BOOLEAN from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.solve-boolean
SOLVE BOOLEAN from PSB2
Given a string representing a Boolean expression consisting of T, F, |, and &, evaluate it and return the resulting Boolean.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.spin-words.html b/docs/propeller.problems.PSB2.spin-words.html index d25b7f3..c084687 100644 --- a/docs/propeller.problems.PSB2.spin-words.html +++ b/docs/propeller.problems.PSB2.spin-words.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.spin-words
SPIN WORDS from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.spin-words
SPIN WORDS from PSB2
Given a string of one or more words (separated by spaces), reverse all of the words that are five or more letters long and return the resulting string.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.square-digits.html b/docs/propeller.problems.PSB2.square-digits.html index 0fa9d37..9a4fbe5 100644 --- a/docs/propeller.problems.PSB2.square-digits.html +++ b/docs/propeller.problems.PSB2.square-digits.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.square-digits
SQUARE DIGITS from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.square-digits
SQUARE DIGITS from PSB2
Given a positive integer, square each digit and concatenate the squares into a returned string.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.substitution-cipher.html b/docs/propeller.problems.PSB2.substitution-cipher.html index 6e115b1..2b3d771 100644 --- a/docs/propeller.problems.PSB2.substitution-cipher.html +++ b/docs/propeller.problems.PSB2.substitution-cipher.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.substitution-cipher
SUBSTITUTION CIPHER from PSB2
+Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.substitution-cipher
SUBSTITUTION CIPHER from PSB2
This problem gives 3 strings. The first two represent a cipher, mapping each character in one string to the one at the same index in the other string. The program must apply this cipher to the third string and return the deciphered message.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
diff --git a/docs/propeller.problems.PSB2.twitter.html b/docs/propeller.problems.PSB2.twitter.html index 48c4af8..efb8c3c 100644 --- a/docs/propeller.problems.PSB2.twitter.html +++ b/docs/propeller.problems.PSB2.twitter.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
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.
+Generated by Codox
Propeller 0.3.0
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.
-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 STRING stack.
diff --git a/docs/propeller.problems.simple-regression.html b/docs/propeller.problems.simple-regression.html index 6b7e287..f091d09 100644 --- a/docs/propeller.problems.simple-regression.html +++ b/docs/propeller.problems.simple-regression.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.simple-regression
Simple Regression:
+Generated by Codox
Propeller 0.3.0
propeller.problems.simple-regression
Simple Regression:
Given inputs and outputs, find the target function.
-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. The error is the absolute deviation between the target output value and the program’s selected behavior, or 1000000 if no behavior is produced. The behavior is here defined as the final top item on the INTEGER stack.
diff --git a/docs/propeller.problems.software.fizz-buzz.html b/docs/propeller.problems.software.fizz-buzz.html index 9c01b6f..4b48bb4 100644 --- a/docs/propeller.problems.software.fizz-buzz.html +++ b/docs/propeller.problems.software.fizz-buzz.html @@ -1,3 +1,3 @@ -Generated by Codox
Propeller 0.3.0
propeller.problems.software.fizz-buzz
train-and-test
Generated by Codox
Propeller 0.3.0
propeller.problems.software.fizz-buzz
train-and-test
Generated by Codox
Propeller 0.3.0
propeller.problems.software.number-io
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
+Generated by Codox
Propeller 0.3.0
propeller.problems.software.number-io
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
error-function
(error-function argmap data individual)
instructions
random-float
(random-float)
random-int
(random-int)
train-and-test-data
Generated by Codox
Propeller 0.3.0
propeller.problems.software.smallest
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
+Generated by Codox
Propeller 0.3.0
propeller.problems.software.smallest
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
error-function
(error-function argmap data individual)
instructions
random-int
(random-int)
train-and-test-data
Generated by Codox
Propeller 0.3.0
propeller.problems.string-classification
String Classification:
+Generated by Codox
Propeller 0.3.0
propeller.problems.string-classification
String Classification:
Given a string, return true if it contains A, C, G, and T. Else return false.
-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 BOOLEAN stack.
diff --git a/docs/propeller.problems.valiant.html b/docs/propeller.problems.valiant.html index f462cb8..a7195f5 100644 --- a/docs/propeller.problems.valiant.html +++ b/docs/propeller.problems.valiant.html @@ -1,5 +1,5 @@ -Generated by Codox
Propeller 0.3.0
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.
+Generated by Codox
Propeller 0.3.0
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.
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
error-function
(error-function argmap data individual)
instructions
num-inputs
num-test
num-train
num-vars
train-and-test-data
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.bool
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.bool
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.character
Push instructions for CHARs.
+Generated by Codox
Propeller 0.3.0
propeller.push.instructions.character
Push instructions for CHARs.
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.code
Push instructions for code.
+Generated by Codox
Propeller 0.3.0
propeller.push.instructions.code
Push instructions for code.
Generated by Codox
Propeller 0.3.0
propeller.push.instructions
cls->type
def-instruction
(def-instruction instruction function)
Defines a Push instruction as a keyword-function pair, and adds it to the instruction table
+Generated by Codox
Propeller 0.3.0
propeller.push.instructions
cls->type
def-instruction
(def-instruction instruction function)
Defines a Push instruction as a keyword-function pair, and adds it to the instruction table
generate-instructions
(generate-instructions stacks functions)
Given a sequence of stacks, e.g. :float :integer, and a sequence of suffix function strings, e.g. _add, _mult, _eq, automates the generation of all possible combination instructions, which here would be :float_add, :float_mult, :float_eq, :integer_add, :integer_mult, and :integer_eq, also transferring and updating the generic function’s stack-type metadata. For some vector instructions, the placeholder :elem will be replaced with the stack of the corresponding element type (e.g. for :vector_integer, with :integer)
get-literal-type
(get-literal-type data)
If a piece of data is a literal, return its corresponding stack name e.g. :integer
. Otherwise, return nil
.
get-stack-instructions
(get-stack-instructions stacks)
Given a set of stacks, returns all instructions that operate on those stacks only. Won’t include random instructions unless :random is in the set as well
diff --git a/docs/propeller.push.instructions.input-output.html b/docs/propeller.push.instructions.input-output.html index 3332791..3e5580b 100644 --- a/docs/propeller.push.instructions.input-output.html +++ b/docs/propeller.push.instructions.input-output.html @@ -1,4 +1,4 @@ -Generated by Codox
Propeller 0.3.0
propeller.push.instructions.input-output
Push instructions for input and output.
+Generated by Codox
Propeller 0.3.0
propeller.push.instructions.input-output
Push instructions for input and output.
_print
handle-input-instruction
(handle-input-instruction state instruction)
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.numeric
_add
_dec
_from_boolean
_from_char
_from_string
_gt
_gte
_inc
_lt
_lte
_max
_min
_mod
_mult
_quot
_subtract
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.numeric
_add
_dec
_from_boolean
_from_char
_from_string
_gt
_gte
_inc
_lt
_lte
_max
_min
_mod
_mult
_quot
_subtract
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.polymorphic
_deep_dup
_dup
_dup_items
_dup_times
_empty
_eq
_flush
_pop
_rot
_shove
_stack_depth
_swap
_yank
_yank_dup
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.polymorphic
_deep_dup
_dup
_dup_items
_dup_times
_empty
_eq
_flush
_pop
_rot
_shove
_stack_depth
_swap
_yank
_yank_dup
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.string
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.string
Generated by Codox
Propeller 0.3.0
propeller.push.instructions.vector
Vector instructions for all vector element subtypes: BOOLEAN, FLOAT, INTEGER, and STRING.
+Generated by Codox
Propeller 0.3.0
propeller.push.instructions.vector
Vector instructions for all vector element subtypes: BOOLEAN, FLOAT, INTEGER, and STRING.
_butlast
_concat
_conj
_contains
_emptyvector
_first
_indexof
_iterate
_last
_length
_nth
_occurrencesof
_pushall
_remove
_replace
_replacefirst
_rest
_reverse
_set
_subvec
_take
Generated by Codox
Propeller 0.3.0
propeller.push.interpreter
interpret-one-step
(interpret-one-step state)
Takes a Push state and executes the next instruction on the exec stack.
+Generated by Codox
Propeller 0.3.0
propeller.push.interpreter
interpret-one-step
(interpret-one-step state)
Takes a Push state and executes the next instruction on the exec stack.
interpret-program
(interpret-program program start-state step-limit)
Runs the given problem starting with the stacks in start-state. If the start-state includes the key :keep-history with a truthy value, then the returned state will include the key :history with a value that is a vector containing all states prior to the final state.
Generated by Codox
Propeller 0.3.0
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.
+Generated by Codox
Propeller 0.3.0
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.
limit-code
(limit-code code)
Limits code to max-code-points and max-code-depth.
limit-number
(limit-number n)
Returns a version of the number n that is within reasonable size bounds.
limit-string
(limit-string s)
Limits string length to max-string-length.
diff --git a/docs/propeller.push.state.html b/docs/propeller.push.state.html index bab20b8..ccd44ee 100644 --- a/docs/propeller.push.state.html +++ b/docs/propeller.push.state.html @@ -1,3 +1,3 @@ -Generated by Codox
Propeller 0.3.0
propeller.push.state
empty-stack?
(empty-stack? state stack)
empty-state
example-state
get-args-from-stacks
(get-args-from-stacks state stacks)
peek-stack
(peek-stack state stack)
peek-stack-many
(peek-stack-many state stack n)
pop-stack
(pop-stack state stack)
pop-stack-many
(pop-stack-many state stack n)
print-state
(print-state state)
push-to-stack
(push-to-stack state stack item)
push-to-stack-many
(push-to-stack-many state stack items)
stack-limiter
stack-size
(stack-size state stack)
stacks
vec-stacks
Generated by Codox
Propeller 0.3.0
propeller.push.state
empty-stack?
(empty-stack? state stack)
empty-state
example-state
get-args-from-stacks
(get-args-from-stacks state stacks)
peek-stack
(peek-stack state stack)
peek-stack-many
(peek-stack-many state stack n)
pop-stack
(pop-stack state stack)
pop-stack-many
(pop-stack-many state stack n)
print-state
(print-state state)
push-to-stack
(push-to-stack state stack item)
push-to-stack-many
(push-to-stack-many state stack items)
stack-limiter
stack-size
(stack-size state stack)
stacks
vec-stacks
Generated by Codox
Propeller 0.3.0
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.
+Generated by Codox
Propeller 0.3.0
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.
epsilon-lexicase-selection
(epsilon-lexicase-selection pop argmap)
Selects an individual from the population using epsilon-lexicase selection. Epsilon lexicase selection follows the same process as lexicase selection except, for a test case, only individuals with an error outside of a predefined epsilon are filtered.
epsilon-list
(epsilon-list pop)
List of epsilons for each training case based on median absolute deviation of errors.
lexicase-selection
(lexicase-selection pop argmap)
Selects an individual from the population using lexicase selection. Lexicase parent selection filters the population by considering one random training case at a time, eliminating any individuals with errors for the current case that are worse than the best error in the selection pool, until a single individual remains.
diff --git a/docs/propeller.simplification.html b/docs/propeller.simplification.html index d417876..9a49197 100644 --- a/docs/propeller.simplification.html +++ b/docs/propeller.simplification.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.simplification
To use Propeller’s auto-simplification system, simply include the following four command line arguments when running a problem:
+Generated by Codox
Propeller 0.3.0
propeller.simplification
To use Propeller’s auto-simplification system, simply include the following four command line arguments when running a problem:
:simplification? true
Toggle auto-simplification
diff --git a/docs/propeller.tools.calculus.html b/docs/propeller.tools.calculus.html index 4b9cd8b..1cd92e4 100644 --- a/docs/propeller.tools.calculus.html +++ b/docs/propeller.tools.calculus.html @@ -1,5 +1,5 @@ -Generated by Codox
Propeller 0.3.0
propeller.tools.calculus
deriv
(deriv f c)
(deriv f)
Returns the derivative of f evaluated at c. If called with only one argument, it returns the derivative function.
+Generated by Codox
Propeller 0.3.0
propeller.tools.calculus
deriv
(deriv f c)
(deriv f)
Returns the derivative of f evaluated at c. If called with only one argument, it returns the derivative function.
dx
integrate
(integrate f)
(integrate f a b)
Returns the definite integral of f over a, b using Simpson’s method. If called with only one argument (the function), returns the indefinite integral, which takes as input a value x and (optionally) a constant c.
Generated by Codox
Propeller 0.3.0
propeller.tools.character
get-ascii
(get-ascii c)
Gets the ASCII code of a char
+Generated by Codox
Propeller 0.3.0
propeller.tools.character
get-ascii
(get-ascii c)
Gets the ASCII code of a char
is-digit
(is-digit c)
Returns true if the given character is a digit, 0-9.
is-letter
(is-letter c)
Returns true if the given character is a letter, A-Z or a-z.
is-whitespace
(is-whitespace c)
Returns true if the given character is whitespace (newline, space, tab).
diff --git a/docs/propeller.tools.distributions.html b/docs/propeller.tools.distributions.html index 27c6295..56eaa3c 100644 --- a/docs/propeller.tools.distributions.html +++ b/docs/propeller.tools.distributions.html @@ -1,6 +1,6 @@ -Generated by Codox
Propeller 0.3.0
propeller.tools.distributions
cdf-norm
(cdf-norm {:keys [x mu sigma], :or {mu 0, sigma 1}})
Parameters: {:keys x mu sigma} Returns the value of the Normal Cumulative Distribution Function at a particular value x. If no distributional parameters are provided, defaults to the Standard Normal CDF. Accepts an argument map with keys :x, and optionally :mu and :sigma.
+Generated by Codox
Propeller 0.3.0
propeller.tools.distributions
cdf-norm
(cdf-norm {:keys [x mu sigma], :or {mu 0, sigma 1}})
Parameters: {:keys x mu sigma} Returns the value of the Normal Cumulative Distribution Function at a particular value x. If no distributional parameters are provided, defaults to the Standard Normal CDF. Accepts an argument map with keys :x, and optionally :mu and :sigma.
pdf-norm
(pdf-norm {:keys [x mu sigma], :or {mu 0, sigma 1}})
Returns the value of the Normal Probability Distribution Function at a particular value x. If no distributional parameters are provided, defaults to the Standard Normal PDF. Accepts an argument map with keys :x, and optionally :mu and :sigma.
quant-norm
(quant-norm {:keys [p mu sigma], :or {mu 0, sigma 1}})
For a given probability p, returns the corresponding value of the quantile function (i.e. the inverse Cumulative Distribution Function). If no distributional parameters are provided, defaults to Standard Normal quantiles. Accepts an argument map with keys :p, and optionally :mu and :sigma.
rand-norm
(rand-norm {:keys [n mu sigma], :or {n 1, mu 0, sigma 1}})
Generates n Normally-distributed random variables with given mean and standard deviation. If no parameters are provided, defaults to a single random observation from a Standard Normal distribution. Accepts an argument map with optional keys :n, :mu, and :sigma.
diff --git a/docs/propeller.tools.math.html b/docs/propeller.tools.math.html index 229bfe7..1e4ba89 100644 --- a/docs/propeller.tools.math.html +++ b/docs/propeller.tools.math.html @@ -1,6 +1,6 @@ -