{"id":25750199,"url":"https://github.com/maguids/game-klotski-with-interface","last_synced_at":"2026-06-18T09:32:29.788Z","repository":{"id":273717186,"uuid":"748217273","full_name":"Maguids/Game-Klotski-with-Interface","owner":"Maguids","description":"Version of the game \"PuzzlePacked IQ games\" in terminal and pygame 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-22T18:04:55.000Z","size":1173,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T09:01:26.976Z","etag":null,"topics":["astar-algorithm","bfs-algorithm","greedy-algorithm","klotski","pygame","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-25T14:20:34.000Z","updated_at":"2025-01-22T18:05:00.000Z","dependencies_parsed_at":"2025-01-22T15:43:35.562Z","dependency_job_id":"bf1b0b16-e09d-46c8-9fb9-b4d04a5043cc","html_url":"https://github.com/Maguids/Game-Klotski-with-Interface","commit_stats":null,"previous_names":["maguids/game-klotski-with-interface"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Maguids/Game-Klotski-with-Interface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski-with-Interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski-with-Interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski-with-Interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski-with-Interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maguids","download_url":"https://codeload.github.com/Maguids/Game-Klotski-with-Interface/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maguids%2FGame-Klotski-with-Interface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34485163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"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":["astar-algorithm","bfs-algorithm","greedy-algorithm","klotski","pygame","python3"],"created_at":"2025-02-26T13:15:58.728Z","updated_at":"2026-06-18T09:32:29.212Z","avatar_url":"https://github.com/Maguids.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game - Kslotski (Terminal and Pygame 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** and a **graphical interface.**\n\n**Authors:**\n- [Magda Costa](https://github.com/Maguids)\n- Sofia Machado\n\n\u003cbr\u003e\u003c/br\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\u003c/br\u003e\n\n## Requirements:\n\n- python version 3.8.10\n- pygame version 1.9.6\n\nThis were the tested requirements.\nIn order to install pygame run:\n```bash \npip install pygame==1.9.6\n```\n\n\u003cbr\u003e\u003c/br\u003e\n\n## Running the Game:\nIn order to start the game, just run:\n\n```bash \npython3 start.py\n```\n\n\u003cbr\u003e\u003c/br\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- You can choose whether you want to **play in the terminal** or in **the graphical interface** developed in **pygame**;\n\n**In Terminal Mode:**\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**In Pygame Mode:**\n- Same features, the only difference is that you have buttons to use the features, no need to type anything.\n- **New Feature:** **\u003cu\u003eColorblind Mode\u003c/u\u003e** - The pieces may or not be identified with numbers, to help better distinguish them.\n\n## About the repository:\nIn the folder \u003cu\u003e\"Klotski\"\u003c/u\u003e, you can find several files, each of which is assigned to a specific set of tasks, which are:\n\n**Regardless of the game mode:**\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- 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 and lets you choose either pygame ou terminal version;\n\n**In terminal mode:**\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\n**In Pygame Mode:**\n- menu_pygame.py ➡️ It allows you to choose the game difficulty, the desired level, the search method to use and whether or not we are using colorblind mode.\n- play_in_pygame.py ➡️ Starts the game according to what was chosen in the menu;\n- settings.py ➡️ Allows you to save pygame mode settings and define the Button class\n\nNote: The development of the search algorithms' operating mode is based on the way the game was created\n\n\u003cbr\u003e\u003c/br\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-with-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaguids%2Fgame-klotski-with-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaguids%2Fgame-klotski-with-interface/lists"}