
Sign up to save your podcasts
Or


(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.)
Re66: TABLE-DRIVEN-AGENT Part 2 (AIMA4e p. 48)
retraice.com
A basic agent program in both AIMA4e pseudocode and Python.
Air date: Wednesday, 30th Nov. 2022, 11:00 PM Eastern/US.
We're focusing on the math and code of Russell & Norvig (2020).
Terminology tweaks from yesterday
The below definitions and descriptions are still works in progress, especially the last one. * We `initialize' objects in memory, not `initiate' them; * dictionary: in Python, a type of container (an alternative to a variable that organizes data) e.g. lists, tuples, dictionaries;^1 an implementation of the `associative array' data structure.^2 * `memory object': should have probably said `data in memory' or `file' or whatever. Cf. Althoff: "In Python, each data value, like 2 or `Hello, World!' [data type str for string], is called an object." Objects, in this context, have three properties:
1. identity (location in memory, never changes);
2. data type (category of data which determines properties it has, never changes);
3. value (the data it represents, number 2 represents value 2).^3
* computer program function: A software input-output machine: "A program unit that given values for input parameters computes a value."^4 * mathematical function: A relation between two sets: "[A mapping] from one set X to another set Y . A relation R defined on the Cartesian product x×y in which for each element x in X there is precisely one element y in Y with the property that (x,y) is a member of R."^5 * *CORRECTION*: The `agent function' is not `the smart part' of the agent program. "The agent function is an abstract mathematical description.... that maps any percept sequence to an action"; "the agent program is a concrete implementation [of the agent function], running within some physical system." (100!black!//Russell & Norvig (2020) pp. 37-37) Function: math. Program: code. [Correction at Jan 2nd, 2023.] * intelligent agent function: The input-output (percept:action) table (or whatever) that makes a dumb program (in which the program steps are specified by the programmer to yield a specific result in isolation) smart^6 (in which the program steps include an element, the implemented agent function, that makes the result dependent upon percepts from the environment and seem to reflect intelligence).^7
Working TABLE-DRIVEN-AGENT code
See figure below.
ABC: Always be coding
If the computer control game is player-oriented, reading code is to writing code what X's-and-O's is to on-field gameplay. The only way to calibrate, to see if you can do what you think you can do, is to code it. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PIC TABLE-DRIVEN-AGENT pseudocode, AIMA Python, and three Retraice iPython demonstrations ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
__
References
Althoff, C. (2017). The Self-Taught Programmer: The Definitive Guide to Programming Professionally. Triangle Connection. ISBN: 978-0999685907. Searches: https://www.amazon.com/s?k=9780999685907 https://www.google.com/search?q=isbn+9780999685907 https://www.theselftaughtprogrammer.io/
Barlow, H. B. (2004). Guessing and intelligence. (pp. 382-384). In Gregory (2004).
Butterfield, A., & Ngondi, G. E. (Eds.) (2016). A Dictionary of Computer Science. Oxford University Press, Kindle, 7th ed. ISBN: 978-0191002885. Searches: https://www.amazon.com/s?k=9780191002885 https://www.google.com/search?q=isbn+9780191002885 https://lccn.loc.gov/2015952805
Gregory, R. L. (Ed.) (2004). The Oxford Companion to the Mind. Oxford University Press, 2nd ed. ISBN: 0198662246. Searches: https://www.amazon.com/s?k=0198662246 https://www.google.com/search?q=isbn+0198662246 https://lccn.loc.gov/2004275127
Kissinger, H. A., Schmidt, E., & Huttenlocher, D. (2021). The Age of AI. Little, Brown and Company. ISBN: 978-0316273800. Searches: https://www.amazon.com/s?k=9780316273800 https://www.google.com/search?q=isbn+9780316273800 https://lccn.loc.gov/2021943914
Macphail, E. M. (1982). Brain and Intelligence in Vertebrates. Oxford. ISBN 0198545517. Searches: https://www.amazon.com/s?k=0198545517 https://www.google.com/search?q=isbn+0198545517 https://lccn.loc.gov/82166301
Retraice (2020/11/02). Re10: Living to Guess Another Day. retraice.com. https://www.retraice.com/segments/re10Retrieved 2nd Nov. 2020.
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 Althoff (2017) pp. 67, 76.
^2 https://realpython.com/python-dicts/
^3 Althoff (2017) p. 18.
^4 Butterfield & Ngondi (2016) p. 229.
^5 Butterfield & Ngondi (2016) p. 229
^6 Russell & Norvig (2020) p. 48.
^7 Cf. Kissinger et al. (2021) p. 58 on the difference between classical and machine learning algorithms. NOTE AND CORRECTION: I've been saying AI programs `improve on imprecise results', an idea I got from Kissinger et al. (2021) p. 58, but really they say that about machine learning algorithms, vs. classical algorithms. Can this be generalized to all AI code? Probably not. Especially if Barlow (2004) "says intelligence is about perception, not learning" (Retraice (2020/11/02)) and Macphail (1982) says "[there is no apparent correlation between learning and intelligence in many species]" (Retraice (2020/11/02)), quoting Retraice Notes, not Macphail or Barlow.
By Retraice, Inc.(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.)
Re66: TABLE-DRIVEN-AGENT Part 2 (AIMA4e p. 48)
retraice.com
A basic agent program in both AIMA4e pseudocode and Python.
Air date: Wednesday, 30th Nov. 2022, 11:00 PM Eastern/US.
We're focusing on the math and code of Russell & Norvig (2020).
Terminology tweaks from yesterday
The below definitions and descriptions are still works in progress, especially the last one. * We `initialize' objects in memory, not `initiate' them; * dictionary: in Python, a type of container (an alternative to a variable that organizes data) e.g. lists, tuples, dictionaries;^1 an implementation of the `associative array' data structure.^2 * `memory object': should have probably said `data in memory' or `file' or whatever. Cf. Althoff: "In Python, each data value, like 2 or `Hello, World!' [data type str for string], is called an object." Objects, in this context, have three properties:
1. identity (location in memory, never changes);
2. data type (category of data which determines properties it has, never changes);
3. value (the data it represents, number 2 represents value 2).^3
* computer program function: A software input-output machine: "A program unit that given values for input parameters computes a value."^4 * mathematical function: A relation between two sets: "[A mapping] from one set X to another set Y . A relation R defined on the Cartesian product x×y in which for each element x in X there is precisely one element y in Y with the property that (x,y) is a member of R."^5 * *CORRECTION*: The `agent function' is not `the smart part' of the agent program. "The agent function is an abstract mathematical description.... that maps any percept sequence to an action"; "the agent program is a concrete implementation [of the agent function], running within some physical system." (100!black!//Russell & Norvig (2020) pp. 37-37) Function: math. Program: code. [Correction at Jan 2nd, 2023.] * intelligent agent function: The input-output (percept:action) table (or whatever) that makes a dumb program (in which the program steps are specified by the programmer to yield a specific result in isolation) smart^6 (in which the program steps include an element, the implemented agent function, that makes the result dependent upon percepts from the environment and seem to reflect intelligence).^7
Working TABLE-DRIVEN-AGENT code
See figure below.
ABC: Always be coding
If the computer control game is player-oriented, reading code is to writing code what X's-and-O's is to on-field gameplay. The only way to calibrate, to see if you can do what you think you can do, is to code it. ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
PIC TABLE-DRIVEN-AGENT pseudocode, AIMA Python, and three Retraice iPython demonstrations ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
__
References
Althoff, C. (2017). The Self-Taught Programmer: The Definitive Guide to Programming Professionally. Triangle Connection. ISBN: 978-0999685907. Searches: https://www.amazon.com/s?k=9780999685907 https://www.google.com/search?q=isbn+9780999685907 https://www.theselftaughtprogrammer.io/
Barlow, H. B. (2004). Guessing and intelligence. (pp. 382-384). In Gregory (2004).
Butterfield, A., & Ngondi, G. E. (Eds.) (2016). A Dictionary of Computer Science. Oxford University Press, Kindle, 7th ed. ISBN: 978-0191002885. Searches: https://www.amazon.com/s?k=9780191002885 https://www.google.com/search?q=isbn+9780191002885 https://lccn.loc.gov/2015952805
Gregory, R. L. (Ed.) (2004). The Oxford Companion to the Mind. Oxford University Press, 2nd ed. ISBN: 0198662246. Searches: https://www.amazon.com/s?k=0198662246 https://www.google.com/search?q=isbn+0198662246 https://lccn.loc.gov/2004275127
Kissinger, H. A., Schmidt, E., & Huttenlocher, D. (2021). The Age of AI. Little, Brown and Company. ISBN: 978-0316273800. Searches: https://www.amazon.com/s?k=9780316273800 https://www.google.com/search?q=isbn+9780316273800 https://lccn.loc.gov/2021943914
Macphail, E. M. (1982). Brain and Intelligence in Vertebrates. Oxford. ISBN 0198545517. Searches: https://www.amazon.com/s?k=0198545517 https://www.google.com/search?q=isbn+0198545517 https://lccn.loc.gov/82166301
Retraice (2020/11/02). Re10: Living to Guess Another Day. retraice.com. https://www.retraice.com/segments/re10Retrieved 2nd Nov. 2020.
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 Althoff (2017) pp. 67, 76.
^2 https://realpython.com/python-dicts/
^3 Althoff (2017) p. 18.
^4 Butterfield & Ngondi (2016) p. 229.
^5 Butterfield & Ngondi (2016) p. 229
^6 Russell & Norvig (2020) p. 48.
^7 Cf. Kissinger et al. (2021) p. 58 on the difference between classical and machine learning algorithms. NOTE AND CORRECTION: I've been saying AI programs `improve on imprecise results', an idea I got from Kissinger et al. (2021) p. 58, but really they say that about machine learning algorithms, vs. classical algorithms. Can this be generalized to all AI code? Probably not. Especially if Barlow (2004) "says intelligence is about perception, not learning" (Retraice (2020/11/02)) and Macphail (1982) says "[there is no apparent correlation between learning and intelligence in many species]" (Retraice (2020/11/02)), quoting Retraice Notes, not Macphail or Barlow.