A.I Algorithm using A* Search
Project Overview
This algorithm was created for an assignment in an Artificial Inteligence course I took. The class was tasked with creating an A.I algorithm to solve a mixed sliding 8 puzzle. I chose to use C# for this program and coded and tested it in Visual Studio 2019.
Features and Uses
For this task, I implimented a function f(n) = g(n) + h(n) where g(n) is the distance from current node to root node AKA number of moves from initial boardstate and h(n) is the number of misplaced tiles by comparing the current state and goal state. We want to solve the puzzle in the least amount of moves possible therefore the program is built around picking moves that have the smallest f(x) value. The puzzle is handled by a 2D array and contains values 0-9. Tile movement is handled by 'swap' method that swaps the coords of a number with 0's coordinates. Movement is looped until the inital puzzle matches the goal puzzle.
Tools and Methods Used
C#, A.I Algorithm Analysis(Specifically implimenting an A* algorithm), Data Structures, Object-Oriented Design, Visual Studio 2019, NUnit Testing