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

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.

Answers (1)

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 Comments

@VenuThank you for your answer, but my controlled object is a coupled system, if I use three parallel agents to train to find the optimal parameters of the controller, will there be conflicts between these three parallel agents?
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.
@嘻嘻, is your coupled system a control-affine system something like the following?
, , are inputs and , , are outputs.

Sign in to comment.

Products

Release

R2022a

Asked:

on 2 Nov 2023

Commented:

on 21 Dec 2023

Community Treasure Hunt

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

Start Hunting!