https://github.com/hassan11196/ai-assignments
AI Assignments - FAST NUCES (Karachi) - CS401 - Spring 2020
https://github.com/hassan11196/ai-assignments
ai artificial-intelligence genetic-algorithm graph-algorithms jupyter jupyter-notebook kmeans-clustering naive-bayes-classifier networkx nqueens-problem python rapidminer search-algorithm
Last synced: 4 months ago
JSON representation
AI Assignments - FAST NUCES (Karachi) - CS401 - Spring 2020
- Host: GitHub
- URL: https://github.com/hassan11196/ai-assignments
- Owner: hassan11196
- Created: 2020-02-21T16:26:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-05T14:33:20.000Z (almost 5 years ago)
- Last Synced: 2025-01-05T20:10:46.584Z (5 months ago)
- Topics: ai, artificial-intelligence, genetic-algorithm, graph-algorithms, jupyter, jupyter-notebook, kmeans-clustering, naive-bayes-classifier, networkx, nqueens-problem, python, rapidminer, search-algorithm
- Language: Jupyter Notebook
- Homepage: https://hassan11196.github.io/AI-Assignments/
- Size: 8.58 MB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI - Assignments
## A1
Following are the strategies to be implemented.
* Breadth first search
* Uniform cost search
* Greedy best first search
* Iterative deepening depth first searchA comparison of these four needs to be done. Complete list of pathway and path cost of each algorithm has to be calculated so that it shows clearly that which algorithm is best out of all in ascending order.
### Search Algorithms Sorted in order of Path Cost :
start_node : Arad
end_node : Bucharest1. Uniform Cost Search Path : ['Arad', 'Sibiu', 'Rimnicu Vilcea', 'Pitesti', 'Bucharest'] Cost : 418
2. Breadth First Search Path : ['Arad', 'Sibiu', 'Fagaras', 'Bucharest'] Cost : 450
3. Greedy Best First Search Path : ['Arad', 'Sibiu', 'Fagaras', 'Bucharest'] Cost : 450
4. Iterative Deepening Depth First Search Path : ['Arad', 'Sibiu', 'Fagaras', 'Bucharest'] Cost : 450### Visualizations :
* #### Uniform Cost Search:

* #### Iterative Deepening Depth First Search:
Conclusions :
* Uniform Cost Search is Best as it is complete and optimal for edges with non uniform costs.
* Breadth First Search and Iterative Deepening Depth First Search is only optimal for edges with uniform cost
* Greedy Best First Search Path is not optimal.### References :
http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html## A2
### Question 1: Exploring a Simple Genetic Algorithm

### Question 2: N-Queens using backtracking

### References:
https://towardsdatascience.com/introduction-to-genetic-algorithms-including-example-code-e396e98d8bf3
https://towardsdatascience.com/introduction-to-optimization-with-genetic-algorithm-2f5001d9964b
http://see.stanford.edu/materials/icspacs106b/H19-RecBacktrackExamples.pdf
## A3
Assignment Report Available [here](https://github.com/hassan11196/AI-Assignments/blob/master/A3/Submission/AI-A3-K173654-D.docx).
### Question 1: Gaussian Naïve Bayes Classifier Written from scratch.
Classify the Parkinson's disease (PD) data set using Gaussian Naïve Bayes Classifier.
Solution in [Notebook](https://github.com/hassan11196/AI-Assignments/blob/master/A3/Submission/Q1/K173654-A3-Q1.ipynb)
### Question 2: Naïve Bayes Classifier using RapidMiner - Wine Dataset:
- Simple Naive Bayes

- Kernel Naive Bayes
### Question 3: Naïve Bayes Classifier using RapidMiner - Parkinson's Dataset:
- Simple Naive Bayes

- Kernel Naive Bayes
### Question 4: K- MEANS Clustering using RapidMiner - Wine Dataset:
- Accuracy

- Precision

- Recall
