> For the complete documentation index, see [llms.txt](https://idminer.gitbook.io/robotis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://idminer.gitbook.io/robotis/part-1-turtlebot3/14.-machine-learning-ji-qi-xue-xi/untitled/14.2.4.-she-ding-hyper-parameters-chao-can-shu.md).

# 14.2.4. 設定 hyper parameters 超參數

本教程是使用 DQN 方法來學習的。DQN 是一種強化學習方法，通過近似動作值函數（Q值）來選擇深度神經網絡。Agent 會遵照在 /turtlebot3\_*machine\_learning/turtlebot3\_dqn /nodes/turtlebot3\_dqn\_stage*＃中的 hyper parameters 超參數。

| Hyper parameter  | 預設值     | 說明                                                                            |
| ---------------- | ------- | ----------------------------------------------------------------------------- |
| episode\_step    | 6000    | The time step of one episode.                                                 |
| target\_update   | 2000    | Update rate of target network.                                                |
| discount\_factor | 0.99    | Represents how much future events lose their value according to how far away. |
| learning\_rate   | 0.00025 | Learning speed. 如果該值太大，學習效果不好，如果太小，學習時間就會很長。                                  |
| epsilon          | 1.0     | The probability of choosing a random action.                                  |
| epsilon\_decay   | 0.99    | Reduction rate of epsilon. When one episode ends, the epsilon reduce.         |
| epsilon\_min     | 0.05    | The minimum of epsilon.                                                       |
| batch\_size      | 64      | Size of a group of training samples.                                          |
| train\_start     | 64      | Start training if the replay memory size is greater than 64.                  |
| memory           | 1000000 | The size of replay memory.                                                    |
