Skip to content

Instantly share code, notes, and snippets.

@bruceyoungsysu
Last active August 25, 2019 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bruceyoungsysu/4bf16b6f82daa8117a63f14618324fa4 to your computer and use it in GitHub Desktop.
Save bruceyoungsysu/4bf16b6f82daa8117a63f14618324fa4 to your computer and use it in GitHub Desktop.
GSOC 2019 Summary

aima-python Build Status Binder

This is the summary of the GSOC 2019 aimacode Python algorithm migration project for the book Artificial Intelligence: A Modern Approach 4th edition. The code are in the repository of aimacode/aima-python:master. Algorithms are submitted to the directory under the master branch with the ending suffix of '4e.py'. Test cases are under the folder of aimacode/aima-python:master/tests/ with suffix of '4e.py'. Notebooks are under the folder of [aimacode/aima-python:master/notebooks/](not merged yet, can be viewed in pull requests) with separate subfolder for each chapter. For detailed information of files, please read the sections of 'Index of Algorithms' and 'Index of PRs'.

File Structure of the Project

When complete, this project will have Python implementations for the pseudocode algorithms in the book, as well as tests and examples of use. For each major topic, such as nlp (natural language processing), we provide the following files:

  • nlp4e.py: Implementations of all the pseudocode algorithms in the 4th edition, and necessary support functions/classes/data.
  • tests/test_nlp4e.py: A lightweight test suite, using assert statements, designed for use with py.test, but also usable on their own.
  • notebooks/chapter22: The Jupyter notebooks to demonstrate implementation and examples of algorithms. There is a separate notebook for each section in this chapter: Grammar.ipynb and Pasring.ipynb. For some chapters, there will be a brief introduction in introduction.ipynb and the implementation of more example applications nlp_apps.ipynb.

Index of Algorithms

Here is an index of algorithms, tests and demonstration examples implemented for the 4th edition and their corresponding test file and notebook locations. The aima-pseudocode project describes all the algorithms from the book. For the chapters before chapter 7, there are no significant changes in the algorithms to the 3rd edition.

Chapter Name (in 4th edition) File Tests Notebook Chpater in 3rd edition
7 Logical Agents logic4e.py tests/test_logic4e.py 7
8 FIRST-ORDER LOGIC logic4e.py tests/test_logic4e.py 8
9 INFERENCE IN FIRST-ORDER LOGIC logic4e.py tests/test_logic4e.py 9
10 KNOWLEDGE REPRESENTATION No Algorithms to Implement No Need No Need 12
11 AUTOMATED PLANNING planning4e.py tests/test_planning4e.py 10-11.3
12 QUANTIFYING UNCERTAINTY probability4e.py tests/test_probability4e.py 13
13 PROBABILISTIC REASONING probability4e.py tests/test_probability4e.py 14
14 PROBABILISTIC REASONING OVER TIME reasoning_over_time4e.py tests/test_reasoning_over_time4e.py 15
15 MAKING SIMPLE DECISIONS making_simple_decision4e.py No Need 16
16 MAKING COMPLEX DECISIONS mdp4e.py tests/test_mdp4e.py notebooks/chapter16-17 17.1-17.4
17 MAKING DECISIONS IN MULTIAGENT ENVIRONMENTS mdp4e.py tests/test_mdp4e.py notebooks/chapter16-17 11.4, 17.5-17.6
18 LEARNING FROM EXAMPLES learning4e.py tests/test_learning4e.py notebooks/chapter18 18.1-18.6, 18.8-18.11
19 DEEP NEURAL NETWORKS DeepNeuralNet4e.py tests/test_deepNN.py notebooks/chapter19 18.7
20 LEARNING PROBABILISTIC MODELS Partially Done, need confirmation abut pseudocode 20
21 REINFORCEMENT LEARNING rl4e.py tests/test_rl4e.py notebooks/chapter21 21
22 NATURAL LANGUAGE PROCESSING nlp4e.py tests/test_nlp4e.py notebooks/chapter22 22
23 DEEP LEARNING FOR NATURAL LANGUAGE PROCESSING No text yet
24 PERCEPTION perception4e.py tests/test_perception4e.py notebooks/chapter24 24

Index of PRs

Here is the index of all the pull requests made in the period of the project. For detailed changes on files and codes, please navigate through the links to each single pull request.

Pull Request change content chapters involved merged
1075 Add Monte Carlo Tree Search 5
  • 1076 Add algos in chapter 18-19 and 21-22 18&19&21&22
  • 1088 Add algos in chapter 12 and 13 12&13
  • 1091 Add algos in chapter 24 24
  • 1093 Add algos in chapter 14 14
  • 1094 Add algos in chapter 16 and 17 16&17
  • 1095 Add demo notebooks of chapter 18 18
  • 1096 Add algos in chapter 7-9 7&8&9
  • 1097 Add algos in chapter 11 11
  • 1102 Add demo notebooks of chapter 19 19
  • 1103 Add demo notebooks of chapter 21 21
  • 1104 Add demo notebooks of chapter 22 22
  • 1105 Add demo notebooks of chapter 24 24
  • 1106 Add demo notebooks of chapter 16 16
  • 1108 Add algos in chapter 15 and 25 15&25
  • What's Left

    • Algorithms in chapter 20: needs confirmation of Peter and Pierre about whether there will be more pseudocode added.
    • Notebooks from chapter 7 to chapter 14: Minor changes needed to made to the content of 3rd edition notebooks. But in each chapter, the previous notebooks need to be separated by sections and algorithms into multiple shorter ones accordingly.
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment