This module implements some basic utilities for use with Grammatical Evolution
Returns a random weight centered around 0. The constrain limits the value to the maximum that it would return. For example, if .5 is the constraint, then the returned weight would between -.5 and +.5.
This function converts from base 10 to base 2 in string format. In addition, it takes a parameter for zero filling to pad out to a specific length.
Note that the incoming number is converted to an int, and that if it is a negative number that the negative sign is added on to the total length, resulting in a string 1 char longer than the zfill specified.
This function converts from base 2 to base 10. Unlike base10tobase2, there is no zfill option, and the result is output as an int.