How I can define eight discrete actions in RL section

조회 수: 6 (최근 30일)
Armin Lotfy
Armin Lotfy 2023년 8월 9일
I want to define an agent with eight discrete actions using "rlFiniteSetSpec" function. How I can do that? How should I write all 256 different possible actions?
I defined the actions in a very bad way, and it didnt work for me.
I would appreciate if somebody could help me with that.
actions={[0,0,0,0,0,0,0,0];[0,0,0,0,0,0,0,1];[0,0,0,0,0,0,1,0];[0,0,0,0,0,0,1,1];[0,0,0,0,0,1,0,0];[0,0,0,0,0,1,0,1];[0,0,0,0,0,1,1,0];[0,0,0,0,0,1,1,1];[0,0,0,0,1,0,0,0];[0,0,0,0,1,0,0,1];[0,0,0,0,1,0,1,0];[0,0,0,0,1,0,1,1];[0,0,0,0,1,1,0,0];[0,0,0,0,1,1,0,1];[0,0,0,0,1,1,1,0];[0,0,0,0,1,1,1,1];[0,0,0,1,0,0,0,0];[0,0,0,1,0,0,0,1];[0,0,0,1,0,0,1,0];[0,0,0,1,0,0,1,1];[0,0,0,1,0,1,0,0];[0,0,0,1,0,1,0,1];[0,0,0,1,0,1,1,0];[0,0,0,1,0,1,1,1];[0,0,0,1,1,0,0,0];[0,0,0,1,1,0,0,1];[0,0,0,1,1,0,1,0];[0,0,0,1,1,0,1,1];[0,0,0,1,1,1,0,0];[0,0,0,1,1,1,0,1];[0,0,0,1,1,1,1,0];[0,0,0,1,1,1,1,1];[0,0,1,0,0,0,0,0];[0,0,1,0,0,0,0,1];[0,0,1,0,0,0,1,0];[0,0,1,0,0,0,1,1];[0,0,1,0,0,1,0,0];[0,0,1,0,0,1,0,1];[0,0,1,0,0,1,1,0];[0,0,1,0,0,1,1,1];[0,0,1,0,1,0,0,0];[0,0,1,0,1,0,0,1];[0,0,1,0,1,0,1,0];[0,0,1,0,1,0,1,1];[0,0,1,0,1,1,0,0];[0,0,1,0,1,1,0,1];[0,0,1,0,1,1,1,0];[0,0,1,0,1,1,1,1];[0,0,1,1,0,0,0,0];[0,0,1,1,0,0,0,1];[0,0,1,1,0,0,1,0];[0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,1];[1,1,1,0,1,0,0,0];[1,1,1,0,1,0,0,1];[1,1,1,0,1,0,1,0];[1,1,1,0,1,0,1,1];[1,1,1,0,1,1,0,0];[1,1,1,0,1,1,0,1];[1,1,1,0,1,1,1,0];[1,1,1,0,1,1,1,1];[1,1,1,1,0,0,0,0];[1,1,1,1,0,0,0,1];[1,1,1,1,0,0,1,0];[1,1,1,1,0,0,1,1];[1,1,1,1,0,1,0,0];[1,1,1,1,0,1,0,1];[1,1,1,1,0,1,1,0];[1,1,1,1,0,1,1,1];[1,1,1,1,1,0,0,0];[1,1,1,1,1,0,0,1];[1,1,1,1,1,0,1,0];[1,1,1,1,1,0,1,1];[1,1,1,1,1,1,0,0];[1,1,1,1,1,1,0,1];[1,1,1,1,1,1,1,0];[1,1,1,1,1,1,1,1]};
actionInfo = rlFiniteSetSpec([0,1]);rlNumericSpec([8 1],'LowerLimit', zeros(8,1),'UpperLimit',ones(8,1));

답변 (1개)

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2023년 8월 9일
The implementation shown here is one option.
Hope that helps

카테고리

Help CenterFile Exchange에서 Reinforcement Learning에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by