{"id":25750209,"url":"https://github.com/maguids/game-klotski","last_synced_at":"2025-06-16T02:02:57.378Z","repository":{"id":273705580,"uuid":"748216381","full_name":"Maguids/Game-Klotski","owner":"Maguids","description":"Version of the game \"PuzzlePacked IQ games\" in terminal with search algorithms. Second Semester of the First Year of the Bachelor's Degree in Artificial Intelligence and Data Science.","archived":false,"fork":false,"pushed_at":"2025-01-22T21:34:31.000Z","size":262,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T13:15:57.355Z","etag":null,"topics":["astar-algorithm","bfs-algorithm","greedy-algorithm","klotski","python3"],"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/Maguids.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-25T14:18:27.000Z","updated_at":"2025-01-22T21:34:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c981a8e-988b-4320-a3ae-e28da5f2a1b6","html_url":"https://github.com/Maguids/Game-Klotski","commit_stats":null,"previous_names":["maguids/game-klotski"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Maguids/Game-Klotski","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maguids","download_url":"https://codeload.github.com/Maguids/Game-Klotski/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260083830,"owners_count":22956406,"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":["astar-algorithm","bfs-algorithm","greedy-algorithm","klotski","python3"],"created_at":"2025-02-26T13:15:59.708Z","updated_at":"2025-06-16T02:02:57.357Z","avatar_url":"https://github.com/Maguids.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game - Kslotski (Terminal Version)\n\nThis project was developed for the \"Elements of Artificial Intelligence and Data Science\" course and aims to **develop and implement a solitaire game**. The project should include the use of **heuristic search methods and uninformed search methods** that should be able to **solve different versions or levels of this game.**\n\n---\n\u003cbr\u003e\n\n## Programming Language:\n\n\u003cdiv style = \"display: inline_block\"\u003e\u003cbr/\u003e\n  \u003cimg align=\"center\" alt=\"python\" src=\"https://img.shields.io/badge/Python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white\" /\u003e\n\u003c/div\u003e\u003cbr/\u003e\n\n\u003cbr\u003e\n\n## Requirements:\n\n- python version 3.8.10\n\nThis was the tested requirement.\n\n\u003cbr\u003e\n\n## Running the Game:\nIn order to start the game, just run:\n\n```bash \npython3 start.py\n```\n\u003cbr\u003e\n\n## About the Game:\n\n### How to play:\nKlotski is a version of the \"PuzzlePacked IQ games\", in which the objective of the game is to move the largest block and position it in the right place. To do this, you need to move a set of smaller blocks, allowing the larger block to move. Each block occupies one or more cells, and blocks can move in any of the four cardinal directions (up, down, left, or right) as long as there are no obstacles in the way.\n\n### Search Algorithms:\n- **Breadth-First Search (BFS)**;\n- **Greedy Best-First Search** - with Manhattan distance;\n- **A\\* Algorithm** (A Star) - with Manhattan distance.\n\n### Features:\n- Possibility to **choose different boards with different levels of difficulty**;\n- Possibility to return to the **Menu** at any time by typing 'menu'\n- It is possible to **restart** the chosen level by typing 'r';\n- Possibility to **end the game** at any time by typing 'quit';\n- Option to **choose the desired search algorithm**;\n- **Hint function**, which varies depending on the search algorithm used, which shows the next possible move, just type 'hint'.\n\n\u003cbr\u003e\n\n## About the repository:\nIn the folder \u003cu\u003e\"Klotski - Terminal\"\u003c/u\u003e, you can find several files, each of which is assigned to a specific set of tasks, which are:\n\n- levels.py ➡️ Has five different game boards of each of the three difficulties;\n- creat_board.py ➡️ Function that allows to create the board depending on the chosen level;\n- game.py ➡️ Development of the game Klotski, has all the functions that allows it to work; \n- menu_terminal.py ➡️ Explains the functionalities of the game and lets you choose the level and the difficulty;\n- play_in_terminal.py ➡️ Starts the game according to what was chosen in the menu and allows you to use 'Hint';\n- a_star.py ➡️ Development of A*;\n- bfs.py ➡️ Development of BFS;\n- greedy.py ➡️ Development of Greedy;\n- start.py ➡️ Starts the functioning of everything;\n\nNote: The development of the search algorithms' operating mode is based on the way the game was created\n\n\u003cbr\u003e\n\n## Link to the course: \n\nThis course is part of the **\u003cu\u003esecond semester\u003c/u\u003e** of the **\u003cu\u003efirst year\u003c/u\u003e** of the **\u003cu\u003eBachelor's Degree in Artificial Intelligence and Data Science\u003c/u\u003e** at **\u003cu\u003eFCUP\u003c/u\u003e** and **\u003cu\u003eFEUP\u003c/u\u003e** in the academic year 2022/2023. You can find more information about this course at the following link:\n\n\u003cdiv style=\"display: flex; flex-direction: column; align-items: center; gap: 10px;\"\u003e\n  \u003ca href=\"https://sigarra.up.pt/fcup/pt/UCURR_GERAL.FICHA_UC_VIEW?pv_ocorrencia_id=507945\"\u003e\n    \u003cimg alt=\"Link to Course\" src=\"https://img.shields.io/badge/Link_to_Course-0077B5?style=for-the-badge\u0026logo=logoColor=white\" /\u003e\n  \u003c/a\u003e\n\n  \u003cdiv style=\"display: flex; gap: 10px; justify-content: center;\"\u003e\n    \u003ca href=\"https://sigarra.up.pt/fcup/pt/web_page.inicial\"\u003e\n      \u003cimg alt=\"FCUP\" src=\"https://img.shields.io/badge/FCUP-808080?style=for-the-badge\u0026logo=logoColor=grey\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://sigarra.up.pt/feup/pt/web_page.inicial\"\u003e\n      \u003cimg alt=\"FEUP\" src=\"https://img.shields.io/badge/FEUP-808080?style=for-the-badge\u0026logo=logoColor=grey\" /\u003e\n    \u003c/a\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaguids%2Fgame-klotski","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaguids%2Fgame-klotski","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaguids%2Fgame-klotski/lists"}