suttonchen.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:sdaopt 作者: sgubianpm 项目源码 文件源码
def main():
    n_particles = 6
    bounds = [(-0.7, 0.7)] * (3 * n_particles)
    np.random.seed(1)
    ret = sda(sutton_chen, None, bounds=bounds)
    # np.set_printoptions(precision=4)
    print('xmin =\n{}'.format(np.array2string(ret.x, max_line_width=40)))
    print("global minimum: f(xmin) = {}".format(ret.fun))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号