{"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/gensim-generating-robotic-simulation-tasks","title":"GenSim: Generating Robotic Simulation Tasks via Large Language Models","arxiv_id":"2310.01361","date":"2023-10-02","proceeding":null,"authors":["Lirui Wang","Yiyang Ling","Zhecheng Yuan","Mohit Shridhar","Chen Bao","Yuzhe Qin","Bailin Wang","Huazhe Xu","Xiaolong Wang"],"abstract":"Collecting large amounts of real-world interaction data to train general robotic policies is often prohibitively expensive, thus motivating the use of simulation data. However, existing methods for data generation have generally focused on scene-level diversity (e.g., object instances and poses) rather than task-level diversity, due to the human effort required to come up with and verify novel tasks. This has made it challenging for policies trained on simulation data to demonstrate significant task-level generalization. In this paper, we propose to automatically generate rich simulation environments and expert demonstrations by exploiting a large language models' (LLM) grounding and coding ability. Our approach, dubbed GenSim, has two modes: goal-directed generation, wherein a target task is given to the LLM and the LLM proposes a task curriculum to solve the target task, and exploratory generation, wherein the LLM bootstraps from previous tasks and iteratively proposes novel tasks that would be helpful in solving more complex tasks. We use GPT4 to expand the existing benchmark by ten times to over 100 tasks, on which we conduct supervised finetuning and evaluate several LLMs including finetuned GPTs and Code Llama on code generation for robotic simulation tasks. Furthermore, we observe that LLMs-generated simulation programs can enhance task-level generalization significantly when used for multitask policy training. We further find that with minimal sim-to-real adaptation, the multitask policies pretrained on GPT4-generated simulation tasks exhibit stronger transfer to unseen long-horizon tasks in the real world and outperform baselines by 25%. See the project website (https://liruiw.github.io/gensim) for code, demos, and videos.","url_abs":"https://arxiv.org/abs/2310.01361v2","url_pdf":"https://arxiv.org/pdf/2310.01361v2.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":"gensim-generating-robotic-simulation-tasks","repo_url":"https://github.com/liruiw/gensim","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"},{"task_slug":"diversity","task_name":"Diversity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.01361","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.01361"}},"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/liruiw/gensim","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"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":"86d375757e288971","entry":"add_to_txt","repo":"liruiw/gensim","repo_kind":"official","path":"gensim/utils.py","file_url":"https://github.com/liruiw/gensim/blob/HEAD/gensim/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":"86d375757e288971"}},{"code_sha256_prefix":"5f7af117975e9a6e","entry":"extract_code","repo":"liruiw/gensim","repo_kind":"official","path":"gensim/utils.py","file_url":"https://github.com/liruiw/gensim/blob/HEAD/gensim/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":"5f7af117975e9a6e"}},{"code_sha256_prefix":"91d4a2eeb76fb059","entry":"format_completion","repo":"liruiw/gensim","repo_kind":"official","path":"gensim/prepare_finetune_codellamma.py","file_url":"https://github.com/liruiw/gensim/blob/HEAD/gensim/prepare_finetune_codellamma.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":"91d4a2eeb76fb059"}},{"code_sha256_prefix":"63e6bd03e68e40d3","entry":"format_completion","repo":"liruiw/gensim","repo_kind":"official","path":"gensim/prepare_finetune_gpt_new.py","file_url":"https://github.com/liruiw/gensim/blob/HEAD/gensim/prepare_finetune_gpt_new.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":"63e6bd03e68e40d3"}},{"code_sha256_prefix":"77904b7e7f7952b8","entry":"format_completion_codeonly","repo":"liruiw/gensim","repo_kind":"official","path":"gensim/prepare_finetune_gpt_new.py","file_url":"https://github.com/liruiw/gensim/blob/HEAD/gensim/prepare_finetune_gpt_new.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":"77904b7e7f7952b8"}},{"code_sha256_prefix":"d26c8a24ea3d45da","entry":"extract_code_topdown","repo":"liruiw/gensim","repo_kind":"official","path":"gensim/utils.py","file_url":"https://github.com/liruiw/gensim/blob/HEAD/gensim/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":"d26c8a24ea3d45da"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}