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 bd85d80..2839530 100644 --- a/docs/Adding_Genetic_Operators.html +++ b/docs/Adding_Genetic_Operators.html @@ -1,13 +1,12 @@ -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
- Go to
propeller.variation.cljc
- Define a genetic operator function
- In
propeller.variation/new-individual
, add the new genetic operator in thenew-individual
function under thecase
call
-
- When running a problem, specify the genetic operator in
:variation
. For example:
-
(defn new-individual
"Returns a new individual produced by selection and variation of
individuals in the population."
@@ -25,18 +24,14 @@
:cljs (js/Error
(str "No match in new-individual for " op))))))})
-
lein run -m propeller.problems.simple-regression :variation "{:new-genetic-operator 1.0}"
Selection Genetic Operators
-- Go to
propeller.selection.cljc
- Define a genetic operator function
- In
propeller.selection.cljc
, add the new genetic operator in theselect-parent
function under thecase
call.
-
- When running a problem, specify the selection method in
:parent-selection
-
(defn select-parent
"Selects a parent from the population using the specified method."
[pop argmap]
@@ -46,11 +41,454609 @@
...
))
-
For example:
lein run -m propeller.problems.simple-regression :parent-selection :new-genetic-operator
-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
.
- 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
.
-
- Define the possible Push instructions to be used to create plushys. It should be a non-lazy list of instructions from
push/instructions
- Define an error function that will evaluate plushys and add
:behaviors parsed-outputs
,:errors
, and:total-error
to the individual - Define the function
-main
with a map of default arguments.
-
(defn fetch-examples
"Fetches and returns training and test data from a PSB2 problem.
Returns a map of the form {:train training-examples :test testing-examples}
@@ -23,11 +22,9 @@
[datasets-directory problem-name n-train n-test]
-
Example of a Problem
(ns propeller.problems.PSB2.solve-boolean
(:require [psb2.core :as psb2]
diff --git a/docs/Adding_Selection_Method.html b/docs/Adding_Selection_Method.html
index d0c79be..09ada53 100644
--- a/docs/Adding_Selection_Method.html
+++ b/docs/Adding_Selection_Method.html
@@ -1,20 +1,17 @@
-Adding a Selection Method Generated by Codox
Propeller 0.3.0
Adding a Selection Method
+Adding a Selection Method Generated by Codox
Propeller 0.3.0
Adding a Selection Method
- 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 the case
call:
-
(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 )))
-
- 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"
-
\ No newline at end of file
diff --git a/docs/Additional_Instructions.html b/docs/Additional_Instructions.html
index ebe5251..853d97a 100644
--- a/docs/Additional_Instructions.html
+++ b/docs/Additional_Instructions.html
@@ -1,6 +1,16 @@
-input_output.cljc Generated by Codox
Propeller 0.3.0
Bool, Char, Code, Input-Output, Numeric, and String Instructions
+Additional Instructions Generated by Codox
Propeller 0.3.0
Table of contents
+
+- Additional Instructions
+- input_output.cljc
+- numeric.cljc
+- string.cljc
+- character.cljc
+- bool.cljc
+- code.cljc
+
+Additional Instructions
input_output.cljc
:print_newline
Prints new line
diff --git a/docs/index.html b/docs/index.html
index 6c9d05a..52e3bca 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1,6 +1,6 @@
-Propeller 0.3.0 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
- A Guide to Propeller
- Adding Genetic Operators
- Adding a Problem
- Adding a Selection Method
- input_output.cljc
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.
+Propeller 0.3.0 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
- A Guide to Propeller
- Adding Genetic Operators
- Adding a Problem
- Adding a Selection Method
- Additional Instructions
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.problems.PSB2.bouncing-balls
BOUNCING BALLS from PSB2
diff --git a/docs/propeller.genome.html b/docs/propeller.genome.html
index c0b5bd7..fa73cc5 100644
--- a/docs/propeller.genome.html
+++ b/docs/propeller.genome.html
@@ -1,6 +1,6 @@
-propeller.genome documentation 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.
+propeller.genome documentation 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.
diff --git a/docs/propeller.gp.html b/docs/propeller.gp.html
index 827d81d..86f37c7 100644
--- a/docs/propeller.gp.html
+++ b/docs/propeller.gp.html
@@ -1,6 +1,6 @@
-propeller.gp documentation Generated by Codox
Propeller 0.3.0
propeller.gp
Main genetic programming loop.
+propeller.gp documentation Generated by Codox
Propeller 0.3.0
propeller.gp
Main genetic programming loop.
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.
diff --git a/docs/propeller.problems.PSB2.basement.html b/docs/propeller.problems.PSB2.basement.html
index 542ef52..c36f760 100644
--- a/docs/propeller.problems.PSB2.basement.html
+++ b/docs/propeller.problems.PSB2.basement.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.basement documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.basement
BASEMENT from PSB2
+propeller.problems.PSB2.basement documentation 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 e7f2c78..51afeee 100644
--- a/docs/propeller.problems.PSB2.bouncing-balls.html
+++ b/docs/propeller.problems.PSB2.bouncing-balls.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.bouncing-balls documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.bouncing-balls
BOUNCING BALLS from PSB2
+propeller.problems.PSB2.bouncing-balls documentation 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 67d22f6..8b3a419 100644
--- a/docs/propeller.problems.PSB2.bowling.html
+++ b/docs/propeller.problems.PSB2.bowling.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.bowling documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.bowling
BOWLING from PSB2
+propeller.problems.PSB2.bowling documentation 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 241fc28..c3fc49d 100644
--- a/docs/propeller.problems.PSB2.camel-case.html
+++ b/docs/propeller.problems.PSB2.camel-case.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.camel-case documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.camel-case
CAMEL CASE from PSB2
+propeller.problems.PSB2.camel-case documentation 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 5faec88..5c0d09e 100644
--- a/docs/propeller.problems.PSB2.dice-game.html
+++ b/docs/propeller.problems.PSB2.dice-game.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.dice-game documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.dice-game
DICE GAME from PSB2
+propeller.problems.PSB2.dice-game documentation 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 b9bf571..4e124b4 100644
--- a/docs/propeller.problems.PSB2.fizz-buzz.html
+++ b/docs/propeller.problems.PSB2.fizz-buzz.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.fizz-buzz documentation 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.
+propeller.problems.PSB2.fizz-buzz documentation 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 259bb28..adc0c36 100644
--- a/docs/propeller.problems.PSB2.fuel-cost.html
+++ b/docs/propeller.problems.PSB2.fuel-cost.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.fuel-cost documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.fuel-cost
FUEL COST from PSB2
+propeller.problems.PSB2.fuel-cost documentation 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 57dc5e4..c88b88d 100644
--- a/docs/propeller.problems.PSB2.gcd.html
+++ b/docs/propeller.problems.PSB2.gcd.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.gcd documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.gcd
GCD GREATEST COMMON DIVISOR from PSB2
+propeller.problems.PSB2.gcd documentation 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 7e0ea2e..f679775 100644
--- a/docs/propeller.problems.PSB2.luhn.html
+++ b/docs/propeller.problems.PSB2.luhn.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.luhn documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.luhn
LUHN from PSB2
+propeller.problems.PSB2.luhn documentation 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 9450485..90c554d 100644
--- a/docs/propeller.problems.PSB2.middle-character.html
+++ b/docs/propeller.problems.PSB2.middle-character.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.middle-character documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.middle-character
MIDDLE CHARACTER from PSB2
+propeller.problems.PSB2.middle-character documentation 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 8cadb85..d8fbaaf 100644
--- a/docs/propeller.problems.PSB2.paired-digits.html
+++ b/docs/propeller.problems.PSB2.paired-digits.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.paired-digits documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.paired-digits
PAIRED DIGITS from PSB2
+propeller.problems.PSB2.paired-digits documentation 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 423f8cf..4defa18 100644
--- a/docs/propeller.problems.PSB2.shopping-list.html
+++ b/docs/propeller.problems.PSB2.shopping-list.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.shopping-list documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.shopping-list
DICE GAME from PSB2
+propeller.problems.PSB2.shopping-list documentation 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 bd89aca..49ac690 100644
--- a/docs/propeller.problems.PSB2.snow-day.html
+++ b/docs/propeller.problems.PSB2.snow-day.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.snow-day documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.snow-day
SNOW DAY from PSB2
+propeller.problems.PSB2.snow-day documentation 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 d857fdc..599ff38 100644
--- a/docs/propeller.problems.PSB2.solve-boolean.html
+++ b/docs/propeller.problems.PSB2.solve-boolean.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.solve-boolean documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.solve-boolean
SOLVE BOOLEAN from PSB2
+propeller.problems.PSB2.solve-boolean documentation 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 1958e92..a2dd3cf 100644
--- a/docs/propeller.problems.PSB2.spin-words.html
+++ b/docs/propeller.problems.PSB2.spin-words.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.spin-words documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.spin-words
SPIN WORDS from PSB2
+propeller.problems.PSB2.spin-words documentation 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 0a3dc65..a94c1ff 100644
--- a/docs/propeller.problems.PSB2.square-digits.html
+++ b/docs/propeller.problems.PSB2.square-digits.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.square-digits documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.square-digits
SQUARE DIGITS from PSB2
+propeller.problems.PSB2.square-digits documentation 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 b2a0e80..3f8f584 100644
--- a/docs/propeller.problems.PSB2.substitution-cipher.html
+++ b/docs/propeller.problems.PSB2.substitution-cipher.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.substitution-cipher documentation Generated by Codox
Propeller 0.3.0
propeller.problems.PSB2.substitution-cipher
SUBSTITUTION CIPHER from PSB2
+propeller.problems.PSB2.substitution-cipher documentation 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 17481cf..70cc9c8 100644
--- a/docs/propeller.problems.PSB2.twitter.html
+++ b/docs/propeller.problems.PSB2.twitter.html
@@ -1,6 +1,6 @@
-propeller.problems.PSB2.twitter documentation 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.
+propeller.problems.PSB2.twitter documentation 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 c102296..46b4d0e 100644
--- a/docs/propeller.problems.simple-regression.html
+++ b/docs/propeller.problems.simple-regression.html
@@ -1,6 +1,6 @@
-propeller.problems.simple-regression documentation Generated by Codox
Propeller 0.3.0
propeller.problems.simple-regression
Simple Regression:
+propeller.problems.simple-regression documentation 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.number-io.html b/docs/propeller.problems.software.number-io.html
index 1c4c1b4..8a1a960 100644
--- a/docs/propeller.problems.software.number-io.html
+++ b/docs/propeller.problems.software.number-io.html
@@ -1,6 +1,6 @@
-propeller.problems.software.number-io documentation Generated by Codox
Propeller 0.3.0
propeller.problems.software.number-io
Number IO from iJava (http://ijava.cs.umass.edu/)
+propeller.problems.software.number-io documentation Generated by Codox
Propeller 0.3.0
propeller.problems.software.number-io
Number IO from iJava (http://ijava.cs.umass.edu/)
This problem file defines the following problem:
There are two inputs, a float and an int. The program must read them in, find their sum as a float, and print the result as a float.
diff --git a/docs/propeller.problems.software.smallest.html b/docs/propeller.problems.software.smallest.html
index 010145b..af78820 100644
--- a/docs/propeller.problems.software.smallest.html
+++ b/docs/propeller.problems.software.smallest.html
@@ -1,6 +1,6 @@
-propeller.problems.software.smallest documentation Generated by Codox
Propeller 0.3.0
propeller.problems.software.smallest
SMALLEST PROBLEM from C. Le Goues et al., "The ManyBugs and IntroClass Benchmarks
+propeller.problems.software.smallest documentation Generated by Codox
Propeller 0.3.0
propeller.problems.software.smallest
SMALLEST PROBLEM from C. Le Goues et al., "The ManyBugs and IntroClass Benchmarks
for Automated Repair of C Programs," in IEEE Transactions on Software
Engineering, vol. 41, no. 12, pp. 1236-1256, Dec. 1 2015.
diff --git a/docs/propeller.problems.string-classification.html b/docs/propeller.problems.string-classification.html
index 25c33fe..cf9853b 100644
--- a/docs/propeller.problems.string-classification.html
+++ b/docs/propeller.problems.string-classification.html
@@ -1,6 +1,6 @@
-propeller.problems.string-classification documentation Generated by Codox
Propeller 0.3.0
propeller.problems.string-classification
String Classification:
+propeller.problems.string-classification documentation 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 c6a7af9..09eb691 100644
--- a/docs/propeller.problems.valiant.html
+++ b/docs/propeller.problems.valiant.html
@@ -1,6 +1,6 @@
-propeller.problems.valiant documentation 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.
+propeller.problems.valiant documentation 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)
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. The behavior is here defined as the final top item on the BOOLEAN stack.
instructions
A list of instructions which includes keyword strings with the format “in + i” where i is a number from 0 to num-vars-1 concatenated with boolean and exec_if instructions and close.
diff --git a/docs/propeller.push.instructions.bool.html b/docs/propeller.push.instructions.bool.html
index cfad457..0ca4d19 100644
--- a/docs/propeller.push.instructions.bool.html
+++ b/docs/propeller.push.instructions.bool.html
@@ -1,4 +1,4 @@
-propeller.push.instructions.bool documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.bool
BOOLEAN Instructions, created with propeller.push.instructions/def-instruction
. List of instructions can be found at Additional Instructions.
+propeller.push.instructions.bool documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.bool
BOOLEAN Instructions, created with propeller.push.instructions/def-instruction
. List of instructions can be found at Additional Instructions.
\ No newline at end of file
diff --git a/docs/propeller.push.instructions.character.html b/docs/propeller.push.instructions.character.html
index 63935b1..8effdbd 100644
--- a/docs/propeller.push.instructions.character.html
+++ b/docs/propeller.push.instructions.character.html
@@ -1,4 +1,4 @@
-propeller.push.instructions.character documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.character
CHAR Instructions, created with propeller.push.instructions/def-instruction
. List of instructions can be found at Additional Instructions.
+propeller.push.instructions.character documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.character
CHAR Instructions, created with propeller.push.instructions/def-instruction
. List of instructions can be found at Additional Instructions.
\ No newline at end of file
diff --git a/docs/propeller.push.instructions.code.html b/docs/propeller.push.instructions.code.html
index ee510fd..b57ca4d 100644
--- a/docs/propeller.push.instructions.code.html
+++ b/docs/propeller.push.instructions.code.html
@@ -1,4 +1,4 @@
-propeller.push.instructions.code documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.code
CODE Instructions, created with propeller.push.instructions/def-instruction
. List of instructions can be found at Additional Instructions.
+propeller.push.instructions.code documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.code
CODE Instructions, created with propeller.push.instructions/def-instruction
. List of instructions can be found at Additional Instructions.
\ No newline at end of file
diff --git a/docs/propeller.push.instructions.html b/docs/propeller.push.instructions.html
index 0124fb5..e77b7de 100644
--- a/docs/propeller.push.instructions.html
+++ b/docs/propeller.push.instructions.html
@@ -1,6 +1,6 @@
-propeller.push.instructions documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions
Push Instructions
+propeller.push.instructions documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions
Push Instructions
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
.
diff --git a/docs/propeller.push.instructions.input-output.html b/docs/propeller.push.instructions.input-output.html
index 70af792..6bbb302 100644
--- a/docs/propeller.push.instructions.input-output.html
+++ b/docs/propeller.push.instructions.input-output.html
@@ -1,6 +1,6 @@
-propeller.push.instructions.input-output documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.input-output
INPUT and OUTPUT Instructions. Additional instructions can be found at Additional Instructions.
+propeller.push.instructions.input-output documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.input-output
INPUT and OUTPUT Instructions. Additional instructions can be found at Additional Instructions.
_print
Instruction to print output.
handle-input-instruction
(handle-input-instruction state instruction)
Allows Push to handle input instructions of the form :inN, e.g. :in2, taking elements thus labeled from the :input map and pushing them onto the :exec stack.
\ No newline at end of file
diff --git a/docs/propeller.push.instructions.numeric.html b/docs/propeller.push.instructions.numeric.html
index efaede2..8270c8e 100644
--- a/docs/propeller.push.instructions.numeric.html
+++ b/docs/propeller.push.instructions.numeric.html
@@ -1,6 +1,6 @@
-propeller.push.instructions.numeric documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.numeric
FLOAT and INTEGER Instructions (polymorphic). Additional instructions can be found at Additional Instructions.
+propeller.push.instructions.numeric documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.numeric
FLOAT and INTEGER Instructions (polymorphic). Additional instructions can be found at Additional Instructions.
_add
Pushes the sum of the top two items onto the same stack
_dec
FIXME: write docs
_from_boolean
Pushes 1 / 1.0 if the top BOOLEAN is TRUE, or 0 / 0.0 if FALSE
diff --git a/docs/propeller.push.instructions.polymorphic.html b/docs/propeller.push.instructions.polymorphic.html
index 414a3cf..0244a02 100644
--- a/docs/propeller.push.instructions.polymorphic.html
+++ b/docs/propeller.push.instructions.polymorphic.html
@@ -1,6 +1,6 @@
-propeller.push.instructions.polymorphic documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.polymorphic
Polymorphic Instructions (for all stacks, with the exception of non-data ones like input and output)
+propeller.push.instructions.polymorphic documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.polymorphic
Polymorphic Instructions (for all stacks, with the exception of non-data ones like input and output)
_deep_dup
Pushes a copy of an indexed item from deep in the stack, without removing it. The top INTEGER is used to determine the index from the BOTTOM of the stack.
_dup
Duplicates the top item of the stack. Does not pop its argument (since that would negate the effect of the duplication)
_dup_items
Duplicates the top n items on the stack, one time each. The number n is determined by the top INTEGER. If n <= 0, no items will be duplicated. If fewer than n items are on the stack, the entire stack will be duplicated. The final number of items on the stack is limited to globals/max-stack-items.
diff --git a/docs/propeller.push.instructions.string.html b/docs/propeller.push.instructions.string.html
index 58976b1..80a42e3 100644
--- a/docs/propeller.push.instructions.string.html
+++ b/docs/propeller.push.instructions.string.html
@@ -1,4 +1,4 @@
-propeller.push.instructions.string documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.string
STRING Instructions, created with propeller.push.instructions/def-instruction
. List of instructions can be found at Additional Instructions.
+propeller.push.instructions.string documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.string
STRING Instructions, created with propeller.push.instructions/def-instruction
. List of instructions can be found at Additional Instructions.
\ No newline at end of file
diff --git a/docs/propeller.push.instructions.vector.html b/docs/propeller.push.instructions.vector.html
index 35935dc..ab16d4a 100644
--- a/docs/propeller.push.instructions.vector.html
+++ b/docs/propeller.push.instructions.vector.html
@@ -1,6 +1,6 @@
-propeller.push.instructions.vector documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.vector
VECTOR instructions for all vector element subtypes: BOOLEAN, FLOAT, INTEGER, and STRING.
+propeller.push.instructions.vector documentation Generated by Codox
Propeller 0.3.0
propeller.push.instructions.vector
VECTOR instructions for all vector element subtypes: BOOLEAN, FLOAT, INTEGER, and STRING.
_butlast
Pushes the butlast of the top item
_concat
Concats and pushes the top two vectors of the stack
_conj
Conj’s the top item of the appropriately-typed literal stack onto the vector stack (e.g. pop the top INTEGER and conj it onto the top VECTOR_INTEGER)
diff --git a/docs/propeller.push.interpreter.html b/docs/propeller.push.interpreter.html
index e7edc5f..de0ff1c 100644
--- a/docs/propeller.push.interpreter.html
+++ b/docs/propeller.push.interpreter.html
@@ -1,6 +1,6 @@
-propeller.push.interpreter documentation Generated by Codox
Propeller 0.3.0