{"id":19532359,"url":"https://github.com/ankur-deka/emergent-multiagent-strategies","last_synced_at":"2025-09-23T04:00:10.666Z","repository":{"id":37642067,"uuid":"277205652","full_name":"Ankur-Deka/Emergent-Multiagent-Strategies","owner":"Ankur-Deka","description":"Emergence of complex strategies through multiagent competition","archived":false,"fork":false,"pushed_at":"2022-12-08T06:21:31.000Z","size":32106,"stargazers_count":37,"open_issues_count":4,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-01-28T21:40:53.659Z","etag":null,"topics":["competitive","marl","multiagent-reinforcement-learning","multiagent-systems","robotics"],"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/Ankur-Deka.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}},"created_at":"2020-07-05T00:27:14.000Z","updated_at":"2023-12-05T07:38:46.000Z","dependencies_parsed_at":"2023-01-24T18:45:09.988Z","dependency_job_id":null,"html_url":"https://github.com/Ankur-Deka/Emergent-Multiagent-Strategies","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankur-Deka%2FEmergent-Multiagent-Strategies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankur-Deka%2FEmergent-Multiagent-Strategies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankur-Deka%2FEmergent-Multiagent-Strategies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankur-Deka%2FEmergent-Multiagent-Strategies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ankur-Deka","download_url":"https://codeload.github.com/Ankur-Deka/Emergent-Multiagent-Strategies/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224036376,"owners_count":17245035,"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","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":["competitive","marl","multiagent-reinforcement-learning","multiagent-systems","robotics"],"created_at":"2024-11-11T01:50:33.256Z","updated_at":"2025-09-23T04:00:05.538Z","avatar_url":"https://github.com/Ankur-Deka.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emergent Multiagent Strategies\n\n[Ankur Deka](https://www.linkedin.com/in/ankur-deka-120392135) and [Katia Sycara](http://www.cs.cmu.edu/~sycara/)\n\nRobotics Institute, Carnegie Mellon University\n\nThis is the official repository of the paper [Natural Emergence of Heterogeneous Strategies in Artificially Intelligent Competitive Teams](https://arxiv.org/abs/2007.03102), presented in a [spotlight talk](https://youtu.be/ltHgKYc0F-E) in Robotics Science and Systems (RSS) 2020 workshop on Heterogeneous Multi-Robot Task Allocation and Coordination. Increasingly complex multiagent strategies can emerge naturally through competition in a mixed cooperative-competitive environment.\n\n\u003cp float=\"center\"\u003e\n\t\u003cimg src=\"out_files/1.gif\" width=\"250\" height=\"250\"/\u003e\n\t\u003cimg src=\"out_files/3.gif\" width=\"250\" height=\"250\"/\u003e\n\t\u003cimg src=\"out_files/2.gif\" width=\"250\" height=\"250\"/\u003e\n\u003c/p\u003e\n\u003cimg src=\"out_files/Evolution_of_starategies.png\" width=\"750\"/\u003e\n\n## Installation\nI have tested the code on Ubuntu 16.04 and 18.04. See `requirements.txt` file for the list of dependencies. Create an anaconda environment or virtualenv with python 3.6 and setup everything by executing `pip install -r requirements.txt`. \n```\nconda create -n fortattack python=3.6 pip\nconda activate fortattack\npip install -r requirements.txt\n```\n\n## Training\n\n### Joint Training\n`python train_fortattack.py --save-dir tmp_3`\u003cbr /\u003e\nSee `arguments.py` file for the list of various command line arguments one can set while running the scripts. \n\n\n### Ensemble Training of Guards\n`python train_fortattack_v2.py --train-guards-only --pretrained-guard --guard-load-dir tmp_1 --guard-ckpt 2520 --attacker-load-dir tmp_1 --attacker-ckpts 220 650 1240 1600 2520 --save-dir tmp_4 --render`\n\n\n## Testing\n\n### Joint training results\n`python test_fortattack.py --test --load-dir tmp_1 --ckpt 220`\n\n### Ensemble training results\n`python test_fortattack_v2.py --test --train-guards-only --num-eval-episodes 10 --load-dir tmp_2 --ckpt 5050 --attacker-load-dir tmp_1 --attacker-ckpts 220 --render`\n\n### Trained models\nI have provided some pretrained models in `marlsave` directory\n1.  `tmp_1`: normal training results. Multiagent strategies corresponding the checkpoints are as follows. Please refer to the paper for details of these strategies.\n\t1. `ep220`: Flash laser strategy of guards\n\t1. `ep650`: Sneaking strategy of attackers\n\t1. `ep1240`: Spreading and flashing strategy of attackers\n\t1. `ep1600`: Sneaking strategy of attackers\n\t1. `ep2520`: Smartly spreading strategy of guards\n\n1.  `tmp_2/ep5050.pt`: Guards' policy after ensemble training\n\n\n## Citing\nIf you use our code in your research, please cite our paper: \u003cbr/\u003e\n`@article{deka2020natural,\n  title={Natural Emergence of Heterogeneous Strategies in Artificially Intelligent Competitive Teams},\n  author={Deka, Ankur and Sycara, Katia},\n  journal={arXiv preprint arXiv:2007.03102},\n  year={2020}\n}\n`\n\n## Contact\nFor any queries, feel free to raise an issue or contact me at adeka@cs.cmu.edu or ankurnet1996@gmail.com.\n\n## Acknowledgment\nThe environment is built up on [MAPE](https://github.com/openai/multiagent-particle-envs)\n\nThe algorithm for this repo is built up on [marl_transfer](https://github.com/sumitsk/marl_transfer)\n\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankur-deka%2Femergent-multiagent-strategies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankur-deka%2Femergent-multiagent-strategies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankur-deka%2Femergent-multiagent-strategies/lists"}