Skip to content

About

involves Search Algorithms, in particular, Breadth-First, Depth-First, and A-Star. It involves a program that simulates a puzzle called an N-Puzzle. In my version, the blank space is in the bottom right in the solution.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview:
    This project involves Search Algorithms,
    in particular, Breadth-First, Depth-First, and A-Star.
    It involves a program that simulates a puzzle called an N-Puzzle:
    https://en.wikipedia.org/wiki/15_puzzle
    In my version the blank space is in the bottom right in the solution.


Files:
    helpers.py:
        Contains enums used for UP, DOWN, LEFT, and RIGHT.
        Also contains 2 classes:
            NPuzzle, that represents a puzzle with a current state.
            It has functions to print the puzzle, read-in the puzzle,
            swap 2 places, and evaluate if the puzzle is solved.

            Node, which represents a Search Node.
            It contains a puzzle state, a parent Node, a current search depth,
            and a list of moves that have lead to this node.
            It has functions to print all moves and to print the puzzle.

    main.py
        A driver used to run your code (All Algorithms) on all the examples.
        I have given you 6 examples, and will graded your code against these 6,
        as well as several others (of similar size)

        Note that this file ONLY checks if code solved the puzzle, but does
        not check if you solved it using the right algorithm, or implemented the
        algorithm correctly, which I will do.

    search.py
        A file with 4 algorithms BFS, DFS, and 2 A-Stars. 
        A shell has been included for each.
        Be sure to return the correct expected values.

Software Requirements:
    You must be using python3

Running:
    python3 main.py


About

involves Search Algorithms, in particular, Breadth-First, Depth-First, and A-Star. It involves a program that simulates a puzzle called an N-Puzzle. In my version, the blank space is in the bottom right in the solution.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages