五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

基于強化學習實現(xiàn)智能泊車附matlab代碼

2023-02-07 21:56 作者:Matlab工程師  | 我要投稿

?作者簡介:熱愛科研的Matlab仿真開發(fā)者,修心和技術(shù)同步精進,matlab項目合作可私信。

??個人主頁:Matlab科研工作室

??個人信條:格物致知。

更多Matlab仿真內(nèi)容點擊??

智能優(yōu)化算法??神經(jīng)網(wǎng)絡(luò)預測?雷達通信??無線傳感器

信號處理?圖像處理?路徑規(guī)劃?元胞自動機?無人機??電力系統(tǒng)

? 內(nèi)容介紹

基于強化學習的數(shù)字孿生智慧停車方法,為智慧城市信息物理融合物聯(lián)網(wǎng)構(gòu)建提供了一個智能,易用的系統(tǒng)模型.該智慧停車系統(tǒng)支持對實際場景下多車輛自動泊車過程進行實時控制,并能有效避免碰撞,降低人工停車時間成本,減少人為操作失誤安全事故的發(fā)生.

? 部分代碼

clear all; close all;

freeSpotIdx = 26;

map = ParkingLot(freeSpotIdx);

egoInitialPose = [20, 15, 0];

egoTargetPose = createTargetPose(map,freeSpotIdx)

autoParkingValetParams

mdl = 'rlAutoParkingValet';

open_system(mdl)

createMPCForParking


numObservations = 16;

observationInfo = rlNumericSpec([numObservations 1]);

observationInfo.Name = 'observations';


steerMax = pi/4;

discreteSteerAngles = -steerMax : deg2rad(1) : steerMax;

actionInfo = rlFiniteSetSpec(num2cell(discreteSteerAngles));

actionInfo.Name = 'actions';

numActions = numel(actionInfo.Elements);


blk = [mdl '/RL Controller/RL Agent'];

env = rlSimulinkEnv(mdl,blk,observationInfo,actionInfo);


env.ResetFcn = @autoParkingValetResetFcn;


rng(0)

criticNetwork = [

? ? featureInputLayer(numObservations,'Normalization','none','Name','observations')

? ? fullyConnectedLayer(128,'Name','fc1')

? ? reluLayer('Name','relu1')

? ? fullyConnectedLayer(128,'Name','fc2')

? ? reluLayer('Name','relu2')

? ? fullyConnectedLayer(128,'Name','fc3')

? ? reluLayer('Name','relu3')

? ? fullyConnectedLayer(1,'Name','fc4')];


criticOptions = rlRepresentationOptions('LearnRate',1e-3,'GradientThreshold',1);

critic = rlValueRepresentation(criticNetwork,observationInfo,...

? ? 'Observation',{'observations'},criticOptions);



actorNetwork = [

? ? featureInputLayer(numObservations,'Normalization','none','Name','observations')

? ? fullyConnectedLayer(128,'Name','fc1')

? ? reluLayer('Name','relu1')

? ? fullyConnectedLayer(128,'Name','fc2')

? ? reluLayer('Name','relu2')

? ? fullyConnectedLayer(numActions, 'Name', 'out')

? ? softmaxLayer('Name','actionProb')];


actorOptions = rlRepresentationOptions('LearnRate',2e-4,'GradientThreshold',1);

actor = rlStochasticActorRepresentation(actorNetwork,observationInfo,actionInfo,...

? ? 'Observation',{'observations'},actorOptions);


agentOpts = rlPPOAgentOptions(...

? ? 'SampleTime',Ts,...

? ? 'ExperienceHorizon',512,...

? ? 'ClipFactor',0.2,...?

? ? 'EntropyLossWeight',0.01,...

? ? 'MiniBatchSize',64,...

? ? 'NumEpoch',3,...

? ? 'AdvantageEstimateMethod',"gae",...

? ? 'GAEFactor',0.95,...

? ? 'DiscountFactor',0.99);

%? ? ?'DiscountFactor',0.998);

agent = rlPPOAgent(actor,critic,agentOpts);



trainOpts = rlTrainingOptions(...

? ? 'MaxEpisodes',10000,...

? ? 'MaxStepsPerEpisode',200,...

? ? 'ScoreAveragingWindowLength',200,...

? ? 'Plots','training-progress',...

? ? 'StopTrainingCriteria','AverageReward',...

? ? 'StopTrainingValue',80,...

? ? 'UseParallel',true);


doTraining =0;

if doTraining

? ? tic

? ? trainingStats = train(agent,env,trainOpts);

? ? toc

? ? save('7_Self_rlAutoParkingValetAgent.mat');

else

? ? load('6_Self_rlAutoParkingValetAgent.mat','agent');

end


set(gcf,'position',[500 600 1500 1000])

pause(1)

freeSpotIdx = 26;? % free spot location

sim(mdl);

% save('Self_rlAutoParkingValetAgent.mat');

% load('Self_rlAutoParkingValetAgent.mat');


? 運行結(jié)果

編輯

編輯

編輯

? 參考文獻

[1]肖蓬勃. 基于MATLAB中高檔轎車智能泊車系統(tǒng)開發(fā)及應(yīng)用研究[D]. 桂林電子科技大學.

[2]陳慧, 宋紹禹, 孫宏偉,等. 一種基于模型強化學習的智能泊車方法:.?

? Matlab代碼關(guān)注

??部分理論引用網(wǎng)絡(luò)文獻,若有侵權(quán)聯(lián)系博主刪除

?? 關(guān)注我領(lǐng)取海量matlab電子書和數(shù)學建模資料


基于強化學習實現(xiàn)智能泊車附matlab代碼的評論 (共 條)

分享到微博請遵守國家法律
邻水| 昌图县| 塘沽区| 隆回县| 托克逊县| 邹城市| 宜良县| 调兵山市| 嘉鱼县| 泽普县| 怀仁县| 天台县| 南安市| 扶沟县| 合江县| 萨迦县| 墨竹工卡县| 泰顺县| 东至县| 泉州市| 巴东县| 韶关市| 广水市| 武鸣县| 桂阳县| 东阿县| 六安市| 克山县| 松溪县| 沭阳县| 穆棱市| 阿拉善盟| 视频| 祥云县| 增城市| 六安市| 宜兴市| 西乌| 江油市| 舟山市| 陵水|