Genetic algorithm viewing population
7 ビュー (過去 30 日間)
古いコメントを表示
Utkarsh Konge
2016 年 11 月 25 日
コメント済み: Walter Roberson
2016 年 11 月 25 日
I am using genetic algorithm on a string of 1s and 0s to solve an optimization problem. For this I have to pass the string generated to a function to check its feasibility. How can I store the population (i.e. the strings in every generation) and pass it to the function.
2 件のコメント
Walter Roberson
2016 年 11 月 25 日
Are you sure you need to pass the entire population at one time, and not just the current bitstring, which would be what the parameter to your objective function would be?
採用された回答
Walter Roberson
2016 年 11 月 25 日
The objective function is automatically passed the current bitstring as a vector of double, values 0 and 1. You can pass that vector to a different function.
4 件のコメント
Walter Roberson
2016 年 11 月 25 日
The x(1) and so on are the values it passes.
The control over size of the population and the like is through the options parameter. Possibly you want to use the OutputFcn parameter??
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!