This repo follows some course work, which encouraged looking at AI from the very fundamentals.
- Tic-Tac-Toe - Non AI Approach & AI Approach
- 8 Puzzle using Hill Climbing - Simple Hill Climbing & Steepest Hill Climbing
- 8 Puzzle Using BFS (Best First Search) (A simplified version of A* (A-star) algorithm)
- Prolog System
- Single Perceptron
The Non AI approach
- Takes the state of the board.
- Validates if such a state is possible
- Calculates an index, which is a way of visualising where such a state would fall within all possible states.
The AI approach
- Takes the state of the board.
- Validates if such a state is possible
- Generates all possible moves
- Determines which move is the most optimal using a hardcoded scoring system
Simple Hill Climbing Approach
- Takes the state of the board
- While Current Heuristic is less than New Move Heuristic
- Generate new move
- Calculate heuristic
- Execute new move
Essentially, this approach moves to the state which is found first (not necessarily the most optimal move).
Steepest Hill Climbing Approach
- Takes the state of the board
- Generate all possible moves and their heuristics
- Execute most optimal move
A* (A-star) Approach.
- Takes the state of the board
- Generate all possible moves and their heuristics and total cost to traverse till the state.
- If not in CLOSED, after exploring neighbours, place in CLOSED. if already in CLOSED, update cost if it is lesser than current.
- Continue by taking least cost state from OPEN.
An example of a system in Programmable Logic (SWI-Prolog).
- Take input vectors.
- Take desired outputs.
- Generate weight vector. (Taken as input in this problem).
- Adjust weights till all desired outputs are achieved. (Error is zero).
Perceptron Convergence Theorem - For a pairwise linearly separable dataset, the perceptron can classify the classes in a finite number of iterations.