Created
December 3, 2010 14:16
-
-
Save Vaguery/726999 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| Feature: Uniform mutation works as specified | |
| In order to discover new beneficial variations of scripts that are already OK | |
| As a symbolic regression modeler | |
| I want uniform mutation to replace tokens in "parent" scripts with new random tokens | |
| Scenario: uniform mutation replaces tokens with uniform random sample of available tokens | |
| Given parent_1 is the Pile script "+ + + + + + + + + +" | |
| And the available tokens are ["a", "b", "c", "d", "e"] | |
| And the chance of mutation is p=1.0 | |
| When I apply mutation to that parent (independently) many times | |
| Then the measured number of ["a", "b", "c", "d", "e"] in offspring should be statistically identical | |
| Scenario: uniform mutation replaces randomly chosen tokens in the parent | |
| Given parent_1 is the Pile script "+ + + + + + + + + +" | |
| And the available tokens are ["a"] | |
| And the chance of mutation is p=0.5 | |
| When I apply mutation to that parent (independently) many times | |
| Then the measured number of ["a", "+"] in offspring should be statistically identical | |
| Scenario: uniform mutation conserves token count in offspring | |
| Given parent_1 is the Pile script "+ + + + + + + + + +" | |
| And the chance of mutation is p=1.0 | |
| When I apply mutation to that parent (independently) many times | |
| Then there should be 10 tokens in every offspring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment