{"id":23301509,"url":"https://github.com/lacop/flowsolver","last_synced_at":"2025-04-06T22:19:00.055Z","repository":{"id":6823619,"uuid":"8071773","full_name":"lacop/FlowSolver","owner":"lacop","description":"Using SAT solvers to generate solutions for Flow levels.","archived":false,"fork":false,"pushed_at":"2013-02-11T16:46:06.000Z","size":476,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T04:30:23.030Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lacop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-07T11:40:24.000Z","updated_at":"2014-04-07T20:05:47.000Z","dependencies_parsed_at":"2022-09-18T11:51:31.934Z","dependency_job_id":null,"html_url":"https://github.com/lacop/FlowSolver","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/lacop%2FFlowSolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacop%2FFlowSolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacop%2FFlowSolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacop%2FFlowSolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lacop","download_url":"https://codeload.github.com/lacop/FlowSolver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557881,"owners_count":20958065,"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":[],"created_at":"2024-12-20T10:13:41.197Z","updated_at":"2025-04-06T22:19:00.031Z","avatar_url":"https://github.com/lacop.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"FlowSolver\n==========\n\nUsing SAT solvers to generate solutions for [Flow](https://play.google.com/store/apps/details?id=com.bigduckgames.flow\u0026hl=en) levels. Can solve selected level on device automatically using [MonkeyRunner](http://developer.android.com/tools/help/monkeyrunner_concepts.html).\n\nwww.youtube.com/watch?v=NxKmFT4qsQM\n\nThe code is quite messy and slow, but it works.\n\nExample run\n===========\n\nFor a fully autonomous solving of a level on screen run\n\n    python solve_monkey.py\n\nThis will perform the following steps:\n\n- Use MonkeyRunner to take a [screenshot](https://raw.github.com/lacop/FlowSolver/master/screenshots/2013-02-10_16-18-48.png).\n- Extract the level from the screenshot.\n- Setup SAT clauses and write them to file.\n- Run a SAT solver on the file to generate a solution.\n- Display the [solution](https://raw.github.com/lacop/FlowSolver/master/screenshots/2013-02-10_16-18-48.sol.png).\n- Finally, use MonkeyRunner to send a [series of drag events](https://raw.github.com/lacop/FlowSolver/master/screenshots/2013-02-10_16-18-48.sol_path.txt) to execute the solution on the device.\n\n![solution](https://raw.github.com/lacop/FlowSolver/master/screenshots/2013-02-10_16-18-48.sol.png)\n\nOld examples\n============\n\nThese are old examples using [MiniSAT](http://minisat.se/). By using [glucose](http://www.lri.fr/~simon/?page=glucose) you can achieve much better speeds.\n\n![level_8_150](https://raw.github.com/lacop/FlowSolver/master/levels/flow_free_8_8_150.sol.png)\n\n**Level 8x8, #150** 2,688 variables, 58,603 clauses, solved instantaneously\n\n![level_14_1](https://raw.github.com/lacop/FlowSolver/master/levels/flow_free_14_14_1.sol.png)\n\n**Level 14x14, #1** 20,580 variables, 1,095,960 clauses, approx. 3 minutes to solve\n\n![level_14_30](https://raw.github.com/lacop/FlowSolver/master/levels/flow_free_14_14_30.sol_dist.png)\n\n**Level 14x14, #30,** _with cycle breaking_ 59,388 variables, 12,256,516 clauses, approx. 4 minutes to solve\n\n![level_14_30](https://raw.github.com/lacop/FlowSolver/master/levels/flow_free_14_14_30.sol_nodist.png)\n\n**Level 14x14, #30,** _without cycle breaking_ 20,580 variables, 1,096,306 clauses, approx. 1 minutes to solve\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacop%2Fflowsolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flacop%2Fflowsolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacop%2Fflowsolver/lists"}