Repository navigation
Commit 0fec505
committed
Fix 3 pre-existing notebook logic bugs
- search.ipynb: cell 112 redefines hill_climbing as a TSP-specific version
(using two_opt), shadowing the library's generic one; the later Peak-Finding
section then called it on a PeakFindingProblem (no two_opt) and failed.
Re-import the library hill_climbing right before that section.
- chapter22/Parsing.ipynb: CYK_parse returns a probability table
(defaultdict(float)), but the cells called .leaves on the float values.
Display the probabilities instead (full table; VP entries).
- chapter19/Optimizer and Backpropagation.ipynb: pseudocode() is a string API
(e.g. pseudocode('Back-Prop-Learning')); pseudocode(adam) passed a function
and Adam has no aima-pseudocode entry. Dropped it; psource(adam) still shows
the implementation.
All three now run clean headless; no module changes (test suite unaffected).1 parent 09890ad commit 0fec505
3 files changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3479 | 3479 | | |
3480 | 3480 | | |
3481 | 3481 | | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
3482 | 3492 | | |
3483 | 3493 | | |
3484 | 3494 | | |
| |||
0 commit comments