{"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/rl2-fast-reinforcement-learning-via-slow","title":"RL$^2$: Fast Reinforcement Learning via Slow Reinforcement Learning","arxiv_id":"1611.02779","date":"2016-11-09","proceeding":null,"authors":["Yan Duan","John Schulman","Xi Chen","Peter L. Bartlett","Ilya Sutskever","Pieter Abbeel"],"abstract":"Deep reinforcement learning (deep RL) has been successful in learning\nsophisticated behaviors automatically; however, the learning process requires a\nhuge number of trials. In contrast, animals can learn new tasks in just a few\ntrials, benefiting from their prior knowledge about the world. This paper seeks\nto bridge this gap. Rather than designing a \"fast\" reinforcement learning\nalgorithm, we propose to represent it as a recurrent neural network (RNN) and\nlearn it from data. In our proposed method, RL$^2$, the algorithm is encoded in\nthe weights of the RNN, which are learned slowly through a general-purpose\n(\"slow\") RL algorithm. The RNN receives all information a typical RL algorithm\nwould receive, including observations, actions, rewards, and termination flags;\nand it retains its state across episodes in a given Markov Decision Process\n(MDP). The activations of the RNN store the state of the \"fast\" RL algorithm on\nthe current (previously unseen) MDP. We evaluate RL$^2$ experimentally on both\nsmall-scale and large-scale problems. On the small-scale side, we train it to\nsolve randomly generated multi-arm bandit problems and finite MDPs. After\nRL$^2$ is trained, its performance on new MDPs is close to human-designed\nalgorithms with optimality guarantees. On the large-scale side, we test RL$^2$\non a vision-based navigation task and show that it scales up to\nhigh-dimensional problems.","url_abs":"http://arxiv.org/abs/1611.02779v2","url_pdf":"http://arxiv.org/pdf/1611.02779v2.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":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/BBDrive/Meta-SGD-RL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/GeorgeDUT/MetaRLSAS","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/Octavio-Pappalardo/RL2-implementation-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/Zhiwei-Z/PrompLimitTest","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/Zhiwei-Z/SeqPromp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/Zhiwei-Z/prompzzw","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/aliengirlliv/teachable","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/bay3s/rl-squared","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/clrrrr/promp_plus","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/dragen1860/MAML-Pytorch-RL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/edlanglois/relearn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"LGPL-3.0"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/gomerudo/nas-dmrl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/iclavera/learning_to_adapt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/iclavera/meta-mb","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/jonasrothfuss/promp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/shunzh/pytorch-maml-rl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/tristandeleu/pytorch-maml-rl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/RobvanGastel/meta-rl-algorithms","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rl2-fast-reinforcement-learning-via-slow","repo_url":"https://github.com/veds12/torch_rl_squared","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"deep-reinforcement-learning","task_name":"Deep Reinforcement Learning"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1611.02779","atlas_url":"https://app.syntology.ai/?focus=1611.02779","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1611.02779"}},"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/tristandeleu/pytorch-maml-rl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bay3s/rl-squared","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jonasrothfuss/promp","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Octavio-Pappalardo/RL2-implementation-pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Zhiwei-Z/PrompLimitTest","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/iclavera/learning_to_adapt","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/iclavera/meta-mb","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/veds12/torch_rl_squared","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/GeorgeDUT/MetaRLSAS","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/edlanglois/relearn","reach":{"status":"ok","spdx":"LGPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BBDrive/Meta-SGD-RL","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/aliengirlliv/teachable","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/clrrrr/promp_plus","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shunzh/pytorch-maml-rl","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Zhiwei-Z/prompzzw","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gomerudo/nas-dmrl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/RobvanGastel/meta-rl-algorithms","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Zhiwei-Z/SeqPromp","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dragen1860/MAML-Pytorch-RL","reach":null}],"summary":{"ran":8,"ran_draft_wrong":3,"unverified":10},"by_repo_kind":{"listed":{"samples":21,"ran":11,"repositories":2}},"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":0,"samples":[{"code_sha256_prefix":"11487404dfdc69d8","entry":"DiagGaussianActor","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"11487404dfdc69d8"}},{"code_sha256_prefix":"c18fe21a87357f31","entry":"DictList","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c18fe21a87357f31"}},{"code_sha256_prefix":"4b03e68ac41174cf","entry":"FiLM","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4b03e68ac41174cf"}},{"code_sha256_prefix":"5ffb9bf347805c8e","entry":"ImageEmbedding","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5ffb9bf347805c8e"}},{"code_sha256_prefix":"6552221c0b64c499","entry":"InstrEmbedding","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6552221c0b64c499"}},{"code_sha256_prefix":"35fc183b2b26ff4a","entry":"Logger","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"35fc183b2b26ff4a"}},{"code_sha256_prefix":"792b0690a04ce3bc","entry":"Meta_agent_actor","repo":"Octavio-Pappalardo/RL2-implementation-pytorch","repo_kind":"listed","path":"agent_and_tbpttPPO.py","file_url":"https://github.com/Octavio-Pappalardo/RL2-implementation-pytorch/blob/HEAD/agent_and_tbpttPPO.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":"792b0690a04ce3bc"}},{"code_sha256_prefix":"0379751da7748c2a","entry":"Meta_agent_critic","repo":"Octavio-Pappalardo/RL2-implementation-pytorch","repo_kind":"listed","path":"agent_and_tbpttPPO.py","file_url":"https://github.com/Octavio-Pappalardo/RL2-implementation-pytorch/blob/HEAD/agent_and_tbpttPPO.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0379751da7748c2a"}},{"code_sha256_prefix":"e01d3118f70d5b05","entry":"layer_init","repo":"Octavio-Pappalardo/RL2-implementation-pytorch","repo_kind":"listed","path":"agent_and_tbpttPPO.py","file_url":"https://github.com/Octavio-Pappalardo/RL2-implementation-pytorch/blob/HEAD/agent_and_tbpttPPO.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e01d3118f70d5b05"}},{"code_sha256_prefix":"2ab0cf0a97c81ba7","entry":"merge_dictlists","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ab0cf0a97c81ba7"}},{"code_sha256_prefix":"e26d482acf579f3e","entry":"mlp","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e26d482acf579f3e"}},{"code_sha256_prefix":"0a776339f3429848","entry":"Agent","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"0a776339f3429848"}},{"code_sha256_prefix":"62cdc662994fc6e1","entry":"ImageBOWEmbedding","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"62cdc662994fc6e1"}},{"code_sha256_prefix":"94eba517b065a1f9","entry":"KVWriter","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"94eba517b065a1f9"}},{"code_sha256_prefix":"59c573474692344b","entry":"Outer_loop_action_agent","repo":"Octavio-Pappalardo/RL2-implementation-pytorch","repo_kind":"listed","path":"agent_and_tbpttPPO.py","file_url":"https://github.com/Octavio-Pappalardo/RL2-implementation-pytorch/blob/HEAD/agent_and_tbpttPPO.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":"59c573474692344b"}},{"code_sha256_prefix":"26687176ddf9ce39","entry":"PPOAgent","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"26687176ddf9ce39"}},{"code_sha256_prefix":"75894be2cafb4f9a","entry":"SeqWriter","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"75894be2cafb4f9a"}},{"code_sha256_prefix":"a31c91d734c04428","entry":"collect_evaluation_data","repo":"Octavio-Pappalardo/RL2-implementation-pytorch","repo_kind":"listed","path":"evaluation.py","file_url":"https://github.com/Octavio-Pappalardo/RL2-implementation-pytorch/blob/HEAD/evaluation.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":"a31c91d734c04428"}},{"code_sha256_prefix":"6665938be4c3f60c","entry":"info","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"6665938be4c3f60c"}},{"code_sha256_prefix":"d39457795cdad002","entry":"log","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"d39457795cdad002"}},{"code_sha256_prefix":"6a3b5d4c89f6aec7","entry":"weight_init","repo":"aliengirlliv/teachable","repo_kind":"listed","path":"algos/ppo.py","file_url":"https://github.com/aliengirlliv/teachable/blob/HEAD/algos/ppo.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":"6a3b5d4c89f6aec7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}