How I can define eight discrete actions in RL section

3 Ansichten (letzte 30 Tage)
Armin Lotfy
Armin Lotfy am 9 Aug. 2023
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,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,1,1,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));

Antworten (1)

Emmanouil Tzorakoleftherakis
The implementation shown here is one option.
Hope that helps

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by