資源簡介
簡單實用的matlab源碼,描述了Q學習的過程,實現了探索和最優化。

代碼片段和文件信息
function?y=RandomPermutation(A)
?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
?%?return?random?permutation?of?matrix?A
?%?unlike?randperm(n)?that?give?permutation?of?integer?1:n?only
?%?RandomPermutation?rearrange?member?of?matrix?A?randomly
?%?This?function?is?useful?for?MonteCarlo?Simulation?
?%??Bootstrap?sampling?game?etc.
?%?
?%?Copyright?Kardi?Teknomo(c)?2005
?%?(http://people.revoledu.com/kardi/)
?%
?%?example:?A?=?[?2?1?5?3]
?%?RandomPermutation(A)?may?produce?[?1?5?3?2]?or?[?5?3?2?3]
?%?
?%?example:?
?%?A=magic(3)
?%?RandomPermutation(A)
?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
???[rc]=size(A);
???b=reshape(Ar*c1);???????%?convert?to?column?vector
???x=randperm(r*c);??????????%?make?integer?permutation?of?similar?array?as?key
???w=[bx‘];?????????????????%?combine?matrix?and?key
???d=sortrows(w2);??????????%?sort?according?to?key
???y=reshape(d(:1)rc);????%?return?back?the?matrix
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????929??2011-10-18?18:44??Q-learning\RandomPermutation.m
?????文件???????2593??2011-10-18?18:44??Q-learning\ReinforcementLearning.m
?????目錄??????????0??2011-10-18?18:45??Q-learning
-----------?---------??----------?-----??----
?????????????????3522????????????????????3
- 上一篇:波達方向估計MAtLAB
- 下一篇:基于nsct+pcnn的圖像融合
評論
共有 條評論