New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tozier problems #145
Merged
Merged
Tozier problems #145
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Commented out all the pseudo-non-test things and added a very simple test to confirm that we can run `clojure.test` style tests.
It turns out by default that midje loads _all_ the files in both `src` and `test`. This dies horribly because many of the files in `src` have side effects on global atoms, so evaluating them all leads to many conflicts. So to avoid this when running midje use `lein midje :autotest test`. This tells midje to only evaluate the files in the `test` sub-directory, ignoring everything in `src`.
We have tests that confirm that a null instruction doesn't change the state, and that an integer constant as an instruction is pushed onto the integer stack.
Hang on; I am having some trouble testing the new instructions I'm adding. |
…factors-as-sorted-vector; tweaked GP arguments as an experiment
I've managed to figure out how to test the error functions themselves, and also run programs in the tests. Also have added a problem I often use when teaching GP: simple symbolic regression with a complete suite of instructions but no ERCs, called |
This one is ready to merge. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes do four things:
lein midje :autotest test
and that would be badmidje
as a dependencytest/clojush/midje/interpreter
(really just to start to understand the way things are wired together before writing more comprehensive tests before refactoring)src/clojush/problems/tozier/winkler01.clj
and accompanying tests intest/clojush/probems/tozier/winkler01.clj
is what I call "Winkler's zeroes and ones problem"src/clojush/problems/tozier/the-idea-of-numbers.clj
and accompanying tests intest/clojush/probems/tozier/the-idea-of-numbers.clj
is a pedagogic problem I often use when teaching GP classes; it's simple symbolic regression, with all instructions but no ERCsBefore being able to run
midje
you will want to change your~/.lein/profiles.clj
file, as described at Marick's repo.NOTE: @NicMcPhee and I discovered that the structure of the Clojush repo does not allow the "simple" testing syntax Midje prefers: DO NOT RUN
lein midje
Instead, we have been using
lein midje :autotest test
. The other variants may not be working yet because of setup. The midje:autotest
mode will re-run all tests (clojure.test
andmidje
) it finds in thetest
folder the first time it's invoked, and will re-run the tests in any files you save as soon as you save them.