This is the second of (now 3) big PRs; the first was component-api, the next will be engine-api.
In this one:
Add Functions and Terminals as classes. They both have a .get() method which returns a list of the active nodes. This can include constants (for terminals), and will support logical operators by returning situation-specific functions with Operators.get(**kwargs).
Add recursive Branch class. Tree is a wrapper for the the 'root' branch, stored in tree.root.
Redo evolve methods to work with Branch. Evolution now uses a combination of Population methods (fitness_gene_pool, tournament) and Tree methods (copy, point_mutate, branch_mutate, crossover).
This is the second of (now 3) big PRs; the first was
component-api
, the next will beengine-api
.In this one:
Add
Functions
andTerminals
as classes. They both have a.get()
method which returns a list of the active nodes. This can include constants (for terminals), and will support logical operators by returning situation-specific functions withOperators.get(**kwargs)
.Add recursive
Branch
class.Tree
is a wrapper for the the 'root' branch, stored intree.root
.Redo evolve methods to work with
Branch
. Evolution now uses a combination ofPopulation
methods (fitness_gene_pool, tournament) andTree
methods (copy, point_mutate, branch_mutate, crossover).