{"id":20106140,"url":"https://github.com/xuzijian629/combopt-zero","last_synced_at":"2025-08-31T20:34:46.615Z","repository":{"id":40962514,"uuid":"260872232","full_name":"xuzijian629/combopt-zero","owner":"xuzijian629","description":"A reinforcement learning based solver for combinatorial problems","archived":false,"fork":false,"pushed_at":"2022-06-22T01:54:25.000Z","size":1623,"stargazers_count":44,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-17T13:43:43.697Z","etag":null,"topics":["alphago-zero","feedback-vertex-set","graph-neural-networks","independent-sets","maxcut","maximum-clique","reinforcement-learning","vertex-cover"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1905.11623","language":"C++","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/xuzijian629.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-03T09:47:07.000Z","updated_at":"2025-06-17T18:04:34.000Z","dependencies_parsed_at":"2022-09-01T03:20:42.050Z","dependency_job_id":null,"html_url":"https://github.com/xuzijian629/combopt-zero","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xuzijian629/combopt-zero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuzijian629%2Fcombopt-zero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuzijian629%2Fcombopt-zero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuzijian629%2Fcombopt-zero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuzijian629%2Fcombopt-zero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuzijian629","download_url":"https://codeload.github.com/xuzijian629/combopt-zero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuzijian629%2Fcombopt-zero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273035479,"owners_count":25034588,"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-08-31T02:00:09.071Z","response_time":79,"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":["alphago-zero","feedback-vertex-set","graph-neural-networks","independent-sets","maxcut","maximum-clique","reinforcement-learning","vertex-cover"],"created_at":"2024-11-13T17:49:11.556Z","updated_at":"2025-08-31T20:34:46.598Z","avatar_url":"https://github.com/xuzijian629.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CombOpt Zero\nCombOpt Zero is a general-purpose solver based on AlphaGo Zero for combinatorial problems on graphs.\nPaper: [Solving NP-Hard Problems on Graphs with Extended AlphaGo Zero](https://arxiv.org/abs/1905.11623)\n\nYou can try *MinimumVertexCover*, *MaximumIndependentSet*, *FeedbackVertexSet*, *MaxCut* and *MaximumClique*, by running the code in this repository.\n\n## Try on Docker\nInstall [Docker](https://docs.docker.com/get-docker/) and just run `docker/install.sh`, `docker/train.sh` and `docker/eval.sh`!\n\n#### Note\n- By default, it solves *MaximumClique*\n- Change `docker/config.sh` and `{problem}/config.sh` for other settings\n- Hyperparameters are modified so that the training and evaluation can be executed quickly on laptops without GPUs\n- But still, **it will obtain pretty good solutions for real-world graphs of thousands of nodes even if trained for only a few minutes** (Try and check it by yourself!)\n- `docker/train.sh` may yield some errors, possibly due to the file system of Docker. Please refer to [FAQs](https://github.com/xuzijian629/combopt-zero/wiki/FAQs).\n\n## Build and Run\nIf you just want to try on docker, please ignore this section.\n\n1. Download LibTorch from https://pytorch.org/  \nDownload version `1.3.0`. Newer version may cause errors. If you use Linux, download `Pre-cxx11 ABI` version.\n\n2. Build library  \nPlease also refer to `docker/install.sh` if you have some problem.\n```bash\n$ cd max-clique/lib\n$ mkdir build\n$ cd build\n$ cmake -DCMAKE_PREFIX_PATH=/path/to/libtorch ..\n$ make\n```\n\n3. Generate scripts  \nFirst, modify hyperparameters and other parameters in `{problem}/config.sh`.\nThen,\n```bash\n$ cd max-clique\n# create two scripts for training and evalution, named t_sample.sh and e_sample.sh, based on config.sh\n$ echo sample | python script_generator.py\n```\n\n4. Start training  \nYou can terminate the training anytime. If you want to restart the training, just run the same command again.\nModel files and temporary files are stored in `{problem}/results/{configuration}/`.\n```bash\n$ cd max-clique\n$ ./t_sample.sh\n```\n\n5. Start evaluation  \n```bash\n$ cd max-clique\n$ ./e_sample.sh\n```\n\n\n## Dataset\nAll the test graphs used in our experiments are in `test_graphs/`. Some of them are collected from [Dimacs Vertex Cover instances](https://turing.cs.hbg.psu.edu/txn131/vertex_cover.html) and http://networkrepository.com/.\n\n## Links\n- Prototype for *MaximumIndependentSet* in Python: https://github.com/knshnb/MIS_solver\n\n## Cite\nPlease cite [our paper](https://arxiv.org/abs/1905.11623) if you use our code in your work:\n\n```\n@article{Xu/Abe/2020,\n    title={Solving NP-Hard Problems on Graphs with Extended AlphaGo Zero},\n    author={Zijian Xu and Kenshin Abe and Issei Sato and Masashi Sugiyama},\n    journal={arXiv preprint arXiv:1905.11623},\n    year={2020}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuzijian629%2Fcombopt-zero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuzijian629%2Fcombopt-zero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuzijian629%2Fcombopt-zero/lists"}