gintool / gin

GI in No Time - a Simple Microframework for Genetic Improvement
MIT License
43 stars 20 forks source link

Operator separation of concerns #14

Closed sandybrownlee closed 3 years ago

sandybrownlee commented 6 years ago

Currently, the Edit classes are just wrappers for ints, which are then used by Patch.apply(). It would be cleaner to put the operation in each of the Edit classes - though this would mean they have access to the lists of statements and blocks in Patch so not easy to separate out.

sandybrownlee commented 6 years ago

This could also include the code in Patch.randomEdit()

drdrwhite commented 6 years ago

There's a general difficulty of exactly how we identify (for example) a statement that is to be modified or removed: currently we use a numbering scheme, which is not general and something of a hack. Need an alternative idea.

sandybrownlee commented 3 years ago

Refactoring with v2 fixed this.