Created
October 11, 2009 19:49
-
-
Save Vaguery/207833 to your computer and use it in GitHub Desktop.
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
class RandomGuess < SearchOperator | |
attr_accessor :params | |
def initialize(params={}) | |
@params = params | |
end | |
def generate(howMany = 1, tempParams ={}) | |
result = [] | |
howMany.times do | |
newGenome = CodeType.random_value(@params.merge(tempParams)) | |
newDude = Individual.new(newGenome) | |
result << newDude | |
end | |
result | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment