I've made a bunch of changes to how the input is read. The main change is that all operators (sphere, rank, move_atoms, etc) are defined by as dictionaries exactly one level down from their operations (generators, selections, mutations, etc), respectively. The operators dictionary all contain at least one kwarg that is used by its operator. These are the kwargs for each operator.
Fitness: weight
Relaxation: order (if we have multiple ones what order they are done in)
Selections: probability
Mutations: probability
Crossovers: probability
Predators: probability
In addition, each operator has a kwargs that is read directly into the operator function. I found this necessary when writing the sphere and rank generator and selection functions, respectively. In the old StructOpt slightly similar functions were just duplicated, but I think this is a better way to do this.
The two main benefits of these changes are that the input file is standardized and structured and every function (mutation, crossover, relaxation, fitness, selection) can make use of **kwargs. If we write good documentation for each function it should be easy to relay all these kwargs as well.
There were also some bugfixes along the way that I crossed into while doing these updates. Major changes include changes to the parameters.py setdefault. I also found a double usage of total_crossover_probability that was getting executed both in the selections and crossovers init.py files.
I've made a bunch of changes to how the input is read. The main change is that all operators (sphere, rank, move_atoms, etc) are defined by as dictionaries exactly one level down from their operations (generators, selections, mutations, etc), respectively. The operators dictionary all contain at least one kwarg that is used by its operator. These are the kwargs for each operator.
Fitness: weight Relaxation: order (if we have multiple ones what order they are done in) Selections: probability Mutations: probability Crossovers: probability Predators: probability
In addition, each operator has a kwargs that is read directly into the operator function. I found this necessary when writing the sphere and rank generator and selection functions, respectively. In the old StructOpt slightly similar functions were just duplicated, but I think this is a better way to do this.
The two main benefits of these changes are that the input file is standardized and structured and every function (mutation, crossover, relaxation, fitness, selection) can make use of **kwargs. If we write good documentation for each function it should be easy to relay all these kwargs as well.
There were also some bugfixes along the way that I crossed into while doing these updates. Major changes include changes to the parameters.py setdefault. I also found a double usage of total_crossover_probability that was getting executed both in the selections and crossovers init.py files.