⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modperformevolution.bas

📁 用vb编写的一个遗传算法的程序
💻 BAS
字号:
Attribute VB_Name = "ModPerformEvolution"
'保留最佳个体策略
'用当前最优个体代替本代最差个体
Sub PerformEvolution()
test = 0
If BestIndividual.fitness > CurrentBest.fitness Then
    test = 1
    CurrentBest = Population(Best_Index) '好像这个分支没有什么用???
    '因为在FindBestAndWorstIndividual()中有CurrentBest = BestIndividual
Else
    Population(Worst_Index) = CurrentBest
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -