- The experience structure does not by default save the internal states of the environment unless they are part of the observation. If you need to save the full states for post-simulation analysis, you can modify your environment to include the full state as part of the observation or as additional information in the info output of the step function. However, this additional state information should not be used by the agent for learning if it is not part of the actual observation space.
- If you want to include additional information in the observations but only use a subset of them for training the agent's networks, you would need to customize the neural network architectures for the actor and critic. In MATLAB, you can define custom layers or networks that only process the relevant parts of the observation vector. You can achieve this by creating a custom observation preprocessing function that selects the relevant features from the observation space before they are fed into the networks. This preprocessing step can be included as part of the agent's policy or value function representation.
How to save further simulation data (e.g. the states) when simulating an RL-Agent on an environment.
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I created a custom environment with the function rlCreateEnvTemplate("MyEnvironment") and trained an AC- and DDPG-agent for this. Afterwards I ran the function experience = sim(env,agents) and plot the results. Is there a possibility to save not only the actions, observations,... in the structure 'experience' but also e.g. the states since they contain information i want to plot as well?
Alternatively is there a possibility to add this information i want to plot to the observations but only use 3 out of 24 entries from the observation vector to train the network of actor and critic?
Thanks for your help.
0 个评论
回答(1 个)
Shubham
2024-2-23
Hi Rebecca,
In MATLAB, when you are working with custom reinforcement learning environments and agents such as Actor-Critic (AC) and Deep Deterministic Policy Gradient (DDPG), the experience structure typically contains the data from simulation, including observations, actions, rewards, and other signals that the agents use for learning.
To address your questions:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!