Re94-NOTES.pdf
DEC 26, 2022
Description Community
About

(The below text version of the notes is for search purposes and convenience. See the PDF version for proper formatting such as bold, italics, etc., and graphics where applicable. Copyright: 2022 Retraice, Inc.)


Re94: The PriorityQueue Class, Part D
(Best-First-Search Part 13, AIMA4e pp. 73-74)

retraice.com

Making BFS and PriorityQueue chatty to increase our confidence in their output.
Printing messages throughout the execution of best_first_searchand PriorityQueue; the states of node, frontierand reachedas they change during execution; the attributes of a solution node.

Air date: Sunday, 25th Dec. 2022, 4:00 PM Eastern/US.

Printing messages to reveal the workings of BFS and PriorityQueue
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

PIC
A cleaner test problem and presentation than the one shown during the livestream. It also uses def f(Fnode): return round(tproblem.h(Fnode))for f, which should calculate the "Straight-line distance between state and the goal."
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

PIC
Source code.
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

PIC
The messy, original chatty version of BFS presented during the livestream.
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Transparency increases confidence

The messages enable us to see the changing states of lists and dictionaries, and when functions and methods are called, which seems to show the program doing what we want it to do. And printing the various attributes of the final node also seems to reveal a successful solution to our problem.

Our concern now is over-optimizing our understanding of the details of PriorityQueue at the expense of the larger body of preparation for studying AIMA4e.^1

Other sources to consult:
* https://docs.python.org/3/library/pdb.html
* Russell & Norvig (2020);
* Retraice (2022/12/14);
* Retraice (2022/12/15);
* Retraice (2022/12/16);
* Retraice (2022/12/17);
* Retraice (2022/12/18);
* Retraice (2022/12/19);
* Retraice (2022/12/20);
* Retraice (2022/12/21);
* Retraice (2022/12/22a);
* Retraice (2022/12/22b);
* Retraice (2022/12/23);
* Retraice (2022/12/24);
* http://aima.cs.berkeley.edu/figures.pdf;
* https://github.com/aimacode/aima-python/blob/master/search4e.ipynb;
* https://github.com/retraice/ReAIMA4e/.

__

References

Hamming, R. W. (2020). The Art of Doing Science and Engineering: Learning to Learn. Stripe Press. ISBN: 978-1732265172. Searches:
https://www.amazon.com/s?k=9781732265172
https://www.google.com/search?q=isbn+9781732265172

Retraice (2022/12/14). Re82: What is a problem? (BEST-FIRST-SEARCH Part 1, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re82Retrieved 15th Dec. 2022.

Retraice (2022/12/15). Re83: A Problem Instantiated (BEST-FIRST-SEARCH Part 2, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re83Retrieved 16th Dec. 2022.

Retraice (2022/12/16). Re84: A Node Instantiated (BEST-FIRST-SEARCH Part 3, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re84Retrieved 17th Dec. 2022.

Retraice (2022/12/17). Re85: The Details (BEST-FIRST-SEARCH Part 4, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re85Retrieved 18th Dec. 2022.

Retraice (2022/12/18). Re86: Code Reading (BEST-FIRST-SEARCH Part 5, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re86Retrieved 19th Dec. 2022.

Retraice (2022/12/19). Re87: The multimap Function, Part A (BEST-FIRST-SEARCH Part 6, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re87Retrieved 20th Dec. 2022.

Retraice (2022/12/20). Re88: The multimap Function, Part B (BEST-FIRST-SEARCH Part 7, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re88Retrieved 21st Dec. 2022.

Retraice (2022/12/21). Re89: The multimap Function, Part C (BEST-FIRST-SEARCH Part 8, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re89Retrieved 22nd Dec. 2022.

Retraice (2022/12/22a). Re90: The Map Class (BEST-FIRST-SEARCH Part 9, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re90Retrieved 23rd Dec. 2022.

Retraice (2022/12/22b). Re91: The PriorityQueue Class, Part A (BEST-FIRST-SEARCH Part 10, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re91Retrieved 24th Dec. 2022.

Retraice (2022/12/23). Re92: The PriorityQueue Class, Part B (BEST-FIRST-SEARCH Part 11, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re92Retrieved 24th Dec. 2022.

Retraice (2022/12/24). Re93: The PriorityQueue Class, Part C (BEST-FIRST-SEARCH Part 12, AIMA4e pp. 73-74). retraice.com.
https://www.retraice.com/segments/re93Retrieved 25th Dec. 2022.

Russell, S., & Norvig, P. (2020). Artificial Intelligence: A Modern Approach. Pearson, 4th ed. ISBN: 978-0134610993. Searches:
https://www.amazon.com/s?k=978-0134610993
https://www.google.com/search?q=isbn+978-0134610993
https://lccn.loc.gov/2019047498

Footnotes

^1 On systems engineering and over-optimizing components at the expense of system performance, see Hamming (2020) p. 362.

 

Comments