![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Original Version of STM Board
Diff: main.cpp
- Revision:
- 172:63af34265fe9
- Parent:
- 171:bfc1fd2629d8
- Child:
- 173:68c7914679ec
--- a/main.cpp Sat Nov 21 07:15:47 2020 +0000 +++ b/main.cpp Sat Nov 21 07:25:32 2020 +0000 @@ -1,4 +1,4 @@ -//201121_1 +//201121_2 #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -395,14 +395,14 @@ // mean_old = log(1.0f+exp(mean_old)); // deviation_old = log(1.0f+exp(deviation_old)); if (mean_before_SP >=0) { - mean = mean_before_SP; + mean_old = mean_before_SP; } else { - mean = 0.0f; + mean_old = 0.0f; } if (deviation_before_SP >=0) { - deviation = deviation_before_SP; + deviation_old = deviation_before_SP; } else { - deviation = 0.0f; + deviation_old = 0.0f; } } @@ -422,7 +422,7 @@ void update_Critic_Networks(float (*arr)[num_input_RL]) { - float gradient_rate = 0.01f; + float gradient_rate = 0.001f; float G_hc1[num_input_RL][num_hidden_unit] = {0.0f}; float G_bc1[num_hidden_unit] = {0.0f}; @@ -486,7 +486,7 @@ void update_Actor_Networks(float (*arr)[num_input_RL]) { - float gradient_rate = 0.01f; //-0.01f + float gradient_rate = 0.001f; //-0.01f float G_ha1[num_input_RL][num_hidden_unit] = {0.0f}; float G_ba1[num_hidden_unit] = {0.0f};