python 智能算法——简单例子人工捕鱼.py

时间:2021-10-17 13:43:30
【文件属性】:
文件名称:python 智能算法——简单例子人工捕鱼.py
文件大小:397B
文件格式:PY
更新时间:2021-10-17 13:43:30
python 机器学习 人工捕鱼算法 python 智能算法——简单例子人工捕鱼.py

网友评论

  • 什么玩意,还要45import numpy as np from scipy import spatial import pandas as pd import matplotlib.pyplot as plt def func(x): x1, x2 = x return 1 / x1 ** 2 + x1 ** 2 + 1 / x2 ** 2 + x2 ** 2 from sko.AFSA import AFSA afsa = AFSA(func, n_dim=2, size_pop=50, max_iter=300, max_try_num=100, step=0.5, visual=0.3, q=0.98, delta=0.5) best_x, best_y = afsa.run() print(best_x, best_y)