Lee Spector
0c6ebde41b
Fix :flip that should be :diploid-flip
2020-11-29 21:43:00 -05:00
Lee Spector
81f2c3197f
Distinguish flip rate from flip probability
2020-11-29 21:32:42 -05:00
Nic McPhee
e05290d87c
Support command-line problem specification
...
This change uses the first command-line argument as the problem, which is assumed to be a namespace under `propeller.problems`. This will load the `instructions` and `error-function` from that namespace. If no problem is specified, then a (hopefully) helpful error is generated and the programs exits.
This allows us to call Propeller with calls such as:
```
lein run software.smallest
```
2020-11-24 16:42:22 -06:00
Lee Spector
f2e4cf0e1e
Merge pull request #8 from NicMcPhee/limit-dup-times
...
Limit stack size when using `_dup_times` and `_dup_items`
2020-11-24 17:24:32 -05:00
Nic McPhee
da84852245
Move max-stack-items
to globals
...
This creates a `push/utils/globals/cljc` similar to that created by @mcgirjau and moved the `max-stack-items` def to that namespace, updating `polymorphic` as necessary.
2020-11-24 16:00:03 -06:00
Nic McPhee
f675f69276
Merge branch 'master' into limit-dup-times
2020-11-24 15:53:36 -06:00
Nic McPhee
0ca5e77d7a
Merge remote-tracking branch 'upstream/master'
2020-11-24 15:19:29 -06:00
Lee Spector
35ac379f06
Add more examples to session.clj
2020-11-24 16:09:44 -05:00
Lee Spector
628329e6bf
Resolve merge conflict
2020-11-23 21:28:51 -05:00
Lee Spector
a8e9de97ce
Fix peek-stack for false on boolean stack
2020-11-23 09:57:04 -05:00
Lee Spector
3ba030ceec
Add train/test data support to simple-regression problem
2020-11-23 09:51:19 -05:00
Lee Spector
509c22b79c
Fix naming clash in new-individual
2020-11-23 07:49:40 -05:00
Lee Spector
f8bdacc388
Remove debugging printing; update session.clj
2020-11-22 23:35:07 -05:00
Lee Spector
28da548e4c
Undo wrong fix for exec_if; fix peek-stack for false on boolean stack
2020-11-22 23:28:02 -05:00
Lee Spector
0482ccccf5
Correct order of clauses for exec_if
2020-11-22 22:05:42 -05:00
Lee Spector
97de757f57
Begin bringing session.clj up to date
2020-11-22 21:57:29 -05:00
Lee Spector
b6a9a410c1
Call diploid-flip when appropriate; make new-individual robust to missing rates
2020-11-22 21:40:57 -05:00
Lee Spector
224d33c19d
Add diploid-flip genetic operator
2020-11-22 21:32:49 -05:00
Lee Spector
4df6ea7fdd
Use diploid operators when called for; fix bug in diploid-uniform-addition
2020-11-22 21:27:07 -05:00
Lee Spector
67fcdb13b5
Undo deletion rate adjustment (done elsewhere), remove argmap arguments to genetic operators, define diploid genetic operators
2020-11-22 21:18:30 -05:00
Lee Spector
55644a9b6d
Make crossover, uniform-addition, and uniform-deletion take argmap arguments
2020-11-22 21:06:39 -05:00
Lee Spector
aadc28d371
Make plushy->push use an empty argmap if none was passed.
2020-11-22 16:35:46 -05:00
Lee Spector
0a5e17195e
Scale UMAD deletion rate from addion rate for size neutrality
2020-11-22 16:30:25 -05:00
Lee Spector
bd5f4aba40
Remove extraneous 2
2020-11-22 16:25:37 -05:00
Lee Spector
12002d17a6
Make plushy->push obey :diploid setting
2020-11-22 16:19:24 -05:00
Lee Spector
4516339412
Pass argmap to plushy->push
2020-11-22 16:14:01 -05:00
Lee Spector
f47e5e924a
Merge pull request #7 from NicMcPhee/fix-random-int-generation
...
Fix bug in `random-int`
2020-11-10 21:06:22 -05:00
Nic McPhee
bfa557c6a1
Fix bug in random-int
...
The `random-int` function in both `number-io` and `smallest` subtracted a floating point value (`100.0`), which means they were both _actually_ returning a float instead of an int.
This removes both of the ".0"s so that they return integers as advertised.
2020-11-10 16:59:32 -06:00
Nic McPhee
1a882836de
Limit number of duplications onto a stack
...
Both `_dup_times` and `_dup_items` are risky and can place very large numbers of items on a stack if the value on the `:integer` is large. This limits both `_dup_times` and `_dup_items` so they never make a stack have more than `max-stack-items` entries.
This change was motivated by `OutOfMemory` errors we were receiving when doing runs. This is somewhat modeled after similar limits in Clojush, but we chose to not introduce an `atom` and to instead just define a constant in this namespace. That may not be as flexible as people would like, and we can move to the `atom` solution if necessary.
2020-11-10 16:17:50 -06:00
Nic McPhee
89f0f3568a
Add stack-size
...
Adds a function that returns the size of the specified stack in a given state.
2020-11-10 16:14:23 -06:00
Lee Spector
db085080b3
Merge pull request #6 from skwak22/master
...
This version of propeller has full CLJS functionality and compiles with shadow-cljs
2020-07-23 15:21:37 -04:00
Sunghoon Kwak
bdff94091b
Update license info
2020-07-15 22:44:25 +09:00
skwak22
baf28a3e79
Working cljs version of propeller
2020-07-15 22:23:42 +09:00
Sunghoon Kwak
689536b735
Update README.md
2020-07-15 21:24:56 +09:00
skwak22
44aaf4a156
introduce shadow-cljs as ClojureScript compiler
2020-07-15 21:19:38 +09:00
Maria-Cristiana Gîrjău
4de782c50a
Merge pull request #6 from skwak22/master
...
ClojureScript namespace changes and small tweaks with dependencies
2020-07-14 09:57:05 -04:00
Sunghoon Kwak
16b353faf9
Delete .DS_Store
2020-07-14 16:06:03 +09:00
skwak22
bf54db427b
Some changes for CLJS compatibility
2020-07-14 16:05:20 +09:00
mcgirjau
7820d5529b
Clean up macros
2020-07-14 00:14:04 -04:00
mcgirjau
3f5c2fd8a7
Add string instructions
2020-07-13 21:24:43 -04:00
mcgirjau
3e820407f3
Cleanup and metadata fix
2020-07-13 17:04:05 -04:00
mcgirjau
7ce624d4ba
Add Number IO and Smallest problems
2020-07-01 13:07:13 -04:00
Maria-Cristiana Gîrjău
c1e3f7e45f
Merge pull request #4 from skwak22/master
...
Converted to cljc (without xml files)
2020-06-30 09:42:42 -04:00
Sunghoon Kwak
b555e1300e
Converted files to cljc & ns changes for cljs
2020-06-30 20:39:36 +09:00
skwak22
9eae13a89d
removed clj files
2020-06-30 20:36:40 +09:00
mcgirjau
74515bd11b
Add output instructions
2020-06-30 00:08:48 -04:00
mcgirjau
69142757ce
Add input handler and refactor interpreter
2020-06-29 22:52:41 -04:00
mcgirjau
ca33a46627
Remove .xml
2020-06-29 19:27:00 -04:00
mcgirjau
7184cd6644
Finish polymorphic and vector instructions
2020-06-29 19:19:55 -04:00
mcgirjau
66856cf99f
Remove some stacks
2020-06-26 10:34:04 -04:00