Title: A problem in PPOAgent · Issue #6 · pythonlessons/Reinforcement_Learning · GitHub
Open Graph Title: A problem in PPOAgent · Issue #6 · pythonlessons/Reinforcement_Learning
X Title: A problem in PPOAgent · Issue #6 · pythonlessons/Reinforcement_Learning
Description: Hi, Rokas: First of all thanks for your great tutorial on reinforcement learning, I went through all the series and learned a lot. In the PPOAgent I think there may be something wrong with this line. When I vstack the discounted_r (shape...
Open Graph Description: Hi, Rokas: First of all thanks for your great tutorial on reinforcement learning, I went through all the series and learned a lot. In the PPOAgent I think there may be something wrong with this lin...
X Description: Hi, Rokas: First of all thanks for your great tutorial on reinforcement learning, I went through all the series and learned a lot. In the PPOAgent I think there may be something wrong with this lin...
Opengraph URL: https://github.com/pythonlessons/Reinforcement_Learning/issues/6
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"A problem in PPOAgent","articleBody":"Hi, Rokas:\r\n\r\nFirst of all thanks for your great tutorial on reinforcement learning, I went through all the series and learned a lot. \r\n\r\nIn the PPOAgent I think there may be something wrong with [this line](https://github.com/pythonlessons/Reinforcement_Learning/blob/b5eedc73b946614c7a21634de9734dba961b6c91/11_Pong-v0_PPO/Pong-v0_PPO_TF2.py#L125). When I `vstack` the discounted_r (shape of (n,1)) and subtract it with predicted values (shape of (n,)), the advantages become shape of (n,n). So I think maybe we should not `vstack` discounted_r, but `vstack` the advantages [in this line](https://github.com/pythonlessons/Reinforcement_Learning/blob/b5eedc73b946614c7a21634de9734dba961b6c91/11_Pong-v0_PPO/Pong-v0_PPO_TF2.py#L130) `advantages = np.vstack(discounted_r - values)`, then the advantages are shape of (n,1), which is the expected result.\r\n\r\nThanks.\r\n","author":{"url":"https://github.com/sailxjx","@type":"Person","name":"sailxjx"},"datePublished":"2021-04-28T08:03:20Z","url":"https://github.com/pythonlessons/Reinforcement_Learning/issues/6"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:62278021-eca4-54bd-fbde-b900398381cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93FC:25199C:17E1:1DEC:6B041542 |
| html-safe-nonce | 1d5faaa0a8afbbf3f4779c9829fdb8703d02b21bf068681f5ea2fc051d84a47b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0ZDOjI1MTk5QzoxN0UxOjFERUM6NkIwNDE1NDIiLCJ2aXNpdG9yX2lkIjoiODQzODMyMjMxNjk2NjEwNjQzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ed72960b8c0b98af97ad31b31736891d202dbb122f3463482497a7d0c8d2ec90 |
| hovercard-subject-tag | issue:869627998 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonlessons/Reinforcement_Learning/6/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7111ed09fab920c7e62dcce22f03db766a0f9d91debc2b578d2ec6f80394b467/pythonlessons/Reinforcement_Learning/issues/6 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7111ed09fab920c7e62dcce22f03db766a0f9d91debc2b578d2ec6f80394b467/pythonlessons/Reinforcement_Learning/issues/6 |
| og:image:alt | Hi, Rokas: First of all thanks for your great tutorial on reinforcement learning, I went through all the series and learned a lot. In the PPOAgent I think there may be something wrong with this lin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sailxjx |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonlessons/Reinforcement_Learning git https://github.com/pythonlessons/Reinforcement_Learning.git |
| octolytics-dimension-user_id | 43852392 |
| octolytics-dimension-user_login | pythonlessons |
| octolytics-dimension-repository_id | 233614411 |
| octolytics-dimension-repository_nwo | pythonlessons/Reinforcement_Learning |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 233614411 |
| octolytics-dimension-repository_network_root_nwo | pythonlessons/Reinforcement_Learning |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width