/CS50-s-Introduction-to-Artificial-Intelligence-with-Python

A repository for all course work submitted for the "CS50’s Introduction to Artificial Intelligence with Python" course. Visit: https://cs50.harvard.edu/ai/2020/ for more information

Primary LanguagePython

CS50's Introduction to Artificial Intelligence with Python

A repository for coursework submitted for the "CS50’s Introduction to Artificial Intelligence with Python"(https://cs50.harvard.edu/ai/2020/) course.

  • Snippets: A question answering programme built using the Natural Language Toolkit (nltk) and employing term frequency and inverse document frequency to provide an answer to a user's question.
  • Parser: A programme employing the Natural language toolkit (nltk) to determine the structure of a sentence (i.e., a setence parser).
  • Traffic: A TensorFlow Keras convolutional neural network that classifies Traffic Roadsign images into 43 classses with an accuracy of ~99%.
  • Nim: A reinforcement learning programme, which is iteratively trained using a epsilon-greedy Q-learning algorithm and plays optimally against an user.
  • Shopping: A scikit-learn K-nearest neighbour classifier for the prediction of customer online purchase completion based on 17 categorical and continuous variables (e.g., number of website pages visited, whether or not the customer is a returning visitor, whether or not it is a 'special day' or the weekend etc.).
  • Crossword: A constraint satisfaction programme that selects suitable words from a dictionary to fill in a empty crossword structure so that each word is unique and meets both the unary constraints (i.e., has the correct length) and binary contraits (i.e., shares a character with an overlapping word in the correct overlap possition) of a given crossword structure.
  • Heredity: Mutated versions of the GJB2 gene are one of the leading causes of hearing impairment in newborns. This programme employs a Bayesian network to determine the probability distributions of different family members to have none, one or two copies of the mutated gene and to exhibit hearing impairment given familial hearing impairment information.
  • PageRank: A programme for the ranking of webpages by importance using either sampling from a Markov Chain random surfer or a iterative PageRank formula application.
  • Minesweeper AI: A knowledge-based agent that solves randomly generated Python Pygame minesweeper boards (of size 8 x 8 and containing 8 mines) using step-wise knowledge acquisition and inference.
  • Logic puzzles: A programme that solves 'Knighs or Knaves' logic puzzles (i.e., determines whether a character is telling the truth or lying) based on a set of 'character-spoken' statements (i.e., a knowledge database) using propositional logic.
  • TicTacToe: A user vs. AI Tic-Tac-Toe Python Pygame, which implements an alpha-beta pruned recursive minimax decision algorithm to ensure that the AI plays optimally.
  • Degrees of Separation: Employing IMDB's databases of movies (> 340 000 records), actors (> 1 000 000 records) and the relationship between movies and actors (> 1 000 000 records), this programme calculates the 'degrees of separation' between two user-specified actors using a breadth-first search alrgorithm (code for depth-first search also provided).