FUNCTIONS IN GENETIC ALGORITHM

Can I apply the Genetic Algorithm to a fitness function that calls other functions? and global variables are a problem for genetic algorithm?

 采纳的回答

Star Strider
Star Strider 2022-12-13

0 个投票

Can I apply the Genetic Algorithm to a fitness function that calls other functions?
Yes.
and global variables are a problem for genetic algorithm?
Global variables cause problems regardless of the context, so it is best never to use them. See the documentation on Passing Extra Parameters for the correct method of sharing data between functions.
.

2 个评论

My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

请先登录,再进行评论。

更多回答(0 个)

类别

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by