Merge pull request #4 from skwak22/master

Converted to cljc (without xml files)
This commit is contained in:
Maria-Cristiana Gîrjău 2020-06-30 09:42:42 -04:00 committed by GitHub
commit c1e3f7e45f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 53 additions and 32 deletions

View File

@ -1,8 +1,9 @@
(ns propeller.core (ns propeller.core
(:gen-class) #?(:clj (:gen-class))
(:require [propeller.gp :as gp] (:require [propeller.gp :as gp]
[propeller.problems.simple-regression :as regression] [propeller.problems.simple-regression :as regression]
[propeller.problems.string-classification :as string-classif])) [propeller.problems.string-classification :as string-classif]
#?(:cljs [cljs.reader :refer [read-string]])))
(defn -main (defn -main
"Runs propel-gp, giving it a map of arguments." "Runs propel-gp, giving it a map of arguments."

View File

@ -2,8 +2,8 @@
(:require [propeller.genome :as genome] (:require [propeller.genome :as genome]
[propeller.variation :as variation] [propeller.variation :as variation]
[propeller.push.core :as push] [propeller.push.core :as push]
[propeller.push.instructions.boolean] [propeller.push.instructions.bool]
[propeller.push.instructions.char] [propeller.push.instructions.chara]
[propeller.push.instructions.code] [propeller.push.instructions.code]
[propeller.push.instructions.input-output] [propeller.push.instructions.input-output]
[propeller.push.instructions.numeric] [propeller.push.instructions.numeric]

View File

@ -1,7 +1,8 @@
(ns propeller.push.instructions.boolean (ns propeller.push.instructions.bool
(:require [propeller.push.utils :refer [def-instruction #?(:cljs (:require-macros [propeller.push.utils :refer [def-instruction
make-instruction]])) make-instruction]]))
(:require #?(:clj [propeller.push.utils :refer [def-instruction
make-instruction]])))
;; ============================================================================= ;; =============================================================================
;; BOOLEAN Instructions ;; BOOLEAN Instructions
;; ============================================================================= ;; =============================================================================

View File

@ -1,8 +1,10 @@
(ns propeller.push.instructions.char (ns propeller.push.instructions.chara
#?(:cljs (:require-macros [propeller.push.utils :refer [def-instruction
make-instruction]]))
(:require [propeller.push.state :as state] (:require [propeller.push.state :as state]
[propeller.push.utils :refer [def-instruction [propeller.tools.character :as char]
make-instruction]] #?(:clj [propeller.push.utils :refer [def-instruction
[propeller.tools.character :as char])) make-instruction]])))
;; ============================================================================= ;; =============================================================================
;; CHAR Instructions ;; CHAR Instructions

View File

@ -1,9 +1,12 @@
(ns propeller.push.instructions.code (ns propeller.push.instructions.code
(:require [propeller.utils :as utils] #?(:cljs (:require-macros [propeller.push.utils :refer [def-instruction
[propeller.push.state :as state]
[propeller.push.utils :refer [def-instruction
generate-instructions generate-instructions
make-instruction]])) make-instruction]]))
(:require [propeller.utils :as utils]
[propeller.push.state :as state]
#?(:clj [propeller.push.utils :refer [def-instruction
generate-instructions
make-instruction]])))
;; ============================================================================= ;; =============================================================================
;; Polymorphic Instructions ;; Polymorphic Instructions

View File

@ -1,7 +1,9 @@
(ns propeller.push.instructions.input-output (ns propeller.push.instructions.input-output
#?(:cljs (:require-macros [propeller.push.utils :refer
[def-instruction generate-instructions]]))
(:require [propeller.push.state :as state] (:require [propeller.push.state :as state]
[propeller.push.utils :refer [def-instruction #?(:clj [propeller.push.utils :refer [def-instruction
generate-instructions]])) generate-instructions]])))
;; ============================================================================= ;; =============================================================================
;; INPUT Instructions ;; INPUT Instructions

View File

@ -1,8 +1,11 @@
(ns propeller.push.instructions.numeric (ns propeller.push.instructions.numeric
(:require [propeller.push.utils :refer [def-instruction #?(:cljs (:require-macros [propeller.push.utils :refer [def-instruction
generate-instructions generate-instructions
make-instruction]] make-instruction]]))
[propeller.tools.math :as math])) (:require [propeller.tools.math :as math]
#?(:clj [propeller.push.utils :refer [def-instruction
generate-instructions
make-instruction]])))
;; ============================================================================= ;; =============================================================================
;; FLOAT and INTEGER Instructions (polymorphic) ;; FLOAT and INTEGER Instructions (polymorphic)

View File

@ -1,8 +1,10 @@
(ns propeller.push.instructions.polymorphic (ns propeller.push.instructions.polymorphic
#?(:cljs (:require-macros [propeller.push.utils :refer [generate-instructions
make-instruction]]))
(:require [propeller.utils :as utils] (:require [propeller.utils :as utils]
[propeller.push.state :as state] [propeller.push.state :as state]
[propeller.push.utils :refer [generate-instructions #?(:clj [propeller.push.utils :refer [generate-instructions
make-instruction]])) make-instruction]])))
;; ============================================================================= ;; =============================================================================
;; Polymorphic Instructions ;; Polymorphic Instructions

View File

@ -1,4 +0,0 @@
(ns propeller.push.instructions.random
(:require [propeller.push.utils :refer [def-instruction]]))

View File

@ -0,0 +1,5 @@
(ns propeller.push.instructions.random
#?(:cljs (:require-macros [propeller.push.utils :refer [def-instruction]]))
#?(:clj (:require [propeller.push.utils :refer [def-instruction]])))

View File

@ -1,7 +1,10 @@
(ns propeller.push.instructions.string (ns propeller.push.instructions.string
(:require [propeller.push.utils :refer [def-instruction #?(:cljs (:require-macros [propeller.push.utils :refer [def-instruction
make-instruction]])) make-instruction]]))
(:require #?(:clj [propeller.push.utils :refer [def-instruction
make-instruction]])))
;; ============================================================================= ;; =============================================================================
;; STRING Instructions ;; STRING Instructions
;; ============================================================================= ;; =============================================================================

View File

@ -1,10 +1,13 @@
(ns propeller.push.instructions.vector (ns propeller.push.instructions.vector
#?(:cljs (:require-macros [propeller.push.utils :refer [def-instruction
generate-instructions
make-instruction]]))
(:require [clojure.string] (:require [clojure.string]
[propeller.utils :as utils] [propeller.utils :as utils]
[propeller.push.state :as state] [propeller.push.state :as state]
[propeller.push.utils :refer [def-instruction #?(:clj [propeller.push.utils :refer [def-instruction
generate-instructions generate-instructions
make-instruction]])) make-instruction]])))
;; ============================================================================= ;; =============================================================================
;; VECTOR Instructions ;; VECTOR Instructions