{"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/codesim-multi-agent-code-generation-and-1","title":"CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debugging","arxiv_id":"2502.05664","date":"2025-02-08","proceeding":null,"authors":["Md. Ashraful Islam","Mohammed Eunus Ali","Md Rizwan Parvez"],"abstract":"Large Language Models (LLMs) have made significant strides in code generation and problem solving. Current approaches employ external tool-based iterative debuggers that use compiler or other tool-based runtime feedback to refine coarse programs generated by various methods. However, the effectiveness of these approaches heavily relies on the quality of the initial code generation, which remains an open challenge. In this paper, we introduce CodeSim, a novel multi-agent code generation framework that comprehensively addresses the stages of program synthesis-planning, coding, and debugging-through a human-like perception approach. As human verifies their understanding of any algorithms through visual simulation, CodeSim uniquely features a method of plan verification and internal debugging through the step-by-step simulation of input/output. Extensive experiments across seven challenging competitive problem-solving and program synthesis benchmarks demonstrate CodeSim's remarkable code generation capabilities. Our framework achieves new state-of-the-art (pass@1) results-(HumanEval 95.1%, MBPP 90.7%, APPS 22%, and CodeContests 29.1%). Furthermore, our method shows potential for even greater enhancement when cascaded with external debuggers. To facilitate further research and development in this area, we have open-sourced our framework in this link (https://kagnlp.github.io/codesim.github.io/).","url_abs":"https://arxiv.org/abs/2502.05664v1","url_pdf":"https://arxiv.org/pdf/2502.05664v1.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":"codesim-multi-agent-code-generation-and-1","repo_url":"https://github.com/kagnlp/CodeGenerator","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"},{"task_slug":"humaneval","task_name":"HumanEval"},{"task_slug":"program-synthesis","task_name":"Program Synthesis"},{"task_slug":null,"task_name":"mbpp"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/code-generation-on-apps","task":"Code Generation","dataset":"APPS","model":"CodeSim (GPT4)","rank_in_archive_order":9,"of":18,"metrics":{"Competition Pass@1":"0.81","Interview Pass@1":"4.21","Introductory Pass@1":"26.04"},"uses_additional_data":false},{"leaderboard":"/sota/code-generation-on-codecontests","task":"Code Generation","dataset":"CodeContests","model":"CodeSim (GPT4)","rank_in_archive_order":4,"of":8,"metrics":{"Test Set pass@1":"28.4"},"uses_additional_data":false},{"leaderboard":"/sota/code-generation-on-mbpp","task":"Code Generation","dataset":"MBPP","model":"CodeSim (GPT4o)","rank_in_archive_order":6,"of":99,"metrics":{"Accuracy":"90.7"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2502.05664","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.05664"}},"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/kagnlp/CodeGenerator","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":3},"by_repo_kind":{"listed":{"samples":3,"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":"8bdaae88d701bd7a","entry":"get_test_cases","repo":"kagnlp/CodeGenerator","repo_kind":"listed","path":"src/datasets/convert-apps-xcode.py","file_url":"https://github.com/kagnlp/CodeGenerator/blob/HEAD/src/datasets/convert-apps-xcode.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":"8bdaae88d701bd7a"}},{"code_sha256_prefix":"044aa6e662a61ff3","entry":"get_test_cases","repo":"kagnlp/CodeGenerator","repo_kind":"listed","path":"src/datasets/convert-cc-xcode.py","file_url":"https://github.com/kagnlp/CodeGenerator/blob/HEAD/src/datasets/convert-cc-xcode.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":"044aa6e662a61ff3"}},{"code_sha256_prefix":"94c65e47ba360f89","entry":"read_jsonl","repo":"kagnlp/CodeGenerator","repo_kind":"listed","path":"src/datasets/convert-apps-xcode.py","file_url":"https://github.com/kagnlp/CodeGenerator/blob/HEAD/src/datasets/convert-apps-xcode.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":"94c65e47ba360f89"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}