{"id":31211482,"url":"https://github.com/cyberagentailab/mcts-capacity-expansion","last_synced_at":"2025-09-21T05:27:18.274Z","repository":{"id":109618272,"uuid":"485294188","full_name":"CyberAgentAILab/mcts-capacity-expansion","owner":"CyberAgentAILab","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-22T07:52:43.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-10T07:42:53.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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":"2022-04-25T08:56:08.000Z","updated_at":"2023-09-25T16:30:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"d96d53ef-b578-402f-bf78-b31425c9e669","html_url":"https://github.com/CyberAgentAILab/mcts-capacity-expansion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CyberAgentAILab/mcts-capacity-expansion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fmcts-capacity-expansion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fmcts-capacity-expansion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fmcts-capacity-expansion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fmcts-capacity-expansion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyberAgentAILab","download_url":"https://codeload.github.com/CyberAgentAILab/mcts-capacity-expansion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fmcts-capacity-expansion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276195622,"owners_count":25601151,"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-09-21T02:00:07.055Z","response_time":72,"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:14.805Z","updated_at":"2025-09-21T05:27:18.267Z","avatar_url":"https://github.com/CyberAgentAILab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anytime Capacity Expansion in Medical Residency Match by Monte Carlo Tree Search\nCode for reproducing results in the paper \"[Anytime Capacity Expansion in Medical Residency Match by Monte Carlo Tree Search](https://arxiv.org/abs/2202.06570)\".\nNote that Gurobi license is required to solve linear programming problems and mixed integer programming problems.\n\n## About\nThis paper considers the capacity expansion problem in two-sided matchings, where the policymaker is allowed to allocate some extra seats as well as the standard seats.\nIn medical residency match, each hospital accepts a limited number of doctors.\nSuch capacity constraints are typically given in advance.\nHowever, such exogenous constraints can compromise the welfare of the doctors; some popular hospitals inevitably dismiss some of their favorite doctors.\nMeanwhile, it is often the case that the hospitals are also benefited to accept a few extra doctors.\nTo tackle the problem, we propose an anytime method that the upper confidence tree searches the space of capacity expansions, each of which has a resident-optimal stable assignment that the deferred acceptance method finds.\nConstructing a good search tree representation significantly boosts the performance of the proposed method.\nOur simulation shows that the proposed method identifies an almost optimal capacity expansion with a significantly smaller computational budget than exact methods based on mixed-integer programming.\n\n## Installation\nThis code is written in Python 3.\nTo install the required dependencies, execute the following command:\n```bash\n$ pip install -r requirements.txt\n```\n\n### For Docker User\nBuild the container:\n```bash\n$ docker build -t mcts-capacity-expansion .\n```\nAfter build finished, run the container:\n```bash\n$ docker run -it mcts-capacity-expansion\n```\n\n## Run Experiments\nIn order to compare the proposed algorithm to the existing algorithms via synthetic data experiments (w/o hospital-wise limits), execute the following command:\n```bash\n$ python run_synthetic_experiment_wo_college_wise_budgets.py --num_students=1000 --num_colleges=15 --budget=30 --correlation=0.4 --num_trials=10\n```\nIn this experiment, the following options can be specified:\n* `--num_students`: Number of residents.\n* `--num_colleges`: Number of hospitals.\n* `--budget`: Number of expansion slots.\n* `--correlation`: Correlation level of student preferences. The default value is `0.0`.\n* `--num_trial`: Number of trials to run experiments. The default value is `10`.\n\nTo evaluate the algorithms via synthetic data experiments with hospital-wise limits, execute the following command:\n```bash\n$ python run_synthetic_experiment_with_college_wise_budgets.py --num_students=1000 --num_colleges=15 --budget=30 --correlation=0.4 --num_trials=10\n``` \n\nTo evaluate the algorithms via real-data experiments, execute the following command:\n```bash\n$ python run_real_data_experiment.py --budget=30 --num_trials=10\n``` \n\n## Citation\nIf you use our code in your work, please cite our paper:\n```\n@inproceedings{abe2022mctsce,\n  title     = {Anytime Capacity Expansion in Medical Residency Match by Monte Carlo Tree Search},\n  author    = {Abe, Kenshi and Komiyama, Junpei and Iwasaki, Atsushi},\n  booktitle = {Proceedings of the Thirty-First International Joint Conference on\n               Artificial Intelligence, {IJCAI-22}},\n  pages     = {3--9},\n  year      = {2022}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberagentailab%2Fmcts-capacity-expansion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberagentailab%2Fmcts-capacity-expansion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberagentailab%2Fmcts-capacity-expansion/lists"}