Skip to content

Steiffj/COMP-350

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

COMP-350

Classwork for Comp 350 - Artificial Intelligence

Assignment 1 - 8-Puzzle (N-Puzzle)

  • Randomly generates a valid N x N board to solve an N^2 - 1 puzzle (N = 3 is the standard 8 puzzle)
  • The blank is represented by 0
  • The goal state is all numbers in ascending order, followed by the blank
    • As an array: int[] goalState = {1, 2, 3, 4, 5, 6, 7, 8, 0}; for the 8-puzzle
  • Returns the solution path and writes it to a file upon completion
  • Warning: as expected, solving any board greater than 3x3 will result in exponential increases in runtime

There are 5 approaches the program can use to find a solution:

  1. Depth-First Search - Yes, DFS is a poor approach to the problem, but it's implemented nonetheless
  2. Breadth-First Search
  3. Weighted Cost - Swap the blank (represented by the 0) with the greatest (in numeric value) adjacent tile
  4. A* using number of misplaced tiles and moves made
  5. A* using Manhattan Distance and moves made

Assignment 3 - Othello

About

Classwork for Comp 350 - Artificial Intelligence

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages