6.01 Lecture Notes - Lecture 29: City Map, Successor Function, Branching Factor

5 views11 pages

Document Summary

We can use state machines as a convenient representation of state-space search problems. This is a search problem, analogous to determining the sequence of actions that can be taken to reach a goal state. The getnextvalues method of a state machine can serve as the successor function in a search (the inputs to the machine are the actions). The startstate attribute can serve as the initial state in the search and the done method of the machine can serve as the goal test function. Then, we can plan a sequence of actions to go from the start state to one of the done states using this function, where smtosearch is an instance of sm. sm. 310 def smsearch(smtosearch, initialstate = none, goaltest = none, maxnodes = 10000, depthfirst = false, dp = true): if initialstate == none: initialstate = smtosearch. startstate if goaltest == none: goaltest = smtosearch. done return search(initialstate, goaltest, smtosearch. legalinputs,

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions