Mixed DataType in action space
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question
Accepted Answer
0 votes
Share a link to this answer
https://au.mathworks.com/matlabcentral/answers/1962479-mixed-datatype-in-action-space#answer_1234234
- rlFiniteSetSpec: Use this specification when the action space consists of a discrete set of possible actions. Each action in the set can be represented by a unique value or identifier. For example, if your action space consists of a finite set of discrete actions, such as "move forward," "turn left," or "turn right," you can use rlFiniteSetSpec to define the action space.
- rlNumericSpec: Use this specification when the action space is continuous or can be represented by a range of numerical values. If your action space requires specifying a continuous value, such as controlling the speed or position of a robotic arm, you can use rlNumericSpec to define the action space.
6 Comments
Share a link to this comment
Now, I want the rotations (sin theta) and (cos theta) to be discrete only (1,0,-1), while others should be continuous, but if I make Rotational Force discrete, it would make the states 'x' and 'y' discrete too as they are generated by both Translational and Rotational Forces as shown in next Figure. What should I do?
Share a link to this comment
- Define a maximum and minimum angle, θ_max and θ_min, respectively, in degrees or radians, depending on your preference. For this example, let's assume that θ can vary between -180 and 180 degrees.
- Define the rotation angle, θ, as an integer value between θ_min and θ_max. You can use the 'discretize' function in MATLAB to obtain the corresponding integer value. For example:
- Update the state representation to use the new rotation angle θ instead of sin(θ) and cos(θ). You would need to modify the observation space to include the new state variables, and also the action space to properly map the discrete action space to the continuous control inputs.
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
More Answers (0)
Categories
Find more on Reinforcement Learning in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)