Welcome to my CS50AI repository! This repository contains all the projects and assignments completed as part of the CS50AI course.
CS50AI is a course offered by Harvard University that introduces students to the exciting field of Artificial Intelligence. Throughout this course, students learn various AI concepts, algorithms, and techniques, using Python and other tools. The projects in this repository showcase the implementation and application of different AI techniques, providing a hands-on learning experience.
Description: In this project, I implemented a program that determines the degree of separation between two actors by finding the shortest path between them in a movie database.
Files:
degrees.py
small
Description: In this project, I implemented a Tic Tac Toe game using Python and utilized the Minimax algorithm to create an AI player that plays optimally. To try it, please make sure to run pip3 install -r requirements.txt
in the directory of the project to install the required Python package (pygame). After that, you should be able to run python runner.py
to play against the AI.
Files:
tictactoe.py
runner.py
requirements.txt
Description: In this project, I implemented a program to solve logic puzzles involving Knights and Knaves. Knights always tell the truth, while Knaves always lie. The goal is to determine who is a Knight and who is a Knave based on the statements provided by characters in the puzzle.
Files:
logic.py
puzzle.py
Description: In this project, I implemented a Minesweeper game. Minesweeper is a classic puzzle game where the player must uncover hidden mines on a grid while avoiding triggering them. The game incorporates AI techniques to provide hints and improve gameplay.
Files:
minesweeper.py
runner.py
requirements.txt
Description: In this project, I implemented the PageRank algorithm, which is used to rank web pages based on their importance. It involves both a sampling method and an iterative method to estimate PageRank values.
Files:
pagerank.py
Description: In this project, I implemented a program to predict the probability of a trait being passed on from parents to offspring based on genetic data. The project involves calculating conditional probabilities using the Bayesian network model.
Files:
heredity.py
Description: In this project, I implemented an AI program to solve crossword puzzles. The program uses constraint satisfaction techniques and word crossings to fill in crossword grids.
Files:
crossword.py
generate.py
Description: In this project, I build a nearest-neighbor classifier to predict whether a user intends to make a purchase during an online shopping session. The classifier uses various user session data, such as page visits, session duration, and more.
Files:
shopping.py
shopping.csv
Description: In this project, I implemented the game of Nim and created an AI player using Q-learning. Nim is a classic two-player mathematical game where players take turns removing items from distinct heaps. The objective is to be the player to remove the last item or items from the last heap.
Files:
nim.py
play.py
Description: In this project, I implemented a deep convolutional neural network to classify traffic signs with high accuracy. The goal is to train a model that can recognize and categorize traffic signs from images.
Files:
traffic.py
Description: In this project, I implemented a natural language processing parser using context-free grammar rules. The parser analyzes sentences and identifies noun phrase chunks within the sentences.
Files:
parser.py
Description: In this project, I implemented a system to generate predictions for masked words in a text using a pre-trained masked language model. The project also includes the visualization of attention scores for each token in the input text.
Files:
mask.py
Feel free to explore each project's directory for more details and code!