{"id":26872190,"url":"https://github.com/javrui/search-module","last_synced_at":"2026-02-07T16:00:51.559Z","repository":{"id":260166646,"uuid":"877287148","full_name":"javrui/search-module","owner":"javrui","description":"Python module implementing BFS and DFS search algorithms. Usage example of maze solving. Full RTD documentation .","archived":false,"fork":false,"pushed_at":"2025-01-13T11:58:49.000Z","size":10435,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T04:57:07.833Z","etag":null,"topics":["algorithms","maze","python","read-the-docs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javrui.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T12:06:38.000Z","updated_at":"2025-02-10T10:29:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e50196e1-9618-4093-b05e-7afd6c6c9328","html_url":"https://github.com/javrui/search-module","commit_stats":null,"previous_names":["javrui/search","javrui/search-module"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/javrui/search-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javrui%2Fsearch-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javrui%2Fsearch-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javrui%2Fsearch-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javrui%2Fsearch-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javrui","download_url":"https://codeload.github.com/javrui/search-module/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javrui%2Fsearch-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29199519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["algorithms","maze","python","read-the-docs"],"created_at":"2025-03-31T08:29:45.706Z","updated_at":"2026-02-07T16:00:51.522Z","avatar_url":"https://github.com/javrui.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# *search* module\n\n![Python](https://img.shields.io/badge/python-3.9%2B-blue)\n[![Documentation Status](https://readthedocs.org/projects/search-module/badge/?version=latest)](https://search-module.readthedocs.io/en/latest/)\n![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-yellow.svg)\n\n## ✨Overview\n\nThe *search* module is a Python framework designed to solve search problems using classic algorithms such as Breadth-First Search (BFS) and Depth-First Search (DFS).\n\nThis module is especially useful for tasks involving state-space search, such as path finding, game solving, or any scenario that requires systematic exploration of states.\n\nIt demonstrates step-by-step algorithm execution and logs internal data structures for educational purposes.\n\n## 📥 Installation\nNo installation is required; simply add *search.py* to your project folder and import the necessary classes:\n\n```python\nfrom search import SearchProblem, Node\n```\n\n## 🚀 Basic usage\n\nThe module provides two core abstract classes, *SearchProblem* and *Node*, to  be extended to implement custom search solutions. You have to create problem-specific classes by inheriting from *SearchProblem* and *Node*.\n\nIn this basic usage example, the classes *Maze* and *MazeNode* handle maze-related logic in a maze solving script:\n\n```python\nclass Maze(SearchProblem):\n   # ...\n\nclass MazeNode(Node):\n   # ...\n```\n\nImplement the required abstract methods in your subclasses to define your specific problem environment (refer to the documentation for more details).\n\n```python\nclass Maze(SearchProblem):\n   def __init__():\n      # Maze specific implementation here\n\n   def show_solution():\n      # Maze specific implementation here\n\nclass MazeNode(Node)\n   def __init__():\n      # Maze specific implementation here\n\n   def actions():\n      # Maze specific implementation here\n\n   def result():\n      # Maze specific implementation here\n```\n\nInstantiate a Maze object:\n\n```python\nmaze = Maze()\n```\n\nSolve the search problem using BFS or DFS:\n\n```python\nmaze.solve('BFS')\n```\n\nPrint the discovered solution:\n\n```python\nmaze.show_solution('BFS')\n```\n\nObtain a detailed log of algorithmic steps:\n\n```python\nmaze.save_algorithm_steps_to_file()\n```\n\n## 📝 Documentation\n\nFull documentation, including the API specification and a working example that solves mazes, is available on [Read The Docs](https://search-module.readthedocs.io/en/latest/)\n\nTOC:\n\n* WELLCOME\n\n  * [What is search module?](https://search-module.readthedocs.io/en/latest/wellcome.html)\n  * [Watch search in action: maze solving](https://search-module.readthedocs.io/en/latest/wellcome.html#watch-search-in-action-maze-solving)\n\n* INTRODUCTION\n\n  * [Introduction to search problem](https://search-module.readthedocs.io/en/latest/AI_intro.html)\n\n* USER GUIDE\n\n  * [User Guide](https://search-module.readthedocs.io/en/latest/user_guide.html)\n  * [API Reference](https://search-module.readthedocs.io/en/latest/search_api_reference.html)\n\n* USAGE EXAMPLE\n\n  * [maze.py script](https://search-module.readthedocs.io/en/latest/maze/usage_example_maze.html)\n\n* ALL THE REST\n\n  * [Key Features of search module](https://search-module.readthedocs.io/en/latest/features.html)\n  * [Credits and license](https://search-module.readthedocs.io/en/latest/credits_license.html)\n  * [Testing](https://search-module.readthedocs.io/en/latest/testing.html)\n\n## 💡 Key Features\n\n### Object-Oriented Design\n\n  The module follows OOP principles, encapsulating problem-solving elements into classes. Each class is responsible for specific functionality, ensuring modularity and reusability.\n\n### Abstract Classes\n\n* Abstract Base Classes (ABC)\n\n  Interface classes are defined as abstract using Python’s ABC module. This forces any concrete subclass to implement critical methods.\n\n* Protected Methods and Attributes\n\n  Methods and attributes prefixed with an underscore (_) are intended for internal use, keeping users focused on essential interfaces and abstracting lower-level details.\n\n* Explicit Subclassing Requirements\n\n  Marking methods as abstract in interface classes ensures subclasses provide the necessary implementations, promoting a controlled interface tailored to each search scenario.\n\n### Modularity and Extensibility\n\n* Pluggable Search Algorithms\n\n  Different search strategies (BFS, DFS) are supported by selecting the type of frontier (stack, queue). This design simplifies adding or modifying search algorithms without changing the overall structure.\n\n* Audit Trail and Algorithm Steps Log\n\n  Dedicated class captures each step of the search process, including frontier and explored-node states. This comprehensive record aids in debugging and provides transparent insight into how the search progresses.\n\n### Customizable Output\n\n  Method that prints solution can be used directly or overridden in subclasses to customize the solution's presentation format, allowing for flexible output that meets domain-specific or user-defined requirements.\n\n## 🧪 Testing\n\n(Not released in current version)\n\n## 🙏 Credits\n\nThis project is a based on code from [HarvardX:CS50’s Introduction to Artificial Intelligence with Python course](https://pll.harvard.edu/course/cs50s-introduction-artificial-intelligence-python) refactored to achieve mentioned key features.\n\n## ⚖️ License\n\nThe Harvard course code is published under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) [license](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavrui%2Fsearch-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavrui%2Fsearch-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavrui%2Fsearch-module/lists"}