Remove debugging printing; update session.clj
This commit is contained in:
parent
28da548e4c
commit
f8bdacc388
@ -32,7 +32,6 @@
|
||||
(defn make-instruction
|
||||
[state function arg-stacks return-stack]
|
||||
(let [popped-args (get-args-from-stacks state arg-stacks)]
|
||||
(println popped-args)
|
||||
(if (= popped-args :not-enough-args)
|
||||
state
|
||||
(let [result (apply function (:args popped-args))
|
||||
|
@ -7,24 +7,25 @@
|
||||
[propeller.problems.string-classification :as string-classif]
|
||||
[propeller.push.core :as push]
|
||||
[propeller.push.interpreter :as interpreter]
|
||||
[propeller.push.state :as state]))
|
||||
[propeller.push.state :as state]
|
||||
[propeller.push.utils.helpers :refer [get-stack-instructions]]))
|
||||
|
||||
#_(interpreter/interpret-program
|
||||
'(1 2 :integer_add) state/empty-state 1000)
|
||||
|
||||
(interpreter/interpret-program
|
||||
#_(interpreter/interpret-program
|
||||
'(3 3 :integer_eq :exec_if (1 "yes") (2 "no"))
|
||||
state/empty-state
|
||||
1000)
|
||||
|
||||
(interpreter/interpret-program
|
||||
#_(interpreter/interpret-program
|
||||
'(:in1 :string_reverse 1 :string_take "?" :string_eq :exec_if
|
||||
(:in1 " I am asking." :string_concat)
|
||||
(:in1 " I am saying." :string_concat))
|
||||
(assoc state/empty-state :input {:in1 "Can you hear me?"})
|
||||
1000)
|
||||
|
||||
(interpreter/interpret-program
|
||||
#_(interpreter/interpret-program
|
||||
'(:in1 :string_reverse 1 :string_take "?" :string_eq :exec_if
|
||||
(:in1 " I am asking." :string_concat)
|
||||
(:in1 " I am saying." :string_concat))
|
||||
@ -32,36 +33,9 @@
|
||||
1000)
|
||||
|
||||
#_(genome/plushy->push
|
||||
(genome/make-random-plushy push/default-instructions 20))
|
||||
(genome/make-random-plushy (get-stack-instructions #{:float :integer :exec :boolean}) 20))
|
||||
|
||||
#_(interpreter/interpret-program
|
||||
(genome/plushy->push
|
||||
(genome/make-random-plushy push/default-instructions 20))
|
||||
(assoc state/empty-state :input {:in1 "I can hear you."})
|
||||
1000)
|
||||
|
||||
;; =============================================================================
|
||||
;; Target function: f(x) = x^3 + x + 3
|
||||
;; =============================================================================
|
||||
|
||||
#_(gp/gp {:instructions push/default-instructions
|
||||
:error-function regression/error-function
|
||||
:max-generations 50
|
||||
:population-size 200
|
||||
:max-initial-plushy-size 50
|
||||
:step-limit 100
|
||||
:parent-selection :tournament
|
||||
:tournament-size 5})
|
||||
|
||||
#_(gp/gp {:instructions push/default-instructions
|
||||
:error-function string-classif/error-function
|
||||
:max-generations 50
|
||||
:population-size 200
|
||||
:max-initial-plushy-size 50
|
||||
:step-limit 100
|
||||
:parent-selection :lexicase})
|
||||
|
||||
#_(gp/gp {:instructions propeller.problems.software.number-io/instructions
|
||||
(gp/gp {:instructions propeller.problems.software.number-io/instructions
|
||||
:error-function propeller.problems.software.number-io/error-function
|
||||
:max-generations 500
|
||||
:population-size 500
|
||||
|
Loading…
x
Reference in New Issue
Block a user