Q-learning with neural network
이전 댓글 표시
I am trying to implement Q-learning together with a neural network (known as deep Q-learning).
I know the theory but cant understand how to implement it in Matlab.
Can anyone assist with an Example code on this?
Thanks in advance!
답변 (1개)
Agnish Dutta
2019년 4월 8일
0 개 추천
MATLAB's reinforcement learning toolbox has tools for implementing a variety of RL algorithms such as Deep Q-Network (DQN), Advantage Actor Critic (A2C), Deep Deterministic Policy Gradients (DDPG), and other built-in algorithms.
1) Consider going through the following tutorial to get an idea about running a simple Q learning Agent in an MDP environment. It explains the process of creating an MDP, and agent and then training the agent on the MDP environment.
2) The above is geared towards Q learning. To create and train a DQN agent, kindly go through the following:
Create a DQN learning agent - https://www.mathworks.com/help/reinforcement-learning/ref/rldqnagent.html
You'll need to set the critic network and agent options parameters correctly. The following documents show how that can be done:
- Setting the Critic network - https://www.mathworks.com/help/reinforcement-learning/ref/rlrepresentation.html
- Setting the agent options - https://www.mathworks.com/help/reinforcement-learning/ref/rldqnagentoptions.html
3) The next thing to do is to train the agent given the environment. This can be done as depicted in the following document. It contains details about the different training options, you can use to achieve desired performance:
카테고리
도움말 센터 및 File Exchange에서 Reinforcement Learning에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!