Replies: 1 comment 3 replies
-
This is indeed a good feature to be supported. Without adding a new parameter like gene_space = [{'low': 1, 'high': 21, 'step': 1}, {'low': 45.2, 'high': 61.5, 'step': 1}] I will consider supporting adding it to the next release 2.15.0. Please let me know if something else to be supported. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
gene mapping (abstraction layer)
Beyond different data types for genes there might be the need to use stepping (a defined distance) between different gene values. The feature described would also handle precision of floats to the extent, that the user defines/configures the gene space by range oriented expressions.
A user defined gene space might look like this
Taking the example above, a user might want to use these ranges from low to max for one single gene with a certain stepping for the integer values and especially also for the floating point values.
Range-Expression:
The example contains two blocks of ranges, which can be resolved independantly to [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21] and [45.2, 47.6, 50.0, 52.4, 54.8, 57.2, 59.6]. Also negative gene values are possible, since the stepping value is apllied by addition.
1>21:2 = Starting from 1 (low) to 21 (high) by 2 (stepping size).
Python-Code to accomplish that:
Working with mapped genes, I would recommend to work internally with integer ranges which start at 0 and can be seen as the index to access the mapped genes to built up the solutions. The last line of the code block above shows gene low/high for that gene mapping example provided.
Beta Was this translation helpful? Give feedback.
All reactions