<commit_before>[![Build Status](https://travis-ci.org/MEHColeman/gene_genie.svg?branch=master)](https://travis-ci.org/MEHColeman/gene_genie)
[![Gem Version](https://badge.fury.io/rb/gene_genie.svg)](http://badge.fury.io/rb/gene_genie)
[![Code Climate](https://codeclimate.com/github/MEHColeman/gene_genie.png)](https://codeclimate.com/github/MEHColeman/gene_genie)

# Gene Genie

This isn't even nearly ready yet.

Hey, I wrote a genetic algorithm gem. Goals:
    * Have fun
    * Be easy and intuitive to use
    * Be open to extension and experimentation

## Installation

Add this line to your application's Gemfile:

    gem 'gene_genie'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install gene_genie

## Usage
Basic usage is designed to be as simple as possible. You provide two things: an exemplar and an evaluator.
An exemplar is a list of variables along with their possible range of values.
An evaluator implements a fitness method that returns a numeric value.
The genetic algorithm will then search for the set of values that maximises the fitness.

```ruby
require 'gene_genie'

exemplar = {
  range_of_ints: 1..10,
  range_of_floats: 1.0..4.5,
  set_of_items: [:apple, :banana, :orange],
  ordered_set_of_items: [:one, :two, :three],
  circular_ordered_set: [:early_morning, :morning, :noon, :afternoon,
                         :evening, :midnight]
  }
```

If you use the simple genie interface, the genetic algorithm will come up with a reasonable best-guesses for various algorthm parameters, but you can dive under the covers to give yourself more flexibility.
* Population size
* Gene pools
* Initialisation
Custom objects for crossover, gene selection, etc.

## Contributing

1. Fork it ( https://github.com/MEHColeman/gene_genie/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request<commit_msg>add optimisation heading to readme<commit_after>[![Build Status](https://travis-ci.org/MEHColeman/gene_genie.svg?branch=master)](https://travis-ci.org/MEHColeman/gene_genie)
[![Gem Version](https://badge.fury.io/rb/gene_genie.svg)](http://badge.fury.io/rb/gene_genie)
[![Code Climate](https://codeclimate.com/github/MEHColeman/gene_genie.png)](https://codeclimate.com/github/MEHColeman/gene_genie)

# Gene Genie

Hey, I wrote a genetic algorithm gem. Goals:
    * Have fun
    * Be easy and intuitive to use
    * Be open to extension and experimentation

## Installation

Add this line to your application's Gemfile:

    gem 'gene_genie'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install gene_genie

## Usage
Basic usage is designed to be as simple as possible. You provide two things: an exemplar and an evaluator.
An exemplar is a list of variables along with their possible range of values.
An evaluator implements a fitness method that returns a numeric value.
The genetic algorithm will then search for the set of values that maximises the fitness.

```ruby
require 'gene_genie'

exemplar = {
  range_of_ints: 1..10,
  range_of_floats: 1.0..4.5,
  set_of_items: [:apple, :banana, :orange],
  ordered_set_of_items: [:one, :two, :three],
  circular_ordered_set: [:early_morning, :morning, :noon, :afternoon,
                         :evening, :midnight]
  }
```

If you use the simple genie interface, the genetic algorithm will come up with a reasonable best-guesses for various algorthm parameters, but you can dive under the covers to give yourself more flexibility.
* Population size
* Gene pools
* Initialisation
* Optimisation Criteria

Custom objects for crossover, gene selection, etc.

## Contributing

1. Fork it ( https://github.com/MEHColeman/gene_genie/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
{'fraction_non_alphanumeric': 0.10057114477278371, 'fraction_numerical': 0.005959771542090887, 'mean_word_length': 4.144316730523627, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6900987', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1240, 'n_words': 449}