{"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/eureka-human-level-reward-design-via-coding","title":"Eureka: Human-Level Reward Design via Coding Large Language Models","arxiv_id":"2310.12931","date":"2023-10-19","proceeding":null,"authors":["Yecheng Jason Ma","William Liang","Guanzhi Wang","De-An Huang","Osbert Bastani","Dinesh Jayaraman","Yuke Zhu","Linxi Fan","Anima Anandkumar"],"abstract":"Large Language Models (LLMs) have excelled as high-level semantic planners for sequential decision-making tasks. However, harnessing them to learn complex low-level manipulation tasks, such as dexterous pen spinning, remains an open problem. We bridge this fundamental gap and present Eureka, a human-level reward design algorithm powered by LLMs. Eureka exploits the remarkable zero-shot generation, code-writing, and in-context improvement capabilities of state-of-the-art LLMs, such as GPT-4, to perform evolutionary optimization over reward code. The resulting rewards can then be used to acquire complex skills via reinforcement learning. Without any task-specific prompting or pre-defined reward templates, Eureka generates reward functions that outperform expert human-engineered rewards. In a diverse suite of 29 open-source RL environments that include 10 distinct robot morphologies, Eureka outperforms human experts on 83% of the tasks, leading to an average normalized improvement of 52%. The generality of Eureka also enables a new gradient-free in-context learning approach to reinforcement learning from human feedback (RLHF), readily incorporating human inputs to improve the quality and the safety of the generated rewards without model updating. Finally, using Eureka rewards in a curriculum learning setting, we demonstrate for the first time, a simulated Shadow Hand capable of performing pen spinning tricks, adeptly manipulating a pen in circles at rapid speed.","url_abs":"https://arxiv.org/abs/2310.12931v2","url_pdf":"https://arxiv.org/pdf/2310.12931v2.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":"eureka-human-level-reward-design-via-coding","repo_url":"https://github.com/eureka-research/Eureka","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"in-context-learning","task_name":"In-Context Learning"},{"task_slug":"sequential-decision-making","task_name":"Sequential Decision Making"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2310.12931","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.12931"}},"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/eureka-research/Eureka","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran":8,"ran_violates":1,"unverified":1},"by_repo_kind":{"official":{"samples":9,"ran":8,"repositories":1},"community":{"samples":3,"ran":3,"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":"f7bb7fab758e88c6","entry":"extract_answer_with_tags","repo":"ModalMinds/MM-EUREKA","repo_kind":"community","path":"examples/scripts/reward_func_qwen_instruct.py","file_url":"https://github.com/ModalMinds/MM-EUREKA/blob/HEAD/examples/scripts/reward_func_qwen_instruct.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f7bb7fab758e88c6"}},{"code_sha256_prefix":"b2430468f620777e","entry":"extract_class_info","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/utils/prune_env.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/utils/prune_env.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":"b2430468f620777e"}},{"code_sha256_prefix":"ace4148116adb7ef","entry":"extract_observation_code","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/utils/extract_task_code.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/utils/extract_task_code.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":"ace4148116adb7ef"}},{"code_sha256_prefix":"7edd71cf38a4ac85","entry":"extract_task_code","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/utils/extract_task_code.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/utils/extract_task_code.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":"7edd71cf38a4ac85"}},{"code_sha256_prefix":"ab6795497be8743a","entry":"file_to_string","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/utils/extract_task_code.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/utils/extract_task_code.py","link_basis":"harvester_set","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":"ab6795497be8743a"}},{"code_sha256_prefix":"16b43ab11204e083","entry":"filter_traceback","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/utils/misc.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/utils/misc.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"16b43ab11204e083"}},{"code_sha256_prefix":"7e3ca15f72ec5048","entry":"find_files_with_substring","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/utils/file_utils.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/utils/file_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e3ca15f72ec5048"}},{"code_sha256_prefix":"4dbb9ce8ca054e5a","entry":"get_query_from_query","repo":"ModalMinds/MM-EUREKA","repo_kind":"community","path":"examples/scripts/reward_func_qwen_instruct.py","file_url":"https://github.com/ModalMinds/MM-EUREKA/blob/HEAD/examples/scripts/reward_func_qwen_instruct.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4dbb9ce8ca054e5a"}},{"code_sha256_prefix":"621fb76355aa5e4b","entry":"get_response_from_query","repo":"ModalMinds/MM-EUREKA","repo_kind":"community","path":"examples/scripts/reward_func_qwen_instruct.py","file_url":"https://github.com/ModalMinds/MM-EUREKA/blob/HEAD/examples/scripts/reward_func_qwen_instruct.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"621fb76355aa5e4b"}},{"code_sha256_prefix":"f409fbe9be3b6b98","entry":"import_class_from_file","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/utils/file_utils.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/utils/file_utils.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":"f409fbe9be3b6b98"}},{"code_sha256_prefix":"dbeca344f569e3c3","entry":"load_tensorboard_logs","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/utils/file_utils.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/utils/file_utils.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":"dbeca344f569e3c3"}},{"code_sha256_prefix":"a03f028b2da7c641","entry":"depth_image_to_point_cloud_GPU","repo":"eureka-research/Eureka","repo_kind":"official","path":"eureka/envs/bidex/shadow_hand_block_stack.py","file_url":"https://github.com/eureka-research/Eureka/blob/HEAD/eureka/envs/bidex/shadow_hand_block_stack.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":"a03f028b2da7c641"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}