A small collection of AI example programs (C, Prolog and search algorithms) demonstrating state-space search techniques, heuristics, and classic planning problems.
Contents of this repository include implementations and sample inputs for puzzles and problems such as the sliding-tile puzzle (A*), Tower of Hanoi, N-Queens, Missionaries & Cannibals, and simple neural network demo for the IRIS dataset.
Table of contents
Watch the A* algorithm solve the N-puzzle problem in action:
Note: If the video doesn't play directly on GitHub's web interface, you can download it using the link above or view the repository via GitHub Pages.
- Language: primarily C and Prolog
- Topics: state-space search, A* heuristic search, BFS, classic planning problems, simple neural network example for IRIS dataset
Neural Network done in C/— small C neural network and IRIS dataset sampleProlog Programs/— a set of classic Prolog problems and solutionsState Space Search/— C implementations for N-Puzzle-Problem and search techniques
General steps for compiling C examples (example uses the sliding-puzzle file name, adjust to the file you want):
- Open a terminal and change to the folder containing the C file you want to run. Example:
cd "State Space Search"
gcc -o sliding "Sliding-puzzle Proble using A-star algorithm.c" -O2
./slidingNotes:
- Filenames in this repo sometimes contain spaces; wrap them in quotes when using the shell.
- You only need a C compiler (e.g.,
gcc) for the C programs.