Skip to content

This repository contains implementation of different AI algorithms, based on the 4th edition of amazing AI Book, Artificial Intelligence A Modern Approach

Notifications You must be signed in to change notification settings

snrazavi/AI-Programming-using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Programming-using-Python

This repository contains implementation of different AI algorithms, based on the amazing AI book Artificial Intelligence: A Modern Approach (4th edition, 2020).

Contents

First part:

  • Search problems
    • Uninformed search strategies:
      • BFS, DFS, UCS, DLS, IDS
    • Informed search strategies:
      • Gready, A-star


Example: solving 8-puzzle using search algorithms.

- Local search:
    - Hill climbing, Simulated Annealing, Genetic algorithms


Example solution found by simulated annealing for TSP problem (for 50 cities).


Example: solving 10-Queens using simulated annealing.

- Adversarial search and games
    - MiniMax, alpha-beta pruning

Python programming concepts

  • Object oriented programming in Python
    • Using and defining special python methods (dunder methods).
    • Immutable objects.
    • Making an object hashable (implementing __hash__() and __eq__() methods.
    • Implementing decortors in Python.
    • Class methods and static methods.
    • __repr__() and __str__() methods.

Second part:

  • Machine learning
    • Supervised learning:
      • KNN, Naive Bayes, Desision Trees, SVM, Neural Nets
    • Unsupervised learning:
      • k-Means clustering
    • Reinforcement learning
      • Q-learning

Example problems

  • Search:
    • N-Puzzle, N-Queens, TSP
  • Games:
    • Pacman, Chess
  • Learning:
    • Pacman, Chess, etc.

Lesson 1: Uninformed (blind) search strategies

  • Implementing data structures like stack, queue and priority queue
  • Implementing N-Puzzle (8-Puzzle)
  • Implementing uninformed search strategies: BFS, DFS, UCS, DLS, IDS
  • Programming assignment

Lesson 2: Informed search strategies

  • Implementing informed search strategies: Greedy, A-star
  • Programming assignment

Lesson 3: Local search

  • Implementing N-Queens and TSP(a graphical implementation)
  • Implementing local search strategies: hill climbing, simulated annealing and genetic algorithms
  • Programming assignment

Lesson 4: Adversarial search and games

  • Implementing Otello
  • Implementing adversarial search algoritms: Minimax and alpha-beta prunning
  • Programming assignment

Prerequisite

  • Basic knowledge of programming (Python)
  • Basic knowledge of data structures and algorithms

After first part:

  • You will have a good understanding of basic AI techniques (solving problems using searching)
  • You will become a real python programmer and most importantly a real programmer!
  • You will see a lot of programming challenges and you will learn how to solve them

Reference