Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能够为参数提前设置一个初值? #81

Open
cccccs opened this issue Sep 20, 2020 · 8 comments
Open

能够为参数提前设置一个初值? #81

cccccs opened this issue Sep 20, 2020 · 8 comments
Labels

Comments

@cccccs
Copy link

cccccs commented Sep 20, 2020

如题 设置初值之后再进行搜索

@guofei9987
Copy link
Owner

有人提过这个问题了
#54

@grant36x
Copy link

ga.Chrom = np.random.randint(0,2,size=(80,20))
这里的80和20,分别表示什么意思?

@cccccs
Copy link
Author

cccccs commented Dec 21, 2020

抱歉 我最后没有用这个库

@guofei9987
Copy link
Owner

ga.Chrom = np.random.randint(0,2,size=(80,20))
这里的80和20,分别表示什么意思?

种群规模和基因长度,这个大小和初始化后的 ga.Chrom 保持一致即可

@tanukihee
Copy link

ga.Chrom = np.random.randint(0,2,size=(80,20))
这里的80和20,分别表示什么意思?

种群规模和基因长度,这个大小和初始化后的 ga.Chrom 保持一致即可

能否添加 ga.x2chrom() 功能?直接指定二进制的初始种群基因还是十分不便

@Ramlinbird
Copy link

ga.Chrom = np.random.randint(0,2,size=(80,20))
这里的80和20,分别表示什么意思?

种群规模和基因长度,这个大小和初始化后的 ga.Chrom 保持一致即可

能否添加 ga.x2chrom() 功能?直接指定二进制的初始种群基因还是十分不便

是的,如果有x2chrom功能就更好了😂

@guofei9987
Copy link
Owner

guofei9987 commented Dec 4, 2021

ga.Chrom = np.random.randint(0,2,size=(80,20))
这里的80和20,分别表示什么意思?

种群规模和基因长度,这个大小和初始化后的 ga.Chrom 保持一致即可

能否添加 ga.x2chrom() 功能?直接指定二进制的初始种群基因还是十分不便

是的,如果有x2chrom功能就更好了😂

See this:

def x2gray(x, n_dim, lb, ub, precision):

@Ramlinbird
Copy link

ga.Chrom = np.random.randint(0,2,size=(80,20))
这里的80和20,分别表示什么意思?

种群规模和基因长度,这个大小和初始化后的 ga.Chrom 保持一致即可

能否添加 ga.x2chrom() 功能?直接指定二进制的初始种群基因还是十分不便

是的,如果有x2chrom功能就更好了😂

See this:

def x2gray(x, n_dim, lb, ub, precision):

Nice! It works. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants