Оновити 'main.py'

This commit is contained in:
Serhii Hromov 2020-05-11 14:09:50 +00:00
parent 9bff7908ee
commit bb6911b7bb

View File

@ -58,6 +58,15 @@ func_output = []
for e in menu.extension(['meal',]): for e in menu.extension(['meal',]):
func_output.append(e) func_output.append(e)
def fittnes_f(sol):
output = 0
if sol in menu.extension([sol],):
output = 0.5
#output = np.sum(sol * func_input)
r_out = 1
fitness = 1.0 / np.abs(output - r_out)
return fitness
#### ####
class Tile: class Tile: