You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-6Lines changed: 14 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,19 @@
1
-
# aima-python: Structure of the Project
1
+
# `aima-python`: Structure of the Project
2
2
3
3
Python code for the book *Artificial Intelligence: A Modern Approach.*
4
-
When complete, this project will cover all the major topics in the book, for each topic, such as `logic`, we will have the following [Python 3.5](https://www.python.org/downloads/release/python-350/) files:
4
+
When complete, this project will cover all the major topics in the book, for each topic, such as `logic`, we will have the following [Python 3.5](https://www.python.org/downloads/release/python-350/) files in the main branch:
5
5
6
6
-`logic.py`: Implementations of all the pseudocode algorithms in the book.
7
7
-`logic_test.py`: A lightweight test suite, using `assert` statements, designed for use with `py.test`.
8
8
-`logic.ipynb`: A Jupyter notebook, with examples of usage. Does a `from logic import *` to get the code.
9
+
10
+
Until we get there, we will support a legacy branch, `aima3python2` (for the thrid edition of the textbook and for Python 2 code). To prepare code for the new master branch, the following should be done:
11
+
12
+
- Check for common problems in [porting to Python 3](http://python3porting.com/problems.html), such as: `prtint` is now a function; `range` and `map` and other functions no longer produce `list`s; objects of different types can no longer be compared with `<`; strings are now Unicode; it would be nice to move `%` string formating to `.format`; there is a new `next` function for generators; integer division now returns a float; we can now use set literals.
13
+
- Implement functions that were in the third edition of the book but were not yet implemented in the code.
14
+
- As we finish chapters for the new fourth edition, we will share the pseudocode, and describe what changes are necessary.
15
+
- Create a `_test.py` file, and define functions that use `assert` to make tests. Remove any old `doctest` tests.
16
+
- Create a `.ipynb` notebook, and give examples of how to use the code.
9
17
10
18
# Style Guide
11
19
@@ -28,7 +36,7 @@ Beyond the above rules, we use [Pep 8](https://www.python.org/dev/peps/pep-0008)
28
36
29
37
def retry(url: Url) -> None:
30
38
31
-
# Language Choice
39
+
# Choice of Programming Languages
32
40
33
41
Are we right to concentrate on Java and Python versions of the code? I think so; both languages are popular; Java is
34
42
fast enough for our purposes, and has reasonable type declarations (but can be verbose); Python is popular and has a very direct mapping to the pseudocode in the book (ut lacks type declarations and can be solw). The [TIOBE Index](http://www.tiobe.com/tiobe_index) says the top five most popular languages are:
@@ -37,9 +45,9 @@ fast enough for our purposes, and has reasonable type declarations (but can be v
37
45
38
46
So it might be reasonable to also support C++/C# at some point in the future. It might also be reasonable to support a language that combines the terse readability of Python with the type safety and speed of Java; perhaps Go or Julia. And finally, Javascript is the language of the browser; it would be nice to have code that runs in the browser, in Javascript or a variant such as Typescript.
39
47
40
-
What languages are instructors recommending for their AI class?
41
-
To get an approximate idea, I gave the query <tt>norvig russell "Modern Approach"</tt> along with
42
-
the names of various languages and looked at the estimated counts of results on
48
+
There is also a `aima-lisp` project; in 1995 when we wrote the first edition of the book, Lisp was the right choice, but today it is less popular.
49
+
50
+
What languages are instructors recommending for their AI class? To get an approximate idea, I gave the query <tt>[norvig russell "Modern Approach"](https://www.google.com/webhp#q=russell%20norvig%20%22modern%20approach%22%20java)</tt> along with the names of various languages and looked at the estimated counts of results on
43
51
various dates. However, I don't have much confidence in these figures...
0 commit comments