{"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/improving-cooperation-in-language-games-with","title":"Improving Cooperation in Language Games with Bayesian Inference and the Cognitive Hierarchy","arxiv_id":"2412.12409","date":"2024-12-16","proceeding":null,"authors":["Joseph Bills","Christopher Archibald","Diego Blaylock"],"abstract":"In two-player cooperative games, agents can play together effectively when they have accurate assumptions about how their teammate will behave, but may perform poorly when these assumptions are inaccurate. In language games, failure may be due to disagreement in the understanding of either the semantics or pragmatics of an utterance. We model coarse uncertainty in semantics using a prior distribution of language models and uncertainty in pragmatics using the cognitive hierarchy, combining the two aspects into a single prior distribution over possible partner types. Fine-grained uncertainty in semantics is modeled using noise that is added to the embeddings of words in the language. To handle all forms of uncertainty we construct agents that learn the behavior of their partner using Bayesian inference and use this information to maximize the expected value of a heuristic function. We test this approach by constructing Bayesian agents for the game of Codenames, and show that they perform better in experiments where semantics is uncertain","url_abs":"https://arxiv.org/abs/2412.12409v1","url_pdf":"https://arxiv.org/pdf/2412.12409v1.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":"improving-cooperation-in-language-games-with","repo_url":"https://github.com/ganondox/bayesian-codenames","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"bayesian-inference","task_name":"Bayesian Inference"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2412.12409","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.12409"}},"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/ganondox/bayesian-codenames","reach":{"status":"ok"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"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":7,"samples":[{"code_sha256_prefix":"2c17dbc8bcaf0a84","entry":"desc","repo":"ganondox/bayesian-codenames","repo_kind":"official","path":"play_games/games/run_bayesian_tournament.py","file_url":"https://github.com/ganondox/bayesian-codenames/blob/HEAD/play_games/games/run_bayesian_tournament.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2c17dbc8bcaf0a84"}},{"code_sha256_prefix":"4a0c548d2515833b","entry":"generate","repo":"ganondox/bayesian-codenames","repo_kind":"official","path":"data_objects/associations_creator.py","file_url":"https://github.com/ganondox/bayesian-codenames/blob/HEAD/data_objects/associations_creator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a0c548d2515833b"}},{"code_sha256_prefix":"5e2ff549c8e3b4e4","entry":"load_lm","repo":"ganondox/bayesian-codenames","repo_kind":"official","path":"data_objects/associations_creator.py","file_url":"https://github.com/ganondox/bayesian-codenames/blob/HEAD/data_objects/associations_creator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5e2ff549c8e3b4e4"}},{"code_sha256_prefix":"689fcb796cdd6298","entry":"load_words","repo":"ganondox/bayesian-codenames","repo_kind":"official","path":"data_objects/associations_creator.py","file_url":"https://github.com/ganondox/bayesian-codenames/blob/HEAD/data_objects/associations_creator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"689fcb796cdd6298"}},{"code_sha256_prefix":"5b9f8ffe301c46cc","entry":"read_boolean","repo":"ganondox/bayesian-codenames","repo_kind":"official","path":"play_games/configs/experiment_settings.py","file_url":"https://github.com/ganondox/bayesian-codenames/blob/HEAD/play_games/configs/experiment_settings.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b9f8ffe301c46cc"}},{"code_sha256_prefix":"0a8bd52b32608eb8","entry":"read_float","repo":"ganondox/bayesian-codenames","repo_kind":"official","path":"play_games/configs/experiment_settings.py","file_url":"https://github.com/ganondox/bayesian-codenames/blob/HEAD/play_games/configs/experiment_settings.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0a8bd52b32608eb8"}},{"code_sha256_prefix":"feda9d9447cf303f","entry":"read_int","repo":"ganondox/bayesian-codenames","repo_kind":"official","path":"play_games/configs/experiment_settings.py","file_url":"https://github.com/ganondox/bayesian-codenames/blob/HEAD/play_games/configs/experiment_settings.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"feda9d9447cf303f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}