How I can define eight discrete actions in RL section

1 次查看(过去 30 天)
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,0,1,1,0,0,1,1];[0,0,1,1,0,1,0,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,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
The implementation shown here is one option.
Hope that helps

Community Treasure Hunt

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

Start Hunting!

Translated by