Skip to content

Using heuristic search (Hill Climb with BFS and DFS) methods to solve 8-puzzle

Notifications You must be signed in to change notification settings

Krauzy/8-puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

 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

 streamlit run main.py

About

Using heuristic search (Hill Climb with BFS and DFS) methods to solve 8-puzzle

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published