The Wayback Machine - https://web.archive.org/web/20240106131028/https://github.com/snrazavi/AI-Programming-using-Python
Skip to content

snrazavi/AI-Programming-using-Python

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
October 2, 2021 21:44
September 25, 2021 14:16
September 20, 2021 08:30
September 20, 2021 04:09
October 1, 2021 02:43
September 20, 2021 04:26

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