91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 18KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-04
  • 語言: Matlab
  • 標簽:

資源簡介

內附NEAT算法源程序,各位可以參考,根據具體問題進行修改。

資源截圖

代碼片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%?generate?minimal?initial?population?

%%?Neuro_Evolution_of_Augmenting_Topologies?-?NEAT?
%%?developed?by?Kenneth?Stanley?(kstanley@cs.utexas.edu)?&?Risto?Miikkulainen?(risto@cs.utexas.edu)
%%?Coding?by?Christian?Mayr?(matlab_neat@web.de)

function?[populationinnovation_record]=initial_population(number_individualsnumber_input_nodesnumber_output_nodesvector_connected_input_nodes);

%?nodegenes?is?array?4rows?*?(number_input_nodes+number_output_nodes+hidden-nodes(not?existent?in?initial?population)?+1?(bias-node))columns
%?nodegenes?contains?consecutive?node?ID‘s?(upper?row)?node?type?(lower?row)?1=input?2=output?3=hidden?4=bias?node?input?state?and?node?output?state?(used?for?evaluation?all?input?states?zero?initially?except?bias?node?which?is?always?1)
%?connectiongenes?is?array?5?rows?*?number_connections?columns
%?from?top?to?bottom?those?five?rows?contain:?innovation?number?connection?from?connection?to?weight?enable?bit?
%?the?rest?of?the?elements?in?the?structure?for?an?individual?should?be?self-explanatory

%?innovation_record?tracks?innovations?in?a?5rows?by?(number?of?innovations)?columns?matrix?contains?innovation?number?connect_from_node?as?well?as?connect_to_node?for?this?innovation)
%?the?new?node?(if?it?is?a?new?node?mutation?then?this?node?will?appear?in?the?4th?row?when?it?is?first?connected.?There?will?always?be?two?innovations?with?one?node?mutation?since?there?is?a?connection?to?and?from?the?new?node.?
%?In?the?initial?population?this?will?be?abbreviated?to?the?Node?with?the?highest?number?appearing?in?the?last?column?of?the?record?since?only?this?is?needed?as?starting?point?for?the?rest?of?the?algorithm)?
%?and?5th?row?is?generation?this?innovation?occured?(generation?is?assumed?to?be?zero?for?the?innovations?in?the?initial?population)
???
%compute?number?and?matrix?of?initial?connections?(all?connections?between?output?nodes?and?the?nodes?listed?in?vector_connected_input_nodes)
number_connections=(length(vector_connected_input_nodes)+1)*number_output_nodes;
vector_connection_from=rep([vector_connected_input_nodesnumber_input_nodes+1][1?number_output_nodes]);
vector_connection_to=[];

for?index_output_node=(number_input_nodes+2):(number_input_nodes+1+number_output_nodes)
???vector_connection_to=[vector_connection_toindex_output_node*ones(1length(vector_connected_input_nodes)+1)];
end
connection_matrix=[vector_connection_from;
???????????????????vector_connection_to];

for?index_individual=1:number_individuals;
???population(index_individual).nodegenes=[1:(number_input_nodes+1+number_output_nodes);
???????????????????????????????????????????ones(1number_input_nodes)42*ones(1number_output_nodes);
???????????????????????????????????????????zeros(1number_input_nodes)1zeros(1number_output_nodes);
???????????????????????????????????????????zeros(1number_input_nodes+1+number_output_nodes)];
???population(index_individual).connectiongenes=[1:

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????3594??2003-09-01?05:52??matlab_neat源程序\README
?????文件????????3675??2003-05-20?03:26??matlab_neat源程序\initial_population.m
?????文件???????15156??2003-08-22?22:37??matlab_neat源程序\neat_main.m
?????文件????????1162??1994-04-18?13:00??matlab_neat源程序\rep.m
?????文件???????30437??2003-08-19?03:56??matlab_neat源程序\reproduce.m
?????文件????????4904??2003-08-22?22:30??matlab_neat源程序\xor_experiment.m
?????文件????????4136??2003-08-22?22:30??matlab_neat源程序\xor_experiment_vec.m
?????目錄???????????0??2017-10-31?10:52??matlab_neat源程序\

評論

共有 條評論

相關資源