{"id":31211489,"url":"https://github.com/cyberagentailab/learning_games_with_memory","last_synced_at":"2025-10-04T17:57:43.878Z","repository":{"id":169715583,"uuid":"641827974","full_name":"CyberAgentAILab/learning_games_with_memory","owner":"CyberAgentAILab","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-18T09:21:20.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-21T05:35:22.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CyberAgentAILab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-17T08:49:16.000Z","updated_at":"2023-05-26T09:39:18.000Z","dependencies_parsed_at":"2023-12-18T10:43:16.711Z","dependency_job_id":null,"html_url":"https://github.com/CyberAgentAILab/learning_games_with_memory","commit_stats":null,"previous_names":["cyberagentailab/learning_games_with_memory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CyberAgentAILab/learning_games_with_memory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Flearning_games_with_memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Flearning_games_with_memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Flearning_games_with_memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Flearning_games_with_memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyberAgentAILab","download_url":"https://codeload.github.com/CyberAgentAILab/learning_games_with_memory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Flearning_games_with_memory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278350986,"owners_count":25972676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-21T05:27:21.925Z","updated_at":"2025-10-04T17:57:43.832Z","avatar_url":"https://github.com/CyberAgentAILab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning in Multi-Memory Games Triggers Complex Dynamics Diverging from Nash Equilibrium\nCode for reproducing results in the paper \"[Learning in Multi-Memory Games Triggers Complex Dynamics Diverging from Nash Equilibrium](https://arxiv.org/abs/2302.01073)\". [Published in IJCAI](https://www.ijcai.org/proceedings/2023/14).\n\n## About\nRepeated games consider a situation where multiple agents are motivated by their independent rewards throughout learning. In general, the dynamics of their learning become complex. Especially when their rewards compete with each other like zero-sum games, the dynamics often do not converge to their optimum, i.e., the Nash equilibrium. To tackle such complexity, many studies have understood various learning algorithms as dynamical systems and discovered qualitative insights among the algorithms. However, such studies have yet to handle multi-memory games (where agents can memorize actions they played in the past and choose their actions based on their memories), even though memorization plays a pivotal role in artificial intelligence and interpersonal relationship. This study extends two major learning algorithms in games, i.e., replicator dynamics and gradient ascent, into multi-memory games. Then, we prove their dynamics are identical. Furthermore, theoretically and experimentally, we clarify that the learning dynamics diverge from the Nash equilibrium in multi-memory zero-sum games and reach heteroclinic cycles (sojourn longer around the boundary of the strategy space), providing a fundamental advance in learning in games.\n\n## Installation\nThis code is written in Python 3. To install the required dependencies, execute the following command:\n```bash\n$ pip install numpy\n```\n\n## How to use\n\"cont_MMGA.py\" outputs the data necessary to draw Fig. 2 and 3.\nAll of \"disc_MMGA_Xac_Ymm\", where X (resp. Y) indicates the number of actions (resp. memories), output the data necessary to draw Fig. 4.\n\n## Citation\nIf you use our code in your work, please cite our paper:\n```\n@inproceedings{fujimoto2023learning,\n  title     = {Learning in Multi-Memory Games Triggers Complex Dynamics Diverging from Nash Equilibrium},\n  author    = {Fujimoto, Yuma and Ariu, Kaito and Abe, Kenshi},\n  booktitle = {Proceedings of the Thirty-Second International Joint Conference on\n               Artificial Intelligence, {IJCAI-23}},\n  publisher = {International Joint Conferences on Artificial Intelligence Organization},\n  editor    = {Edith Elkind},\n  pages     = {118--125},\n  year      = {2023},\n  month     = {8},\n  note      = {Main Track},\n  doi       = {10.24963/ijcai.2023/14},\n  url       = {https://doi.org/10.24963/ijcai.2023/14},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberagentailab%2Flearning_games_with_memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberagentailab%2Flearning_games_with_memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberagentailab%2Flearning_games_with_memory/lists"}