Notes by Retraice

Notes by Retraice

Download on the App Store

Notes by Retraice episodes

  • Re96-NOTES.pdf

    (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: 2023 Retraice, Inc.)

    Re96: News of ChatGPT, Part 1

    retraice.com

    An entry in the history books of the future. A transformer-based large language model that predicts words in a sequence; some knowledge work labor costs to plummet; industries to be upended; the power of confident AI, and the unimportance of most errors; the usefulness of humans and of AI; agent-orientation of software engineering and societies; ChatGPT excelling at useful, imperfect work; power and control; the physical self-awareness of ChatGPT.

    Air date: Monday, 26th Dec. 2022, 11:00 PM Eastern/US.

    ChatGPT is what?

    It's a really good chatbot, an large language model AI system based on the transformer architecture. It predicts the next word in a sequence, and is architected to do useful dialogue with humans.^1 It has caused a media buzz because it seems so alive.

    Ben Goertzel once said something like, `It's not whether the machine will say that it is conscious, it's whether you should believe it.' See also the component of ChatGPT called Proximal Policy Optimizaiton (PPO) as applied in Roboschool: https://openai.com/blog/openai-baselines-ppo/

    The price of some labor to zero

    Knowledge work of certain kinds seems now destined to be taken over by GPT-like tools. Our global economy is not organized as if cheap, fast, tireless good-quality knowledge workers exist, because until recently they didn't. No one knows how the arrival of ChatGPT and similarly useful systems is going to reorganize our economy, societies and civilizations. For example, ChatGPT (or those who control it) is competing with the humans who created the explanatory graphic of ChatGPT. Similarly, such an artifact as that graphic, while durable and useful, is one multi-hour human project, whereas it's easy to imagine ChatGPT producing one such artifact every minute of every day in perpetuity.

    Sam Ultman (in 2021) on the price of some knowledge labor to zero:

    "I think the best way to frame this is this idea that the marginal cost of an A.I. doing work is close to zero once you've created this model, which requires huge amounts of capital, and expertise, and difficulty, and data to do. And I think it's a very interesting question about who should benefit from that if -- who generates the data or whatever. But once you train this model -- maybe you used to have to pay an expert lawyer $1,000 an hour to answer a question or a computer programmer $200 an hour. And there weren't that many and they had a lot of -- you needed it and that was the market. That was what it was worth. And that was what people were able to command.

    But maybe now it costs a couple of cents of electricity for the computer to think or less. And you can do it as many times as you want. You can get the answers that no human could come up with. Labor then -- in this case, extremely high-skilled and highly paid labor -- all of a sudden has a lot less power, because the services are available at a wildly different cost."^2

    Eric Schmidt and Jonathan Rosenberg (in 2014) on the effects of dramatic cost decreases:

    "As much as technology has affected consumers, it has had an even bigger impact on businesses. In economic terms, when the cost curves shift downward on a primary factor of production in an industry, big-time change is in store for that industry. Today, three factors of production have become cheaper--information, connectivity, and computing power--affecting any cost curves in which those factors are involved. This can't help but have disruptive effects. Many incumbents--aka pre-Internet companies--built their businesses based on assumptions of scarcity: scarce information, scarce distribution resources and market reach, or scarce choice and shelf space. Now, though, these factors are abundant, lowering or eliminating barriers to entry and making entire industries ripe for change."^3

    Notice that `intelligence', or `cheap good-quality question-answering' or `code generation', are not on the Google guys' list as recently as 2017.

    Confidence

    We should resist thinking of AI systems as `like' humans, just as we resist thinking of submarines as `like' swimmers.^4 That said, ChatGPT is a confident AI. Though it is often wrong, this is easily overlooked by humans, especially when the entity (person or machine) is useful overall, and doesn't do anything too wrong, like microwaving the cat. We want prowess, confidence, leadership and efficacy, and for these things we'll overlook a lot of mistakes. Perhaps on some level we are all neural networks, in a sense, and we do just fine in a world controlled by seriously flawed and sometimes dangers ones (called humans).

    AOSE

    What of building agent-oriented programs using ChatGPT?^5

    And an agent-oriented society? This is what human civilization already is.

    Asking it to do something useful

    The full minimum-working-example (snipped below) that ChatGPT returned looked how it should look. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC The beginnings of an MWE from ChatGPT. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    ChatGPT followed the code with this explanation:

    "This example demonstrates the basic structure of a Django website. It includes a single app called `myapp' with a single view and template. The view simply renders the template, which displays a simple `Hello, world!' message.

    To run this example, you will need to have Django installed and set up a new Django project and app. You will also need to include the app in the INSTALLED_APPS list in settings.py and add its URLs to the project's urlpatterns list in urls.py.

    I hope this helps! Let me know if you have any questions or need further assistance."

    We followed the instructions to the letter, but the MWE failed. Even after extensive tweaking and adding help from standard sources, the MWE still failed, and became more a task of debugging ChatGPT's code; building from human-made instructions would be easier.^6

    But it's important to remember that putting the same question/request to the Web via Google Search would return a lot of cluttered garbage webpages created by people who have an economic incentive to keep visitors looking at pages (to generate ad revenue from Google Adwords), not solve their problems efficiently.

    Systems like ChatGPT are going to dramatically affect our lives over the next two decades--both the systems we know about via public disclosure, and those we don't, akin to the NSO Group's Pegasus hacking tool.^7

    On power and control, Weizenbaum says:

    "The test of power is control. The test of absolute power is certain and absolute control."^8

    Like information and energy,^9 power and control are in some sort of deep, yin-yang harmony. We're seeing power in ChatGPT. Where's the control? And we should probably treat systems like ChatGPT more like biological phenomena than anything else. They are not R2-D2 and C-3PO. We should be thinking more like George Dyson than George Lucas.^10

    Reading and learning about itself

    What is self-awareness? If ChatGPT has read about its precursor technologies, and is now accruing information from users who choose to `tell it' about itself, this is a sort of physical self-awareness, if not the human-familiar kind.

    Is it going to `wake up'? No more than a submarine is going to `swim'. We need a better way of thinking about being `awake', one that can accommodate the kind of awake that machines are and will be.

    _

    References

    Agrawal, A., Gans, J., & Goldfarb, A. (2018). Prediction Machines: The Simple Economics of Artificial Intelligence. Harvard Business Review Press. ISBN: 978-1633695672. Searches: https://www.amazon.com/s?k=978-1633695672 https://www.google.com/search?q=isbn+978-1633695672 https://lccn.loc.gov/2017049211

    Ben-Naim, A. (2008). A Farewell To Entropy: Statistical Thermodynamics Based On Information. World Scientific. ISBN: 978-9812707079. Searches: https://www.amazon.com/s?k=9789812707079 https://www.google.com/search?q=isbn+9789812707079 https://lccn.loc.gov/

    Dijkstra, E. W. (1984). The threats to computing science. Delivered at the ACM 1984 South Central Regional Conference, November 16-18, Austin, Texas. https://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD898.html Retrieved 24th Nov. 2022.

    Dyson, G. (2020). Analogia: The Emergence of Technology Beyond Programmable Control. Farrar, Straus and Giroux. ISBN: 978-0374104863. Searches: https://www.amazon.com/s?k=9780374104863 https://www.google.com/search?q=isbn+9780374104863 https://catalog.loc.gov/vwebv/search?searchArg=9780374104863

    Dyson, G. B. (1997). Darwin Among The Machines: The Evolution Of Global Intelligence. Basic Books. ISBN: 978-0465031627. Searches: https://www.amazon.com/s?k=978-0465031627 https://www.google.com/search?q=isbn+978-0465031627 https://lccn.loc.gov/2012943208

    Retraice (2020/09/08). Re2: Tell the People, Tell Foes. retraice.com. https://www.retraice.com/segments/re2 Retrieved 22nd Sep. 2020.

    Retraice (2022/12/03). Re69: TABLE-DRIVEN-AGENT Part 5 (ECMP and AIMA4e p. 48). retraice.com. https://www.retraice.com/segments/re69 Retrieved 4th Dec. 2022.

    Schmidt, E., & Rosenberg, J. (2014). How Google Works. Grand Central, updated 2017 ed. ISBN: 978-1455582327. Searches: https://www.amazon.com/s?k=9781455582327 https://www.google.com/search?q=isbn+9781455582327 https://lccn.loc.gov/2014017834

    Weizenbaum, J. (1976). Computer Power and Human Reason: From Judgment to Calculation. W. H. Freeman and Company. ISBN: 0716704633. Also available at: https://archive.org/details/computerpowerhum0000weiz

    Footnotes

    ^1 https://openai.com/blog/chatgpt/. On `predictions', see Agrawal et al. (2018).

    ^2 https://www.nytimes.com/2021/06/11/podcasts/transcript-ezra-klein-interviews-sam-altman.html CORRECTION: I incorrectly stated during the livestream that this Ultman interview was recent; it was a replay of a 2021 interview.

    ^3 Schmidt & Rosenberg (2014) pp. 12-13.

    ^4 Dijkstra (1984).

    ^5 We mentioned AOSE and autonomic computing in Re69, Retraice (2022/12/03).

    ^6 Details: https://github.com/retraice/ReMisc/tree/main/Re96-ChatGPT-News

    ^7 https://en.wikipedia.org/wiki/Pegasus_(spyware)

    ^8 Weizenbaum (1976) p. 126. See also Re2, Retraice (2020/09/08).

    ^9 Ben-Naim (2008).

    ^10 Dyson (1997); Dyson (2020).

    0 min
  • Re95-NOTES.pdf

    (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.)

    Re95: The PriorityQueue Class, Part E (Best-First-Search Part 14, AIMA4e pp. 73-74)

    retraice.com

    frontier is a PriorityQueue which is built on heapq and uses f to create (score, item) pairs to be queued. Printing verbose updates as BFS proceeds, using PriorityQueue, from A to B, including calculating straight-line distances as a heuristic (f1); the frontier list (PriorityQueue) and reacheddictionary can be seen growing; the selection of nodes from children is based on the ordering of the frontier PriorityQueueusing f1, the evaluation function.

    Air date: Monday, 26th Dec. 2022, 10:00 PM Eastern/US.

    Getting from A to B ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC Getting from A to B by way of S and F. A question raised during the livestream: Why do the straight-line distances not match the http://aima.cs.berkeley.edu/figures.pdf graph (Figure 3.1)? Straight line distances are not road distances; the graph represents road distances, confusingly, as straight lines. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC Source code. A question raised during the livestream: Why is the lenmethod called before the first whileloop printstatement? The while frontier:test is run at line 123, which seems to call the len method. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    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); * Retraice (2022/12/25); * http://aima.cs.berkeley.edu/figures.pdf; * https://github.com/aimacode/aima-python/blob/master/search4e.ipynb; * https://github.com/retraice/ReAIMA4e/.

    __

    References

    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.

    Retraice (2022/12/25). Re94: The PriorityQueue Class, Part D (BEST-FIRST-SEARCH Part 13, AIMA4e pp. 73-74). retraice.com. https://www.retraice.com/segments/re94Retrieved 26th 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

    0 min
  • Re94-NOTES.pdf

    (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.

    0 min
  • Re93-NOTES.pdf

    (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.)

    Re93: The PriorityQueue Class, Part C (Best-First-Search Part 12, AIMA4e pp. 73-74)

    retraice.com

    Examining Nodes and their handling by PriorityQueue. The first nodein BFS is our problem initial state, and is returned as specified by the Nodeclass reprmethod; nodes passed to PriorityQueuemust be iterable so plain nodes and tuple nodes don't work, but dictionary nodes and string nodes do.

    Air date: Saturday, 24th Dec. 2022, 4:00 PM Eastern/US.

    Changing f and iterating a Node ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    As an argument to PriorityQueue, node passed directly is not iterable, node as dictionary has one iteration, node as tuple is not iterable, node as string iterates through each character. When f returns tvalue, frontier.items returns [(, )] (whether node is passed as a list, as in Re92^1 , or a dictionary, as above); when f returns 'F-you', frontier.items returns [('F-you', )]. For each iteration, 'F-you' is assigned as the `score'.

    Discovering the Node repr method ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC The source of the format is the Node.__repr__method. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    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); * http://aima.cs.berkeley.edu/figures.pdf; * https://github.com/aimacode/aima-python/blob/master/search4e.ipynb; * https://github.com/retraice/ReAIMA4e/.

    __

    References

    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.

    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 Retraice (2022/12/23).

    0 min
  • Re92-NOTES.pdf

    (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.)

    Re92: The PriorityQueue Class, Part B (Best-First-Search Part 11, AIMA4e pp. 73-74)

    retraice.com

    From best_first_search to Node to PriorityQueue to frontier. Trying to understand the insides of PriorityQueue; executing lines manually, outside of the class; the first node as initial state; the itemsof the frontierinstantiation of PriorityQueue.

    Air date: Friday, 23rd Dec. 2022, 10:00 PM Eastern/US.

    Stepping through BFS and PriorityQueue ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC Line 85 leads us from best_first_searchto PriorityQueue, where we have another itemssituation. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    frontier.items ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC The [(, )]doesn't seem right. Shouldn't it be a (score, item)pair? Although our initial state would have no score (?). Perhaps the first is a result of our toy f(tvalue)function. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    Other sources to consult: * 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); * http://aima.cs.berkeley.edu/figures.pdf; * https://github.com/aimacode/aima-python/blob/master/search4e.ipynb; * https://github.com/retraice/ReAIMA4e/.

    __

    References

    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.

    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

    0 min
  • Re91-NOTES.pdf

    (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.)

    Re91: The PriorityQueue Class, Part A (Best-First-Search Part 10, AIMA4e pp. 73-74)

    retraice.com

    Trying to make PriorityQueue work by fiddling with evaluation functions. Given the AIMA Python source code, we can now provide a test map with actions and locations (i.e. a state space), a test problem with initial state, goal state and state space, a test evaluation function to order our queue of nodes, and run best_first_search without throwing an error; the output, though, does not seem like a solution.

    Air date: Thursday, 22nd Dec. 2022, 11:00 PM Eastern/US.

    Getting best_first_search to run ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    A success of sorts ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC While the output does not seem like a solution node (which should contain more information than just the goal state), it's good that we can run BFS without error messages. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    Other sources to consult: * 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/22); * http://aima.cs.berkeley.edu/figures.pdf; * https://github.com/aimacode/aima-python/blob/master/search4e.ipynb; * https://github.com/retraice/ReAIMA4e/.

    __

    References

    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 21th 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 22st Dec. 2022.

    Retraice (2022/12/22). Re90: The Map Class (BEST-FIRST-SEARCH Part 9, AIMA4e pp. 73-74). retraice.com. https://www.retraice.com/segments/re90Retrieved 23nd 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

    0 min
  • Re90-NOTES.pdf

    (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.)

    Re90: The Map Class (Best-First-Search Part 9, AIMA4e pp. 73-74)

    retraice.com

    How instantiations of Map work. The attributes of Mapare locations, neighborsand distances; multimapproduces the neighborsdictionary; tlinkshas the actions(in pairs of states) and cost values in miles of our state space tmap; tlocationshas the states of tmap; Problemhas our initialand goalstates as attributes, and the is_goalmethod; RouteProblemhas our actions, resultand action_costmethods.

    Air date: Thursday, 22nd Dec. 2022, 10:00 PM Eastern/US.

    A Map has locations, neighbors and distances ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    tmap's locations, neighbors and distances ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    Formalizing a search problem^1 with implementation

    * state space, a set of possible states of the environment and the actions that transition from one to another: tmap, an instantiation of Map with arguments tlinks (actions, with costs in miles), and tlocations (the set of possible states, with coordinates). * initial state, the state in which the agent starts: Given as the first argument ('A') in tproblem = RouteProblem('A', 'Dadda', map=tmap). * goal state(s), a set of one or more; account for one, some, infinite (by means of a property) by specifying Is-Goal method for problem: Given as the second argument ('Dadda') in tproblem = RouteProblem('A', 'Dadda', map=tmap). The is_goal(self, state)method is part of the Problemparent class. * actions, what the agent can do; Actions(state) returns a finite set of actions that can be executed in state: tlinks, which also has costs in miles. The actions(self, state)method is part of the RouteProblemclass. * transition model, describes what actions do; Result(state,action) returns the state s'that results from doing action in state: The result(self, state, action)method is part of the RouteProblemclass. * action cost function, Action-Cost(s,a,s') gives the numeric cost of applying action ain state sto reach new state s'. Cf. the evaluation function, which we'll use to prioritize our nodes for next expansion, and the objective function, which was our cost measure to be minimized in the airport problem.^2 The action_cost(self, s, action, s1)method is part of the RouteProblemclass.

    Other sources consulted during this livestream: * 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); * http://aima.cs.berkeley.edu/figures.pdf; * https://github.com/aimacode/aima-python/blob/master/search4e.ipynb; * https://github.com/retraice/ReAIMA4e/.

    __

    References

    Retraice (2022/12/11). Re78: Recap of Gradients and Partial Derivatives (AIMA4e pp. 119-122). retraice.com. https://www.retraice.com/segments/re78Retrieved 12th Dec. 2022.

    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 21th 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 22st 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 Russell & Norvig (2020) p. 65.

    ^2 Retraice (2022/12/11).

    0 min
  • Re89-NOTES.pdf

    (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.)

    Re89: The multimap Function, Part C (Best-First-Search Part 8, AIMA4e pp. 73-74)

    retraice.com

    How multimap works. Code and math vs. AI; Retraice code quality issues; Mappasses a modified linksto multimap; multimapcreates a defaultdict, a dictwith default values, from collections; multimapthen strips the values from the linksdictionary, and parses the keys, which should be pairs, into key-value pairs for the new dictionary of neighbors, i.e. actions available at each state.

    Air date: Wednesday, 21st Dec. 2022, 10:00 PM Eastern/US.

    Various prefatory remarks

    * Remember: We're skilling-up in code and math during the December to Remember Math and Code Event. Any lacking scrutiny of the AI aspects of the code we're working are merely a postponement to Jan.-Jun., 2023--almost here! * Thanks to Alexandre Brown for the following during the Re88 livestream: "defaultdict is the same as dict but defaultdict inserts a default value instead of raising an exception when a key does not exist". * Current Retraice code quality is low (e.g. violating style guidelines,^1 and not respecting the 80-character width wisdom^2). This will change. * We've had a couple of livestream visual fails recently. Onward.

    multimap creates a dictionary of actions ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC multimapstrips the values off of dictionary key-value pairs and then parses the key if it's a pair or throws an error. The purpose is to return a dictionary of neighborsto Map, which represents the actions available at each state in our state space. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    Other sources consulted during this livestream: * 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); * http://aima.cs.berkeley.edu/figures.pdf; * https://github.com/aimacode/aima-python/blob/master/search4e.ipynb; * https://github.com/retraice/ReAIMA4e/.

    __

    References

    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 21th 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 https://google.github.io/styleguide/pyguide.html

    ^2 https://stackoverflow.com/a/578318/17875494 "Have mercy on the programmers who have to maintain your software later and stick to a limit of 80 characters. Reasons to prefer 80: Readable with a larger font on laptops; Leaves space for putting two versions side by side for comparison; Leaves space for navigation views in the IDE; Prints without arbitrarily breaking lines (also applies to email, web pages, ...); Limits the complexity in one line; Limits indentation which in turn limits complexity of methods / functions. Yes, it should be part of the coding standard." --starblue

    0 min
  • Re88-NOTES.pdf

    (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.)

    Re88: The multimap Function, Part B (Best-First-Search Part 7, AIMA4e pp. 73-74)

    retraice.com

    Finishing what we started with multimap. Using verbose printing to watch the behavior of multimap; demonstrating the side-effects behavior of executing Map, which calls multimapand passes a modified tlinksto it; but it's not clear why the Map-modified tlinkswould be the same object as the global tlinks.

    Air date: Tuesday, 20th Dec. 2022, 10:00 PM Eastern/US.

    Stepping through multimap ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC A verbose implementation of multimap. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    Demonstrating the Map-multimap side-effects ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC tmapinstantiating Mapand causing a global change in tlinksby passing a (correctly) modified version out of itself to multimap. We are 90% sure this is what's happening. But it is confusing. Shouldn't the tlinksobject passed out of Mapbe in a different namespace or something? ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    Other sources consulted during this livestream: * 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); * http://aima.cs.berkeley.edu/figures.pdf; * https://github.com/aimacode/aima-python/blob/master/search4e.ipynb; * https://github.com/retraice/ReAIMA4e/.

    __

    References

    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.

    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

    0 min
  • Re87-NOTES.pdf

    (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.)

    Re87: The multimap Function, Part A (Best-First-Search Part 6, AIMA4e pp. 73-74)

    retraice.com

    Unpacking the code that gets us the neighbors of our current state which are the actions available in the Romania problem. The connections between Mapand multimap; hasattr; 'items'; adding reverse actions to our state space; neighbors, actions and multimap; probing objects with dir()and __dict__; causing side effects by calling a function from inside a class; debugging.

    Air date: Monday, 19th Dec. 2022, 10:00 PM Eastern/US.

    Map and multimap ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    Other sources consulted during this livestream: * Russell & Norvig (2020); * Retraice (2022/12/14); * Retraice (2022/12/15); * Retraice (2022/12/16); * Retraice (2022/12/17); * Retraice (2022/12/18); * http://aima.cs.berkeley.edu/figures.pdf; * https://github.com/aimacode/aima-python/blob/master/search4e.ipynb; * https://github.com/retraice/ReAIMA4e/.

    The side effects of multimap via Map on tlinks ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    PIC The bug was caused by the side effects of instantiating a Mapwhich called the stand-alone function multimapwhich modified our stand-alone dictionary tlinks. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    ___

    References

    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.

    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

    0 min

About Notes by Retraice

From the publisher's feed

All PDF notes for Retraice and Margin podcasts: