Re90-NOTES.pdf
DEC 23, 2022
Description Community
About

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


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

 

Comments