https://github.com/krauzy/8-puzzle
Using heuristic search (Hill Climb with BFS and DFS) methods to solve 8-puzzle
https://github.com/krauzy/8-puzzle
8-puzzle bfs dfs heuristic-search-algorithms ia streamlit-webapp
Last synced: 4 months ago
JSON representation
Using heuristic search (Hill Climb with BFS and DFS) methods to solve 8-puzzle
- Host: GitHub
- URL: https://github.com/krauzy/8-puzzle
- Owner: Krauzy
- Created: 2021-04-03T02:32:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-17T06:40:35.000Z (over 4 years ago)
- Last Synced: 2025-04-14T15:17:06.008Z (7 months ago)
- Topics: 8-puzzle, bfs, dfs, heuristic-search-algorithms, ia, streamlit-webapp
- Language: Python
- Homepage:
- Size: 79.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 8-PUZZLE
Using heuristic search methods to solve 8-puzzle
## Definition
8-puzzle game is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing.

There are several methods to solve the 8-puzzle, from solving by trial and error or using AI techniques with heuristic search.
## Search Methods
### DFS : Depth-First Search
Go through all the ``child nodes`` on the left until you reach the end, if it is not the ``goal state``, return through the ``parent nodes`` and go through the ``child nodes`` on the right. ``Repeat`` until you find the ``goal state``.

### BFS : Breadth-First Search
Go through the ``child nodes`` by ``depth level``, until you find the first occurrence of the ``goal state``.

# Configuration
## Install
Install streamlit package to host the server
```shell
pip install streamlit
```
*Warning: Streamlit is a web framework that hosts the own server, so using jupyter is not viable due to conflicts with servers*
## Inicialization
Run ``main.py`` using the streamlit hook
```shell
streamlit run main.py
```