|
1 | 1 | # aima-python
|
2 | 2 |
|
3 |
| -Python code for the book *Artificial Intelligence: A Modern Approach." |
| 3 | +Python 3 code for the book *Artificial Intelligence: A Modern Approach.* |
4 | 4 |
|
5 | 5 | Eventually, this repository should have code for everything in the book.
|
6 | 6 |
|
7 |
| -What languages are instructors recommending? To get an approximate |
| 7 | +# Style Guide |
| 8 | + |
| 9 | +We default to [Pep 8](https://www.python.org/dev/peps/pep-0008), but with a few exceptions: |
| 10 | + |
| 11 | +- I'm not too worried about an occasional line longer than 79 characters. |
| 12 | +- You don't need two spaces after a sentence-ending period. |
| 13 | +- Strunk and White is [not a good guide for English](http://chronicle.com/article/50-Years-of-Stupid-Grammar/25497). |
| 14 | +- I prefer more concise docstrings; I don't follow [Pep 257](https://www.python.org/dev/peps/pep-0257/). |
| 15 | +- Not all constants have to be UPPERCASE. |
| 16 | +- [Pep 484](https://www.python.org/dev/peps/pep-0484/) type annotations are allowed but not required. If your |
| 17 | + parameter name is already suggestive of the name of a type, you don't need an annotation, e.g.: |
| 18 | + |
| 19 | + def retry(url: Url) -> None: # This 'Url' annotation should be avoided; but '-> None' is useful |
| 20 | + |
| 21 | +# Language Popularity |
| 22 | + |
| 23 | +Are we right to concentrate on Java and Python versions of the code? |
| 24 | +What languages do students already know? The [TIOBE Index](http://www.tiobe.com/tiobe_index) says the top five are: |
| 25 | + |
| 26 | + Java, C, C++, C#, Python |
| 27 | + |
| 28 | +What languages are instructors recommending for their AI class? |
| 29 | +To get an approximate |
8 | 30 | idea, I gave the query <tt>norvig russell "Modern Approach"</tt> along with
|
9 | 31 | the names of various languages and looked at the estimated counts of results on
|
10 | 32 | various dates. However, I don't have much confidence in these figures...
|
11 | 33 |
|
12 | 34 | <p>
|
13 | 35 | <table border=1>
|
14 |
| -<tr><th>Language<th>Sep 2004<th>Feb 2005<th>Jun 2007<th>Jan 2010<th>Feb 2016 |
| 36 | +<tr><th>Language<th>2004<th>2005<th>2007<th>2010<th>2016 |
15 | 37 | <tr><td> <a href="http://www.google.com/search?q=norvig+russell+%22Modern+Approach%22"> <i>none</i></a><td align=right> 8,080<td align=right>20,100<td align=right>75,200<td align=right>150,000<td align=right>132,000
|
16 | 38 | <tr><td> <a href="http://www.google.com/search?q=java+norvig+russell+%22Modern+Approach%22">java </a><td align=right> 1,990<td align=right>4,930<td align=right>44,200<td align=right>37,000<td align=right>50,000
|
17 | 39 | <tr><td> <a href="http://www.google.com/search?q=c%2B%2B+norvig+russell+%22Modern+Approach%22">c++ </a><td align=right> 875<td align=right>1,820<td align=right>35,300<td align=right>105,000<td align=right>35,000
|
|
0 commit comments