My controlled object is an object with three inputs and three outputs, I now use three parallel reinforcement learning agents to control these three channels, such a scheme is

1 次查看(过去 30 天)
My controlled object is an object with three inputs and three outputs, I now use three parallel reinforcement learning agents to control these three channels, such a scheme is feasible? I would be very grateful for your answer.

回答(1 个)

Venu
Venu 2023-12-12
You can perform parallel computing for multiple agents in the context of using three parallel reinforcement learning agents to control these three channels.
You can refer to the below documentation and also examples provided in this documentation.
https://www.mathworks.com/help/reinforcement-learning/ug/train-agents-using-parallel-computing-and-gpu.html#d126e14864
Here's how you can achieve parallel training of multiple agents based on the above documentation:
1. Create a Parallel Pool: To start, you can create a parallel pool of workers using the parpool function. This allows you to specify the number of workers (N) for your parallel pool.
pool = parpool(N);
2. Configure Parallel Training: When training your agents using multiple processes, you need to pass an "rlTrainingOptions" object to the train function. In this object, set the "UseParallel" property to "true" to enable parallel computing for training.
trainingOptions = rlTrainingOptions('UseParallel', true);
3. Experience-Based Parallelization: In this mode, workers simulate the agent within their copy of the environment and send experience data back to the client. The client then computes the gradients from experiences, updates the agent parameters, and sends the updated parameters back to the workers.
4. Asynchronous and Synchronous Training: Asynchronous training allows the client agent to calculate gradients and update agent parameters without waiting for experiences from all the workers. Synchronous training, on the other hand, waits to receive experiences from all workers and then calculates gradients from all these experiences.
trainOpts.ParallelizationOptions.Mode = "async";
Hope this helps!
  3 个评论
Venu
Venu 2023-12-21
hi @嘻嘻, when using three parallel agents to train, conflicts may arise due to the interdependencies between your inputs and outputs of the system. So it depends on combination of your system characteristics, training approach, reward design, and your control mechanism.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Training and Simulation 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by