Releases: mattruzicka/evolvable
Releases · mattruzicka/evolvable
v2.0.0
Breaking Changes:
- Replaced legacy .search_space and .search_spaces definitions with the new .gene macro-style for defining genetic attributes.
- Renamed
#value
to#fitness
throughout the codebase for clarity. - Removed deprecated
Gene.crossover
in favor ofGene.combine
. - Removed deprecated
Evolution#crossover
in favor ofEvolution#combination
. - Renamed
Evolvable#after_initialize
toEvolvable#after_initialize_evolvable
. - Changed population initialization and evolvable creation workflow for more consistency.
- Simplified error handling by unifying all exceptions under a single Evolvable::Error type
- Changed
Population#new_evolvables
to only accept acount
parameter, removing theevolvables
parameter. - Changed default
size
parameter inPopulation#initialize
from 40 to 0. - Changed
Population#evolve
defaultcount
parameter fromFloat::INFINITY
to1
.
New Features:
- Added gene clusters for organizing related genes through the
cluster
parameter in gene definitions. - Introduced the
Evolvable::GeneCluster
module for complex gene grouping. - Added
Evolvable::Community
for managing multiple populations and their interactions. - Added genome merging capabilities with
merge_genome!
andload_and_merge_genome!
. - Added
evolve_selected
method to Population for evolving a specific subset of evolvables. - Added automatic method generation for accessing genes and gene clusters by name.
- Added new evolution control methods: evolve_to_goal and evolve_forever for more intuitive lifecycle control.
- Comprehensive YARD documentation and README overhaul.
Full Changelog: v1.2.0...v2.0.0
v1.2.0
- Make it easier to dump and load genomes and use custom serializers. 69afd7c
- Avoid needing Gene#combine implementations to deal with nil args. Technically this could be a breaking change if you have custom combination logic for when two evolvables have different numbers of the same kind of gene and you do something other than just return the gene that isn't nil, but that this is the case seems unlikely, especially considering I'm not even aware of anyone else using this gem in the wild. If you do, please reach out! I'd love to hear from you, even if you're angry about this! 7ae1087
v1.1.0
Features
- Updated documentation.
- Genome abstraction for genes. 69afd7c
- Built-in support for count genes. 69afd7c
- Add serializer for dumping and loading for population and genogenome objects 9d2a42a
- Keep previous generation parents for generating evolvables for the current generation whenever 856ac3a
- Add #new_evolvables methods to Evolvable Selection, Crossover, and Mutation for acting on evolvables 856ac3a
- Add EvolvablePopulation#reset_evolvables b61cccb
- Improve gene class lookup. Suppose you have an evolvable Dog class with a Dog::TailGene class. Now you can just pass 'TailGene' as the 'type' in your gene space definition 079dcef
- Allow Evolvable.search_space to return a hash, array (when only one gene type), or array of arrays be56c9c
- Add Evolvable.search_spaces method which can be defined instead of or in addition to Evolvable.search_space, as an array of search space definitions (configs or Evolvable::SearchSpace objects) a3c3896
- Add ability to inititalize evaluation, selection, combination, and mutation objects with a hash of parameters or object. 7c8fd58
- Add the following delegated methods to Evolvable::Population to change the default evolutionary parameters ffb9998
selection_size
selection_size=
mutation_rate
mutation_rate=
mutation_probability
mutation_probability=
Changes
- Renamed Goal classes. The old, namespaced goal classes will be removed in version 2.0 a3fb191
- Renamed Evolvable#population_index to generation_index. The The population_index method will be removed in version 2.0 e0251f7
- Renamed evolvable_class keyword arg in Evolvable::Population#initialize to evolvable_type and suport strings and classes as arguments. Passing evolvable_class is deprecated and will be removed in version 2.0 and at that time the evolvable_tyoe keyword arg will be required 1491f4b
- Renamed Evolvable::Population#new_instance to #new_evolvable + use the previous generation's parents to generate a new instance, if there is one. Otherwise, it continues to randomly intitialize the instances from the defined gene space.
- Renamed Evolvable#new_instance to #new_evolvable, .initialize_instance to .initialize_evolvable, and #initialize_instance to #after_initialize.
- Renamed "instance" and "instances" to "evolvable" and "evolvables" across the code base and API.
- Renamed Evolvable::GeneSpace to Evolvable::SearchSpace. Using Evolvable::GeneSpace and Evolvable.gene_space is deprecated and support will be removed in version 2.0 837322a
- Renamed Evolution#crossover to Evolution#combination. Using Evolution#crossover is deprecated and support will be removed in version 2.0 7fad505
- Renamed Population#crossover, crossover= to combination d2190c5
- Renamed Gene.crossover to Gene.combine. Gene.crossover is deprecated and support will be removedin version 2.0 ed2190c5
v1.0.2
v1.0.1
Fix goal normalization in Evolvable::Evaluation
when given an object