diff --git a/.gitignore b/.gitignore index d18f225..c8f7bb6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ pom.xml.asc /.nrepl-port .hgignore .hg/ +*.iml +.idea/ +out diff --git a/propeller.iml b/propeller.iml index 5c05a54..073e101 100644 --- a/propeller.iml +++ b/propeller.iml @@ -5,18 +5,33 @@ - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/propeller/genome.cljc b/src/propeller/genome.cljc index 6c460e2..5c12462 100755 --- a/src/propeller/genome.cljc +++ b/src/propeller/genome.cljc @@ -11,7 +11,7 @@ (defn plushy->push "Returns the Push program expressed by the given plushy representation." - [plushy] + [plushy argmap] (let [opener? #(and (vector? %) (= (first %) 'open))] ;; [open ] marks opens (loop [push () ;; iteratively build the Push program from the plushy plushy (mapcat #(if-let [n (get push/opens %)] [% ['open n]] [%]) plushy)] diff --git a/src/propeller/problems/simple_regression.cljc b/src/propeller/problems/simple_regression.cljc index 9606826..1ff2967 100755 --- a/src/propeller/problems/simple_regression.cljc +++ b/src/propeller/problems/simple_regression.cljc @@ -38,7 +38,7 @@ or 1000000 if no behavior is produced. The behavior is here defined as the final top item on the INTEGER stack." [argmap individual] - (let [program (genome/plushy->push (:plushy individual)) + (let [program (genome/plushy->push (:plushy individual) argmap) inputs (range -10 11) correct-outputs (map target-function inputs) outputs (map (fn [input] diff --git a/src/propeller/problems/software/number_io.cljc b/src/propeller/problems/software/number_io.cljc index cf8819b..afc449d 100755 --- a/src/propeller/problems/software/number_io.cljc +++ b/src/propeller/problems/software/number_io.cljc @@ -63,7 +63,7 @@ ([argmap individual] (error-function argmap individual :train)) ([argmap individual subset] - (let [program (genome/plushy->push (:plushy individual)) + (let [program (genome/plushy->push (:plushy individual) argmap) data (get train-and-test-data subset) inputs (:inputs data) correct-outputs (:outputs data) diff --git a/src/propeller/problems/software/smallest.cljc b/src/propeller/problems/software/smallest.cljc index 915043e..c48876b 100755 --- a/src/propeller/problems/software/smallest.cljc +++ b/src/propeller/problems/software/smallest.cljc @@ -65,7 +65,7 @@ ([argmap individual] (error-function argmap individual :train)) ([argmap individual subset] - (let [program (genome/plushy->push (:plushy individual)) + (let [program (genome/plushy->push (:plushy individual) argmap) data (get train-and-test-data subset) inputs (:inputs data) correct-outputs (:outputs data) diff --git a/src/propeller/problems/string_classification.cljc b/src/propeller/problems/string_classification.cljc index 4d29056..42677c0 100755 --- a/src/propeller/problems/string_classification.cljc +++ b/src/propeller/problems/string_classification.cljc @@ -46,7 +46,7 @@ behavior is produced. The behavior is here defined as the final top item on the BOOLEAN stack." [argmap individual] - (let [program (genome/plushy->push (:plushy individual)) + (let [program (genome/plushy->push (:plushy individual) argmap) inputs ["GCG" "GACAG" "AGAAG" "CCCA" "GATTACA" "TAGG" "GACT"] correct-outputs [false false false false true true true] outputs (map (fn [input]