Git Product home page Git Product logo

algorithms-1-final-project's Introduction

Algorithms-1-final-project

Introduction

In this project, we implement and compare three search algorithms for solving "Puzzle 15" and "Puzzle 24": Breadth-First Search (BFS), Dijkstra's algorithm, and the A* algorithm. The goal is to investigate their performance in solving these puzzles and analyze the impact of different heuristic functions on the A* algorithm.

Puzzle Definitions

Puzzle 15

"Puzzle 15" is a classic game where the goal is to arrange the numbers from 1 to 15 in ascending order on a 4x4 board by sliding the numbers into an empty space.

Puzzle 24

"Puzzle 24" is a variation with a 5x5 board, and the goal is to arrange the numbers from 1 to 24 in ascending order.

Stage A: Graph Implementation

A custom graph is implemented to represent the puzzle boards. Each possible board configuration is a vertex, and two boards that can be reached by one move are connected as neighbors in the graph.

Stage B: Board Initialization

The project allows two ways to initialize the starting board: manual input or randomly creating a board by making a legal and random number of moves from the solution board.

Stage C: BFS Algorithm

The Breadth-First Search algorithm is implemented and used to solve both "Puzzle 15" and "Puzzle 24."

Stage D: A* Algorithm

The A* algorithm is implemented and used to solve both puzzles with three different heuristic functions.

algorithms-1-final-project's People

Contributors

an1604 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.