{"id":17103160,"url":"https://github.com/pravj/puzzl","last_synced_at":"2025-06-23T10:32:53.629Z","repository":{"id":28977084,"uuid":"32503532","full_name":"pravj/puzzl","owner":"pravj","description":":game_die: An intelligent version of the sliding-puzzle game for your terminal built in golang","archived":false,"fork":false,"pushed_at":"2017-05-19T15:24:14.000Z","size":148,"stargazers_count":37,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T08:51:20.008Z","etag":null,"topics":["concurrent-programming","game","go","pathfinding-algorithm","sliding-puzzle-game"],"latest_commit_sha":null,"homepage":"","language":"Go","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/pravj.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":"2015-03-19T05:52:37.000Z","updated_at":"2022-06-08T10:27:12.000Z","dependencies_parsed_at":"2022-09-26T18:51:23.223Z","dependency_job_id":null,"html_url":"https://github.com/pravj/puzzl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pravj/puzzl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pravj%2Fpuzzl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pravj%2Fpuzzl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pravj%2Fpuzzl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pravj%2Fpuzzl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pravj","download_url":"https://codeload.github.com/pravj/puzzl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pravj%2Fpuzzl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261461972,"owners_count":23161862,"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":["concurrent-programming","game","go","pathfinding-algorithm","sliding-puzzle-game"],"created_at":"2024-10-14T15:32:10.669Z","updated_at":"2025-06-23T10:32:48.612Z","avatar_url":"https://github.com/pravj.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"puzzl\n=====\n\n\u003e An intelligent version of the sliding-puzzle game for your terminal built in golang\n\n[![GoDoc](https://godoc.org/github.com/pravj/puzzl?status.svg)](http://godoc.org/github.com/pravj/puzzl)\n\npuzzl is an intelligent implementation of the classical sliding-puzzle game.\n\nIt's built on top of Golang's *concurrency primitives*. It uses *goroutines* and *channels* for inter process communications to provide real time notification experience in unix terminals.\n\npuzzl comes with an in-built solver which can solve any puzzle configuration faster than Iron Man. :zap:\n\n![puzzl](https://github.com/pravj/puzzl/blob/development/puzzl.gif?raw=true)\n\nI have also written a paper\\* describing technical details about the game, have a look, in case you want to.\n\n\u003e Implementing an intelligent version of the classical sliding-puzzle game for unix terminals using Golang's concurrency primitives\n\u003e\n\u003e http://arxiv.org/abs/1503.08345\n\n#### Installation\n```go\ngo get github.com/pravj/puzzl\n```\n* Make sure that the workspace's **bin** directory is added to your **PATH**\n```go\nexport PATH=$PATH:$GOPATH/bin\n```\n\n#### Controls\n* Start the game with the command *puzzl*.\n* Use Arrow Keys to move the blank tile wherever you want.\n* Press 'h' or 'H' to get any hint for next move.\n* Press ESC key to quit the game.\n\n#### Features\n* puzzl comes with an [in-built solver](#in-built-solver) that powers the automation for the game.\n* puzzl gives you some hope by showing the optimal possible moves to solve any board configuration.\n* puzzl helps you survive the game by giving [hints](#hints-policy) for next move.\n* puzzl tracks all the user moves and accordingly generates [score](#scoring-policy) for the game.\n* puzzl shows [notifications](#notification-mechanism) according to the real time game status.\n* puzzl notifies that whether your last move was right or wrong.\n\n#### In-built Solver\n* puzzl uses A-star algorithm to solve the game board.\n* puzzl's solver is enough fuel-efficient that it can solve the hardest 3x3 puzzle in 31 moves. Exactly what the [ideal solvability condition](http://en.wikipedia.org/wiki/15_puzzle#Solvability) asks for.\n\n#### Hints Policy\n* You will get a maximum of 3 hints per game session. No more cheatings. :oncoming_police_car:\n\n#### Scoring Policy\n* puzzl has its own scoring system. It measures the real time game score using two parameters, one is *total played game moves (T-score)* and another is *accumulated correct score (A-score)* from all the moves.\n* Whenever a user moves in a correct direction as the solver would have moved, the *A-score* increases by 1 and decreases by 1 when the user moves in a wrong direction.\n* The score of game at any point of time is calculated by this function. [ score = A-score / T-score ]\n* This way the maximum score of 1 would be possible in only one situation when the user traverse the game's state space in the right direction all the time.\n\n#### Notification Mechanism\n* puzzl uses a combination of *goroutines* and *channels* to deliver real time notifications in the game.\n* Here you can see all the [available notifications](https://github.com/pravj/puzzl/blob/development/notification/notification.go#L5-L14).\n\n#### Dependencies\n* [termbox-go](https://github.com/nsf/termbox-go) - Text based graphic user interface for the game.\n* [Box-drawing characters](http://en.wikipedia.org/wiki/Box-drawing_character) for drawing different sections.\n\n---\n\nBuilt with *Muzi* and *Coffee* by [Pravendra Singh](https://twitter.com/hackpravj)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpravj%2Fpuzzl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpravj%2Fpuzzl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpravj%2Fpuzzl/lists"}