###### Software Tools

####
Python implements genetic algorithm to solve the optimal value of function

""" ( ) ( ) ( i i+1 ) y = 2/(x1*x1+x2*x2+100), x1 [0,127] x2 [0,16383], x1 7 x2 13 x1x2 """ import random class Population: def __init__(self): self.size = 1 # self.cn_length = 20 # self.cns = [] # self.pc = 0.6 # self.pm = 0.01 # self.ans = [0,""] # def coding(self,x1,x2): # return format(bin(x1)[2:], '0>7')+format(bin(x2)[2:], '0>13') def decoding(self,s): # return [int(s[:7],2),int(s[7:],2)] def function(self,x1,x2): # return 2/(x1*x1+x2*x2 + 100) def initialization(self): # for i in ra