Skip to content

8 Puzzle solver in C++ using machine learning (a* search)

Notifications You must be signed in to change notification settings

tariksalay/eight-puzzle-ml-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This program takes a simple 3x3 as an input and solves it by calculating the cost with Manhattan(taxicab) Distance.

Manhattan Distance

A* logic

For the search method, A-star algorithm has used, which is a graph traversal in order to find efficieny. At each iteration of its main loop, A* needs to determine which of its paths to extend. It does so based on the cost of the path and an estimate of the cost required to extend the path all the way to the goal.

Cost Graph

To visualize how to calculate the cost.

Initial vs Goal

Initial vs Goal State

Watch the video Watch the video to see how the code runs

About

8 Puzzle solver in C++ using machine learning (a* search)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages