def bin_dec(bin):
    """Conversion binary -> decimal. Needed to calculate 
    decimal variable value from binary coded genome."""
    dec=0.0
    bin.reverse()
    for i in range(0, len(bin)):
        dec+=(bin[i]*(2**i))
    return dec