實驗四:遺傳算法求函數(shù)最大值實驗
實驗?zāi)康?/h4>
熟悉和掌握遺傳算法的原理、流程和編碼策略,并利用遺傳算法求解函數(shù)優(yōu)化問題,理解求解流程并測試主要參數(shù)對結(jié)果的影響。
實驗內(nèi)容
采用遺傳算法求解函數(shù)最大值。
實驗要求
1. 用遺傳算法求解下列函數(shù)的最大值,設(shè)定求解精度到15位小數(shù)。
(1)給出適應(yīng)度函數(shù)(Fitness Function)代碼。
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(42)
# 目標(biāo)函數(shù)
def objective_function(x, y):
return ((6.452 * (x + 0.125 * y) * (np.cos(x) - np.cos(2 * y)) ** 2) / np.sqrt(
(0.8 + (x - 4.2) ** 2 + 2 * (y - 7)) ** 2)) + 3.226 * y
# 適應(yīng)度函數(shù)
def fitness_function(x, y):
return -objective_function(x, y)
(2)給出最佳適應(yīng)度(best fitness)和最佳個體(best individual)圖。
(3)使用相同的初始種群,設(shè)置不同的種群規(guī)模,如5、20和100,初始種群的個體取值范圍為[0,10],其他參數(shù)同表1,然后求得相應(yīng)的最佳適應(yīng)度、平均適應(yīng)度和最佳個體,填入表2,分析種群規(guī)模對算法性能的影響。
(4)設(shè)置種群規(guī)模為20,初始種群的個體取值范圍為[0,10],選擇不同的選擇操作、交叉操作和變異操作,其他參數(shù)同表1,然后獨立運行算法10次,完成表3,并分析比較采用不同的選擇策略、交叉策略和變異策略的算法運行結(jié)果。
表1 遺傳算法參數(shù)選擇
表2 不同的種群規(guī)模的GA運行結(jié)果
import numpy as np
import matplotlib.pyplot as plt
# 目標(biāo)函數(shù)
def objective_function(x, y):
return ((6.452 * (x + 0.125 * y) * (np.cos(x) - np.cos(2 * y)) ** 2) / np.sqrt(
(0.8 + (x - 4.2) ** 2 + 2 * (y - 7)) ** 2)) + 3.226 * y
# 適應(yīng)度函數(shù)
def fitness_function(x, y):
return -objective_function(x, y)
# 遺傳算法框架
def genetic_algorithm(population_size, generations, crossover_rate, mutation_rate, search_range):
# 初始化種群
population = np.random.uniform(low=search_range[0], high=search_range[1], size=(population_size, 2))
best_fitness_history = []
best_individual_history = []
for generation in range(generations):
# 計算適應(yīng)度
fitness_values = np.array([fitness_function(x, y) for x, y in population])
# Check for NaN values and handle them
if np.isnan(fitness_values).any() or np.ptp(fitness_values) == 0:
print(f"Warning: Invalid fitness values encountered in generation {generation}.")
break
# 選擇操作:使用適應(yīng)度函數(shù)正規(guī)化版本作為選擇概率
normalized_fitness = (fitness_values - np.min(fitness_values)) / (
np.max(fitness_values) - np.min(fitness_values))
# Check for NaN values after normalization
if np.isnan(normalized_fitness).any():
print(f"Warning: NaN values encountered in normalized fitness in generation {generation}.")
break
# Continue with the selection operation
selection_probabilities = normalized_fitness / np.sum(normalized_fitness)
# 修正選擇操作
selected_indices = np.random.choice(np.arange(len(population)), size=population_size, replace=True,
p=selection_probabilities)
selected_population = population[selected_indices]
# 交叉操作:單點交叉
crossover_indices = np.random.choice(population_size, size=population_size // 2, replace=False)
crossover_pairs = selected_population[crossover_indices]
crossover_points = np.random.rand(population_size // 2, 1)
# 修正交叉操作
crossover_offspring = np.zeros_like(crossover_pairs)
for i in range(crossover_pairs.shape[0]):
crossover_offspring[i] = crossover_pairs[i, 0] * (1 - crossover_points[i]) + crossover_pairs[i, 1] * \
crossover_points[i]
# 變異操作:均勻變異
mutation_mask = np.random.rand(population_size, 2) < mutation_rate
mutation_offspring = selected_population + mutation_mask * np.random.uniform(low=-0.5, high=0.5,
size=(population_size, 2))
# 合并新一代種群
population = np.concatenate([crossover_offspring, mutation_offspring], axis=0)
# 保留最優(yōu)個體
best_index = np.argmax(fitness_values)
best_fitness = fitness_values[best_index]
best_individual = population[best_index]
best_fitness_history.append(best_fitness)
best_individual_history.append(best_individual)
return best_fitness_history, best_individual_history
# 表2 不同的種群規(guī)模的GA運行結(jié)果
population_sizes = [5, 20, 100]
# 初始化表2
table2 = np.zeros((len(population_sizes), 4))
for i, population_size in enumerate(population_sizes):
best_fitness_history, best_individual_history = genetic_algorithm(population_size, generations=100,
crossover_rate=0.8, mutation_rate=0.01,
search_range=[0, 10])
# 計算平均適應(yīng)度
average_fitness = np.mean([fitness_function(x, y) for x, y in best_individual_history])
# 打印結(jié)果
print(f"種群規(guī)模: {population_size}")
print(f"最佳適應(yīng)度: {best_fitness_history[-1]}")
print(f"平均適應(yīng)度: {average_fitness}")
print(f"最佳個體: {best_individual_history[-1]}")
print("\n")
# 將結(jié)果填入表2
table2[i, 0] = best_fitness_history[-1]
table2[i, 1] = average_fitness
table2[i, 2:] = best_individual_history[-1]
# 打印表2
print("表2 不同的種群規(guī)模的GA運行結(jié)果")
print("種群規(guī)模\t最佳適應(yīng)度\t平均適應(yīng)度\t最佳個體")
for i in range(len(population_sizes)):
print(f"{population_sizes[i]}\t{table2[i, 0]}\t{table2[i, 1]}\t{table2[i, 2:]}")
print("\n")
種群規(guī)模: 5
最佳適應(yīng)度: -3.459847944541263
平均適應(yīng)度: -10.320198206011602
最佳個體: [0.62975422 0.62975422]
種群規(guī)模: 20
最佳適應(yīng)度: 0.6871155254100445
平均適應(yīng)度: -2.9636119559269036
最佳個體: [-0.21263061 -0.21263061]
種群規(guī)模: 100
最佳適應(yīng)度: 0.21963356289505687
平均適應(yīng)度: -6.572041991467105
最佳個體: [-0.06808081 -0.06808081]
表2 不同的種群規(guī)模的GA運行結(jié)果
種群規(guī)模 最佳適應(yīng)度 平均適應(yīng)度 最佳個體
5 -3.459847944541263 -10.320198206011602 [0.62975422 0.62975422]
20 0.6871155254100445 -2.9636119559269036 [-0.21263061 -0.21263061]
100 0.21963356289505687 -6.572041991467105 [-0.06808081 -0.06808081]
表3 不同的選擇策略、交叉策略和變異策略的算法運行結(jié)果
import numpy as np
import matplotlib.pyplot as plt
# 目標(biāo)函數(shù)
def objective_function(x, y):
return ((6.452 * (x + 0.125 * y) * (np.cos(x) - np.cos(2 * y)) ** 2) / np.sqrt(
(0.8 + (x - 4.2) ** 2 + 2 * (y - 7)) ** 2)) + 3.226 * y
# 適應(yīng)度函數(shù)
def fitness_function(x, y):
return objective_function(x, y)
# 遺傳算法框架
def genetic_algorithm(population_size, generations, crossover_rate, mutation_rate, search_range):
# 初始化種群
population = np.random.uniform(low=search_range[0], high=search_range[1], size=(population_size, 2))
best_fitness_history = []
best_individual_history = []
for generation in range(generations):
# 計算適應(yīng)度
fitness_values = np.array([fitness_function(x, y) for x, y in population])
# Check for NaN values and handle them
if np.isnan(fitness_values).any() or np.ptp(fitness_values) == 0:
print(f"Warning: Invalid fitness values encountered in generation {generation}.")
break
# 選擇操作:使用適應(yīng)度函數(shù)正規(guī)化版本作為選擇概率
normalized_fitness = (fitness_values - np.min(fitness_values)) / (
np.max(fitness_values) - np.min(fitness_values))
# Check for NaN values after normalization
if np.isnan(normalized_fitness).any():
print(f"Warning: NaN values encountered in normalized fitness in generation {generation}.")
break
# Continue with the selection operation
selection_probabilities = normalized_fitness / np.sum(normalized_fitness)
# 修正選擇操作
selected_indices = np.random.choice(np.arange(len(population)), size=population_size, replace=True,
p=selection_probabilities)
selected_population = population[selected_indices]
# 交叉操作:單點交叉
crossover_indices = np.random.choice(population_size, size=population_size // 2, replace=False)
crossover_pairs = selected_population[crossover_indices]
crossover_points = np.random.rand(population_size // 2, 1)
# 修正交叉操作
crossover_offspring = np.zeros_like(crossover_pairs)
for i in range(crossover_pairs.shape[0]):
crossover_offspring[i] = crossover_pairs[i, 0] * (1 - crossover_points[i]) + crossover_pairs[i, 1] * \
crossover_points[i]
# 變異操作:均勻變異
mutation_mask = np.random.rand(population_size, 2) < mutation_rate
mutation_offspring = selected_population + mutation_mask * np.random.uniform(low=-0.5, high=0.5,
size=(population_size, 2))
# 合并新一代種群
population = np.concatenate([crossover_offspring, mutation_offspring], axis=0)
# 保留最優(yōu)個體
best_index = np.argmax(fitness_values)
best_fitness = fitness_values[best_index]
best_individual = population[best_index]
best_fitness_history.append(best_fitness)
best_individual_history.append(best_individual)
return best_fitness_history, best_individual_history
# (2) 最佳適應(yīng)度和最佳個體圖
# 請插入代碼以生成適應(yīng)度和個體的圖形
# (3) 不同種群規(guī)模的運行結(jié)果
population_sizes = [5, 20, 100]
table2_data = []
for population_size in population_sizes:
best_fitness_history, best_individual_history = genetic_algorithm(population_size, generations=100,
crossover_rate=0.8, mutation_rate=0.01,
search_range=[0, 10])
# 計算平均適應(yīng)度
average_fitness = np.mean([fitness_function(x, y) for x, y in best_individual_history])
# 保存結(jié)果
table2_data.append((population_size, best_fitness_history[-1], average_fitness, best_individual_history[-1]))
# # 打印表2
# print("表2 不同的種群規(guī)模的GA運行結(jié)果")
# print("種群規(guī)模\t最佳適應(yīng)度\t平均適應(yīng)度\t最佳個體")
# for row in table2_data:
# print("\t".join(map(str, row)))
# (4) 不同選擇策略、交叉策略和變異策略的運行結(jié)果
selection_strategies = ['個體選擇概率分配', '排序', '比率']
crossover_strategies = ['單點交叉', '兩點交叉']
mutation_strategies = ['均勻變異', '高斯變異']
table3_data = []
for s_index, selection_strategy in enumerate(selection_strategies):
for c_index, crossover_strategy in enumerate(crossover_strategies):
for m_index, mutation_strategy in enumerate(mutation_strategies):
# 運行算法10次,取平均值
avg_best_fitness = 0
avg_worst_fitness = 0
avg_average_fitness = 0
for _ in range(10):
best_fitness_history, _ = genetic_algorithm(population_size=20, generations=100,
crossover_rate=0.8, mutation_rate=0.01,
search_range=[0, 10])
avg_best_fitness += best_fitness_history[-1]
avg_worst_fitness += np.min(best_fitness_history)
avg_average_fitness += np.mean(best_fitness_history)
avg_best_fitness /= 10
avg_worst_fitness /= 10
avg_average_fitness /= 10
# 保存結(jié)果
table3_data.append((s_index + 1, c_index + 1, m_index + 1,
selection_strategy, crossover_strategy, mutation_strategy,
avg_best_fitness, avg_worst_fitness, avg_average_fitness))
# 打印表3
print("\n表3 不同的選擇策略、交叉策略和變異策略的算法運行結(jié)果")
print("遺傳算法參數(shù)設(shè)置\t1\t2\t3\t4")
print("選擇操作\t個體選擇概率分配\t排序\t?\t?\t\t?")
print("\t\t比率\t\t?\t")
print("個體選擇\t輪盤賭選擇\t?\t?\t\t?")
print("\t\t競標(biāo)賽選擇\t\t\t?")
print("交叉操作\t單點交叉\t?\t\t?\t?")
print("\t\t兩點交叉\t\t\t?")
print("變異操作\t均勻變異\t?\t?\t?")
print("\t\t高斯變異\t\t\t?")
print("最好適應(yīng)度\t\t\t\t\t\t", end="")
for i in range(4):
print(f"{table3_data[i][-3]:.2f}\t", end="")
print("\n最差適應(yīng)度\t\t\t\t\t\t", end="")
for i in range(4):
print(f"{table3_data[i][-2]:.2f}\t", end="")
print("\n平均適應(yīng)度\t\t\t\t\t\t", end="")
for i in range(4):
print(f"{table3_data[i][-1]:.2f}\t", end="")
print("\n")
最好適應(yīng)度 7594.27 15782.25 3339.39 1474.26
最差適應(yīng)度 268.94 439.60 193.71 306.33
平均適應(yīng)度 4335.11 2712.38 769.43 1057.48
2、用遺傳算法求解下面Rastrigin函數(shù)的最小值,設(shè)定求解精度到15位小數(shù)。
(1)給出適應(yīng)度函數(shù)代碼。
(2)設(shè)計上述問題的編碼、選擇操作、交叉操作、變異操作以及控制參數(shù)等,填入表4,并畫出最佳適應(yīng)度和最佳個體圖。
import time
import numpy as np
from matplotlib import pyplot as plt
# Rastigrin函數(shù)
def rastrigin_function(x1, x2):
return -(20 + x1**2 + x2**2 - 10 * (np.cos(2 * np.pi * x1) + np.cos(2 * np.pi * x2)))
# 遺傳算法框架
def genetic_algorithm(population_size, generations, crossover_rate, mutation_rate, search_range, time_limit=None, fitness_limit=None, stall_generations=None, stall_time_limit=None):
population = np.random.uniform(low=search_range[0], high=search_range[1], size=(population_size, 2))
best_fitness_history = []
best_individual_history = []
start_time = time.time()
prev_best_fitness = None
stall_count = 0
for generation in range(generations):
fitness_values = np.array([rastrigin_function(x[0], x[1]) for x in population])
best_index = np.argmin(fitness_values)
best_fitness = fitness_values[best_index]
best_individual = population[best_index]
best_fitness_history.append(best_fitness)
best_individual_history.append(best_individual)
# 判斷是否終止算法
if time_limit is not None and time.time() - start_time > time_limit:
print("Time limit reached.")
break
if fitness_limit is not None and best_fitness <= fitness_limit:
print("Fitness limit reached.")
break
if stall_generations is not None and prev_best_fitness is not None:
if best_fitness < prev_best_fitness:
stall_count = 0
else:
stall_count += 1
if stall_count == stall_generations:
print("Stall generations limit reached.")
break
if stall_time_limit is not None and prev_best_fitness is not None:
if time.time() - start_time - stall_time_limit >= 0:
print("Stall time limit reached.")
break
# 選擇操作
selection_probabilities = 1 / (fitness_values - np.min(fitness_values) + 1e-10)
selection_probabilities /= np.sum(selection_probabilities)
selected_indices = np.random.choice(np.arange(len(population)), size=population_size, replace=True, p=selection_probabilities)
selected_population = population[selected_indices]
# 交叉操作
crossover_indices = np.random.choice(population_size, size=population_size // 2, replace=False)
crossover_pairs = selected_population[crossover_indices]
crossover_points = np.random.rand(population_size // 2, 1)
crossover_offspring = np.zeros_like(crossover_pairs)
for i in range(crossover_pairs.shape[0]):
crossover_offspring[i] = crossover_pairs[i, 0] * (1 - crossover_points[i]) + crossover_pairs[i, 1] * crossover_points[i]
# 變異操作
mutation_mask = np.random.rand(population_size // 2, 2) < mutation_rate
mutation_offspring = crossover_offspring + mutation_mask * np.random.uniform(low=-0.5, high=0.5, size=(population_size // 2, 2))
# 合并新一代種群
population = np.concatenate([crossover_offspring, mutation_offspring], axis=0)
# 更新變量
prev_best_fitness = best_fitness
return best_fitness_history, best_individual_history
# 設(shè)定參數(shù)
population_size = 100
generations = 100
crossover_rate = 0.8
mutation_rate = 0.1
search_range = [-5.12, 5.12]
time_limit = 60 # 運行時間限制為 60 秒
fitness_limit = -80.71 # 適應(yīng)度值達到 -80.71 時終止算法
stall_generations = 10 # 連續(xù) 10 次沒有更新最優(yōu)解時終止算法
stall_time_limit = 10 # 如果連續(xù) 10 秒沒有更新最優(yōu)解則終止算法
# 運行遺傳算法
best_fitness_history, best_individual_history = genetic_algorithm(population_size, generations, crossover_rate, mutation_rate, search_range, time_limit, fitness_limit, stall_generations, stall_time_limit)
# 打印最終結(jié)果
print("Best fitness:", best_fitness_history[-1])
print("Best individual:", best_individual_history[-1])
# 繪制最佳適應(yīng)度圖
plt.figure(figsize=(8, 6))
plt.plot(best_fitness_history, label='Best Fitness')
plt.xlabel('Generation')
plt.ylabel('Fitness')
plt.title('Convergence of Genetic Algorithm')
plt.legend()
plt.grid(True)
plt.show()
表4 遺傳算法參數(shù)選擇
Best fitness: -64.62411370180945
Best individual: [3.51645639 3.51645639]
【實驗思考及實踐】
實驗心得體會
遺傳算法的基本思想: 遺傳算法是一種啟發(fā)式優(yōu)化算法,其基本思想來源于自然界的進化過程,包括選擇、交叉和變異等基本操作。在實驗中,這些操作的合理設(shè)計對算法的性能至關(guān)重要。
適應(yīng)度函數(shù)的設(shè)計: 適應(yīng)度函數(shù)的選擇直接影響算法的收斂性和準(zhǔn)確性。在實驗中,對于每個具體的問題,需要仔細設(shè)計適應(yīng)度函數(shù),使其能夠準(zhǔn)確反映問題的優(yōu)劣。
種群規(guī)模的影響: 通過實驗,可以觀察到不同的種群規(guī)模對算法性能的影響。較小的種群規(guī)??赡軐?dǎo)致算法陷入局部最優(yōu)解,而較大的種群規(guī)??赡芴岣呷炙阉髂芰?,但也會增加計算成本。
選擇策略、交叉策略和變異策略的比較: 實驗中設(shè)計了不同的選擇策略、交叉策略和變異策略,并進行了比較。結(jié)果表明,不同的策略組合對算法性能有著顯著的影響,這強調(diào)了在實際問題中選擇合適的操作的重要性。
實驗結(jié)果的分析: 在觀察實驗結(jié)果時,需要結(jié)合問題的特點和算法設(shè)置進行深入分析。了解最佳適應(yīng)度、最佳個體以及平均適應(yīng)度的變化趨勢,有助于理解算法的優(yōu)勢和局限性。
調(diào)整參數(shù)的靈活性: 在實際應(yīng)用中,調(diào)整遺傳算法的參數(shù)通常需要一定的經(jīng)驗和靈活性。根據(jù)實驗結(jié)果,可以調(diào)整參數(shù)以提高算法性能,例如調(diào)整交叉率、變異率和種群規(guī)模等。
圖形化展示: 通過繪制適應(yīng)度曲線和個體分布圖,可以直觀地觀察算法的收斂過程和搜索路徑,有助于更好地理解算法的運行情況。
當(dāng)然,下面是按照大綱填充的具體內(nèi)容:
遺傳算法介紹
簡介
遺傳算法(Genetic Algorithm,簡稱GA)是一種基于模擬自然進化過程的優(yōu)化算法。它是由美國科學(xué)家約翰·霍蘭德(John Holland)在20世紀70年代提出的。
基本原理
遺傳算法的基本原理包括以下幾個要素:
個體表示
遺傳算法中的個體被抽象為基因組合的表示形式,通常用二進制編碼或浮點數(shù)編碼來表示。
適應(yīng)度函數(shù)
適應(yīng)度函數(shù)用于評估個體的適應(yīng)度,它衡量了個體在解決問題中的優(yōu)劣程度。
選擇操作
選擇操作根據(jù)個體的適應(yīng)度,選擇一部分個體作為父代,用于生成下一代個體。
交叉操作
交叉操作是指將選中的父代個體的基因進行交叉組合,生成新的子代個體。交叉操作的目的是產(chǎn)生具有多樣性的后代個體。
變異操作
變異操作是對子代個體的基因進行隨機變異,以增加種群的多樣性。變異操作的目的是引入新的基因組合,以探索搜索空間。
算法流程
遺傳算法的基本流程如下:
-
初始化種群:隨機生成一組候選解作為初始種群。
-
評估適應(yīng)度:根據(jù)問題的評價準(zhǔn)則,計算每個個體的適應(yīng)度。
-
選擇操作:根據(jù)個體的適應(yīng)度,選擇一部分個體作為父代。
-
交叉操作:通過交叉操作,將選中的父代個體的基因進行交叉組合,生成新的子代個體。
-
變異操作:對子代個體的基因進行隨機變異,以增加種群的多樣性。
-
更新種群:將父代和子代個體合并,形成新的種群。
-
重復(fù)執(zhí)行步驟2-6,直到滿足終止條件(如達到預(yù)定的迭代次數(shù)或找到滿意的解)。
特點與優(yōu)點
遺傳算法具有以下特點與優(yōu)點:
-
并行性:多個個體可以同時進行評估和操作,提高了算法的效率。
-
自適應(yīng)性:通過自然選擇和變異操作,遺傳算法具有自適應(yīng)的能力,能夠適應(yīng)環(huán)境的變化。
-
隨機性:遺傳算法中的選擇、交叉和變異等操作都具有一定的隨機性,能夠避免陷入局部最優(yōu)解。
-
全局搜索能力:由于遺傳算法的隨機性和自適應(yīng)性,它可以在整個搜索空間中進行全局搜索,從而找到較好的解。
應(yīng)用領(lǐng)域
遺傳算法在以下領(lǐng)域有著廣泛的應(yīng)用:
-
函數(shù)優(yōu)化:通過遺傳算法可以在復(fù)雜的搜索空間中尋找函數(shù)的最優(yōu)解。
-
組合優(yōu)化:遺傳算法可以用于求解諸如旅行商問題、背包問題等組合優(yōu)化問題。
-
旅行商問題:遺傳算法可以用于求解旅行商問題,找到最短路徑。
-
其他問題:遺傳算法還可以應(yīng)用于工程設(shè)計、機器學(xué)習(xí)、預(yù)測建模、調(diào)度問題等。它在各種領(lǐng)域中都能發(fā)揮優(yōu)秀的搜索和優(yōu)化能力。
算法改進
為了提高遺傳算法的性能和效果,人們對其進行了一系列的改進和優(yōu)化。以下是一些常見的算法改進方法:
-
參數(shù)調(diào)節(jié):通過合理設(shè)置遺傳算法的參數(shù),如種群大小、交叉率、變異率等,可以提高算法的性能。
-
操作策略優(yōu)化:對選擇、交叉和變異等操作的策略進行優(yōu)化,如采用更好的選擇策略、交叉方式和變異方式,以提高算法的搜索能力。
-
多種群算法:將種群劃分為多個子種群,并在每個子種群中執(zhí)行獨立的遺傳算法操作,可以增加種群的多樣性,加快收斂速度。
-
遺傳算法與其他算法的結(jié)合:將遺傳算法與其他優(yōu)化算法,如模擬退火算法、粒子群優(yōu)化算法等結(jié)合使用,可以充分利用各個算法的優(yōu)點,提高解的質(zhì)量和搜索效率。文章來源:http://www.zghlxwxcb.cn/news/detail-768226.html
總結(jié)
遺傳算法是一種基于模擬自然進化過程的優(yōu)化算法。它通過個體的基因表示、適應(yīng)度函數(shù)評估、選擇、交叉和變異等操作,模擬了生物進化的過程,并通過不斷的迭代和進化找到問題的較優(yōu)解。遺傳算法具有并行性、自適應(yīng)性、隨機性和全局搜索能力等優(yōu)點,在函數(shù)優(yōu)化、組合優(yōu)化、旅行商問題等領(lǐng)域有著廣泛的應(yīng)用。通過算法改進和與其他算法的結(jié)合,遺傳算法的性能和效果可以進一步提升。文章來源地址http://www.zghlxwxcb.cn/news/detail-768226.html
到了這里,關(guān)于【人工智能】實驗四:遺傳算法求函數(shù)最大值實驗與基礎(chǔ)知識的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!