An open API service indexing awesome lists of open source software.

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

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
```