{"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/treeqn-and-atreec-differentiable-tree","title":"TreeQN and ATreeC: Differentiable Tree-Structured Models for Deep Reinforcement Learning","arxiv_id":"1710.11417","date":"2017-10-31","proceeding":"ICLR 2018 1","authors":["Gregory Farquhar","Tim Rocktäschel","Maximilian Igl","Shimon Whiteson"],"abstract":"Combining deep model-free reinforcement learning with on-line planning is a\npromising approach to building on the successes of deep RL. On-line planning\nwith look-ahead trees has proven successful in environments where transition\nmodels are known a priori. However, in complex environments where transition\nmodels need to be learned from data, the deficiencies of learned models have\nlimited their utility for planning. To address these challenges, we propose\nTreeQN, a differentiable, recursive, tree-structured model that serves as a\ndrop-in replacement for any value function network in deep RL with discrete\nactions. TreeQN dynamically constructs a tree by recursively applying a\ntransition model in a learned abstract state space and then aggregating\npredicted rewards and state-values using a tree backup to estimate Q-values. We\nalso propose ATreeC, an actor-critic variant that augments TreeQN with a\nsoftmax layer to form a stochastic policy network. Both approaches are trained\nend-to-end, such that the learned model is optimised for its actual use in the\ntree. We show that TreeQN and ATreeC outperform n-step DQN and A2C on a\nbox-pushing task, as well as n-step DQN and value prediction networks (Oh et\nal. 2017) on multiple Atari games. Furthermore, we present ablation studies\nthat demonstrate the effect of different auxiliary losses on learning\ntransition models.","url_abs":"http://arxiv.org/abs/1710.11417v2","url_pdf":"http://arxiv.org/pdf/1710.11417v2.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":"treeqn-and-atreec-differentiable-tree","repo_url":"https://github.com/oxwhirl/treeqn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"atari-games","task_name":"Atari Games"},{"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":"value-prediction","task_name":"Value prediction"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[{"method_slug":"a2c","method_name":"A2C"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dqn","method_name":"DQN"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"q-learning","method_name":"Q-Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1710.11417","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1710.11417"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/oxwhirl/treeqn","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":12},"by_repo_kind":{"official":{"samples":12,"ran":0,"repositories":1}},"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":"d0898ce39824b805","entry":"build_transition_fn","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/models/transitions.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/models/transitions.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":"d0898ce39824b805"}},{"code_sha256_prefix":"3f9e5f1793b4c159","entry":"count_parameters","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/pytorch_utils.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/pytorch_utils.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":"3f9e5f1793b4c159"}},{"code_sha256_prefix":"f8881023e7c02b13","entry":"einsum","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/einsum.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/einsum.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":"f8881023e7c02b13"}},{"code_sha256_prefix":"54c99a12f39dca08","entry":"fetch_parents","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/nstep_run.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/nstep_run.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":"54c99a12f39dca08"}},{"code_sha256_prefix":"5908b0de70ae8316","entry":"linear_interpolation","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/schedule.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/schedule.py","link_basis":"harvester_set","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":"5908b0de70ae8316"}},{"code_sha256_prefix":"3c619fbfa4f66965","entry":"logsumexp","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/pytorch_utils.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/pytorch_utils.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":"3c619fbfa4f66965"}},{"code_sha256_prefix":"071e746ec3f03d74","entry":"make_output_format","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/logger.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/logger.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":"071e746ec3f03d74"}},{"code_sha256_prefix":"24a2e66a88ded2ef","entry":"make_variable","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/nstep_learn.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/nstep_learn.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":"24a2e66a88ded2ef"}},{"code_sha256_prefix":"aec7854e1d8f8fc2","entry":"ortho_init","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/pytorch_utils.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/pytorch_utils.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":"aec7854e1d8f8fc2"}},{"code_sha256_prefix":"72f7be00854ce2c7","entry":"reduce_sum","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/einsum.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/einsum.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":"72f7be00854ce2c7"}},{"code_sha256_prefix":"98926491a0b85ec4","entry":"wrap_deepmind","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/atari_wrapper.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/atari_wrapper.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":"98926491a0b85ec4"}},{"code_sha256_prefix":"4cbafb5ea418c34f","entry":"wrap_deepmind_ram","repo":"oxwhirl/treeqn","repo_kind":"official","path":"treeqn/utils/atari_wrapper.py","file_url":"https://github.com/oxwhirl/treeqn/blob/HEAD/treeqn/utils/atari_wrapper.py","link_basis":"harvester_set","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":"4cbafb5ea418c34f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}