令人懷念ㄉ東西 XDDD
基因演算
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 第一代:亂數產生
- 計算 fitness
- 得到所有結果的分數後,就可以做天擇
- 轉換成二進位字串
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 例子
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
(12,6) => (1100 0110)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 天擇
- 交配 (PC,0.7~0.9)
- A B 為父母
- 以單點交配為例:亂數產生一個交配點,子女各取一部分父母的基因
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 單點交配
- 先產生一個亂數,決定要從哪裡開始切,切一刀(一段父,一段母),然後將父母不同的基因接在一起
- 雙點交配
- 多點交配
- 突變(pm,0.1)
- 隨機產生突變點,依據突變率骰骰子決定會不會突變,1 變 0,0 變 1
- 針對排列的問題,想出以下幾種方法
- 刪除插入突變:隨機擷取幾段刪除/插入基因
- 交換突變:兩條染色體,兩個個別隨機擷取一段,交換剛剛擷取的基因
- 反轉突變:隨機擷取一段基因,將順序反過來,再放回去
- 排列(tsp旅行銷售員問題)
- np problem: 只能找近似解
- 隨機產生兩個點
- visual studio
- 有說明書
- GA_lib
- propoty 切換主程式
- paper_present…: 期末報告的要求
- 只需要改 fitness
新計畫的環境&二氧化碳排放量需要改 fitness => 值越小越佳
numRepetitiveRuns 幾次基因(?)
ga.Run 多久
Dimension x1 x2 有幾個
DimensionsLowerBound 下限
DimensionsupperBound 上限
可以改整數,二進位,實數(EncodingType)
RepeatableoOption 看可不可以重複SS
突變 : 高斯,均勻(3種)
ga.Run(MFE, ?機率,突變機率)
代數 * 染色體數(fitness 要一致,MFE