How I can define eight discrete actions in RL section

6 visualizaciones (últimos 30 días)
Armin Lotfy
Armin Lotfy el 9 de Ag. de 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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0,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));

Respuestas (1)

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis el 9 de Ag. de 2023
The implementation shown here is one option.
Hope that helps

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by