{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/trust-region-policy-optimization","title":"Trust Region Policy Optimization","arxiv_id":"1502.05477","date":"2015-02-19","proceeding":null,"authors":["John Schulman","Sergey Levine","Philipp Moritz","Michael. I. Jordan","Pieter Abbeel"],"abstract":"We describe an iterative procedure for optimizing policies, with guaranteed\nmonotonic improvement. By making several approximations to the\ntheoretically-justified procedure, we develop a practical algorithm, called\nTrust Region Policy Optimization (TRPO). This algorithm is similar to natural\npolicy gradient methods and is effective for optimizing large nonlinear\npolicies such as neural networks. Our experiments demonstrate its robust\nperformance on a wide variety of tasks: learning simulated robotic swimming,\nhopping, and walking gaits; and playing Atari games using images of the screen\nas input. Despite its approximations that deviate from the theory, TRPO tends\nto give monotonic improvement, with little tuning of hyperparameters.","url_abs":"http://arxiv.org/abs/1502.05477v5","url_pdf":"http://arxiv.org/pdf/1502.05477v5.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/170928/-Review-Generative-Adversarial-Imitation-Learning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/Khrylx/PyTorch-RL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/Stable-Baselines-Team/stable-baselines3-contrib","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/ailab-pku/rl-framework","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/chainer/chainerrl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/harruff/Senior_Project_Repository","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/ifestus/rl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/ikostrikov/pytorch-rl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/ikostrikov/pytorch-trpo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/magnusja/ppo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/marload/DeepRL-TensorFlow2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/nitthilan/pommerman","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/pat-coady/trpo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/sirdr/TRPO.jl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/tensorlayer/RLzoo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/wangyy161/DDPG_CNN_Pendulum_practice","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/DLR-RM/stable-baselines3","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/MindCode-4/code-13/tree/main/TRSTMI","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/MindSpore-scientific/code-14/tree/main/TRSTMI","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/MindSpore-scientific/code-2/tree/main/TRSTMI","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/arnomoonens/yarll","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/hill-a/stable-baselines","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/spideralessio/TRPO-Tensorflow2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":null},{"paper_slug":"trust-region-policy-optimization","repo_url":"https://github.com/toni-sm/skrl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"atari-games","task_name":"Atari Games"},{"task_slug":"policy-gradient-methods","task_name":"Policy Gradient Methods"}],"methods":[{"method_slug":"trpo","method_name":"TRPO"}],"datasets_introduced":[],"methods_introduced":[{"slug":"trpo","name":"TRPO","full_name":"Trust Region Policy Optimization"}],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1502.05477","atlas_url":"https://app.syntology.ai/?focus=1502.05477","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1502.05477"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hill-a/stable-baselines","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/DLR-RM/stable-baselines3","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Khrylx/PyTorch-RL","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wangyy161/DDPG_CNN_Pendulum_practice","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindSpore-scientific/code-14/tree/main/TRSTMI","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindSpore-scientific/code-2/tree/main/TRSTMI","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ikostrikov/pytorch-trpo","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/toni-sm/skrl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ifestus/rl","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nitthilan/pommerman","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindCode-4/code-13/tree/main/TRSTMI","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/magnusja/ppo","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/170928/-Review-Generative-Adversarial-Imitation-Learning","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/chainer/chainerrl","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/harruff/Senior_Project_Repository","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ikostrikov/pytorch-rl","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ailab-pku/rl-framework","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Stable-Baselines-Team/stable-baselines3-contrib","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tensorlayer/RLzoo","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/arnomoonens/yarll","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pat-coady/trpo","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/spideralessio/TRPO-Tensorflow2","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/marload/DeepRL-TensorFlow2","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sirdr/TRPO.jl","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_fixture":1,"ran_honours":2,"unverified":10},"by_repo_kind":{"listed":{"samples":15,"ran":6,"repositories":7}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":7,"samples":[{"code_sha256_prefix":"21087806cd98f0eb","entry":"KLEntropy","repo":"pat-coady/trpo","repo_kind":"listed","path":"trpo/policy.py","file_url":"https://github.com/pat-coady/trpo/blob/HEAD/trpo/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"21087806cd98f0eb"}},{"code_sha256_prefix":"cb1881154c084926","entry":"LogProb","repo":"pat-coady/trpo","repo_kind":"listed","path":"trpo/policy.py","file_url":"https://github.com/pat-coady/trpo/blob/HEAD/trpo/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb1881154c084926"}},{"code_sha256_prefix":"adb1b2f8460af76c","entry":"PolicyNN","repo":"pat-coady/trpo","repo_kind":"listed","path":"trpo/policy.py","file_url":"https://github.com/pat-coady/trpo/blob/HEAD/trpo/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"adb1b2f8460af76c"}},{"code_sha256_prefix":"68f53fd02ecf2c67","entry":"TRPOAgent","repo":"ifestus/rl","repo_kind":"listed","path":"policy_agents.py","file_url":"https://github.com/ifestus/rl/blob/HEAD/policy_agents.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"68f53fd02ecf2c67"}},{"code_sha256_prefix":"918891131c62a121","entry":"conjugate_gradients","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"918891131c62a121"}},{"code_sha256_prefix":"624753be66ae25df","entry":"flatgrad","repo":"spideralessio/TRPO-Tensorflow2","repo_kind":"listed","path":"TRPO.py","file_url":"https://github.com/spideralessio/TRPO-Tensorflow2/blob/HEAD/TRPO.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"624753be66ae25df"}},{"code_sha256_prefix":"7c5c823b328af93a","entry":"flatvars","repo":"spideralessio/TRPO-Tensorflow2","repo_kind":"listed","path":"TRPO.py","file_url":"https://github.com/spideralessio/TRPO-Tensorflow2/blob/HEAD/TRPO.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7c5c823b328af93a"}},{"code_sha256_prefix":"b11d0213b416df62","entry":"Policy","repo":"magnusja/ppo","repo_kind":"listed","path":"src/policy.py","file_url":"https://github.com/magnusja/ppo/blob/HEAD/src/policy.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b11d0213b416df62"}},{"code_sha256_prefix":"bc789c354e38ee20","entry":"TRPO","repo":"spideralessio/TRPO-Tensorflow2","repo_kind":"listed","path":"TRPO.py","file_url":"https://github.com/spideralessio/TRPO-Tensorflow2/blob/HEAD/TRPO.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bc789c354e38ee20"}},{"code_sha256_prefix":"f51bd581b9a86ab1","entry":"TRPO","repo":"pat-coady/trpo","repo_kind":"listed","path":"trpo/policy.py","file_url":"https://github.com/pat-coady/trpo/blob/HEAD/trpo/policy.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f51bd581b9a86ab1"}},{"code_sha256_prefix":"84ac3feb93cdf5c7","entry":"TRPO","repo":"tensorlayer/RLzoo","repo_kind":"listed","path":"rlzoo/algorithms/trpo/trpo.py","file_url":"https://github.com/tensorlayer/RLzoo/blob/HEAD/rlzoo/algorithms/trpo/trpo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"84ac3feb93cdf5c7"}},{"code_sha256_prefix":"16b584c62bee3a78","entry":"assign_vars","repo":"spideralessio/TRPO-Tensorflow2","repo_kind":"listed","path":"TRPO.py","file_url":"https://github.com/spideralessio/TRPO-Tensorflow2/blob/HEAD/TRPO.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"16b584c62bee3a78"}},{"code_sha256_prefix":"8946170b041be61b","entry":"conjugate_gradients","repo":"Khrylx/PyTorch-RL","repo_kind":"listed","path":"core/trpo.py","file_url":"https://github.com/Khrylx/PyTorch-RL/blob/HEAD/core/trpo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8946170b041be61b"}},{"code_sha256_prefix":"f7c68d288ffc351b","entry":"line_search","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"f7c68d288ffc351b"}},{"code_sha256_prefix":"6b18e6942fb60f72","entry":"linesearch","repo":"ikostrikov/pytorch-trpo","repo_kind":"listed","path":"trpo.py","file_url":"https://github.com/ikostrikov/pytorch-trpo/blob/HEAD/trpo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b18e6942fb60f72"}},{"code_sha256_prefix":"6bcf14c615d2dc3a","entry":"trpo_step","repo":"ikostrikov/pytorch-trpo","repo_kind":"listed","path":"trpo.py","file_url":"https://github.com/ikostrikov/pytorch-trpo/blob/HEAD/trpo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6bcf14c615d2dc3a"}},{"code_sha256_prefix":"52129aa1d9bff078","entry":"trpo_step","repo":"Khrylx/PyTorch-RL","repo_kind":"listed","path":"core/trpo.py","file_url":"https://github.com/Khrylx/PyTorch-RL/blob/HEAD/core/trpo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"52129aa1d9bff078"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}