Created
December 3, 2010 14:09
-
-
Save Vaguery/726991 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: One-point uneven crossover works as specified | |
| In order to combine "good ideas" that have arisen independently in different Pile scripts | |
| As a symbolic regression modeler | |
| I want crossover to snip scripts up and stick them back together | |
| Scenario: crossover conserves the number of tokens | |
| Given parent_1 is the Pile script "+ + + + + + + + + +" | |
| And parent_2 is the Pile script "- - - - - - - - - -" | |
| When I apply uneven one-point crossover to those parents | |
| Then the result is a collection of 2 Pile scripts | |
| And there should be 20 tokens altogether in the offspring | |
| And the pooled tokens from both offspring should include 10 "+" | |
| And the pooled tokens from both offspring should include 10 "-" | |
| Scenario: crossover breakpoints are chosen with uniform probability | |
| Given parent_1 is the Pile script "+ + + + + + + + + +" | |
| And parent_2 is the Pile script "- - - - - - - - - -" | |
| When I apply crossover to those parents (independently) many times | |
| Then the minimum length of an offspring should be 0 tokens | |
| And the maximum length of an offspring should be 20 tokens |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment