Skip to content

Instantly share code, notes, and snippets.

@Vaguery
Created October 11, 2009 19:49
Show Gist options
  • Save Vaguery/207833 to your computer and use it in GitHub Desktop.
Save Vaguery/207833 to your computer and use it in GitHub Desktop.
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