Add this line to your application's Gemfile:
gem 'Algorithmically'
And then execute:
$ bundle
Or install it yourself as:
$ gem install Algorithmically
Algorithmically::Stochastic::RandomSearch.new do |config|
config.problem_size = 10
config.maximum_iterations = 10
config.negative_space = 2
config.positive_space = 2
end
Algorithmically::Stochastic::RandomSearch.best_solution