Presentation on theme: "Announcements Course TA: Danny Kumar"— Presentation transcript:
1Announcements Course TA: Danny Kumar (email@example.com) Guest lectures next weekAssignment 1 out, due Tuesday, September 14Course discussion boardYou should be able to find the discussion thread “AI in the news/on the Web” on BlackboardFor participation points: at least two posts during the semester
3SearchWe will consider the problem of designing goal-based agents in observable, deterministic, discrete, known environmentsExample:Start stateGoal state
4SearchWe will consider the problem of designing goal-based agents in observable, deterministic, discrete, known environmentsThe solution is a fixed sequence of actionsSearch is the process of looking for the sequence of actions that reaches the goalOnce the agent begins executing the search solution, it can ignore its percepts (open-loop system)
5Search problem components Initial stateActionsTransition modelWhat is the result of performing a given action in a given state?Goal statePath costAssume that it is a sum of nonnegative step costsThe optimal solution is the sequence of actions that gives the lowest path cost for reaching the goalInitialstateGoal state
6Example: Romania On vacation in Romania; currently in Arad Flight leaves tomorrow from BucharestInitial stateAradActionsGo from one city to anotherTransition modelIf you go from city A to city B, you end up in city BGoal stateBucharestPath costSum of edge costs
7State spaceThe initial state, actions, and transition model define the state space of the problemThe set of all states reachable from initial state by any sequence of actionsCan be represented as a directed graph where the nodes are states and links between nodes are actionsWhat is the state space for the Romania problem?
8Example: Vacuum world States Agent location and dirt location How many possible states?What if there are n possible locations?ActionsLeft, right, suckTransition model
10Example: The 8-puzzle Optimal solution of n-Puzzle is NP-hard States Locations of tiles8-puzzle: 181,440 states15-puzzle: 1.3 trillion states24-puzzle: 1025 statesActionsMove blank left, right, up, downPath cost1 per moveOptimal solution of n-Puzzle is NP-hard
11Example: Robot motion planning StatesReal-valued coordinates of robot joint anglesActionsContinuous motions of robot jointsGoal stateDesired final configuration (e.g., object is grasped)Path costTime to execute, smoothness of path, etc.
13Search Given: How do we find the optimal solution? Initial stateActionsTransition modelGoal statePath costHow do we find the optimal solution?How about building the state space and then using Dijkstra’s shortest path algorithm?The state space is huge!Complexity of Dijkstra’s is O(E + V log V), where V is the size of the state space
14Tree SearchLet’s begin at the start node and expand it by making a list of all possible successor statesMaintain a fringe or a list of unexpanded statesAt each step, pick a state from the fringe to expandKeep going until you reach the goal stateTry to expand as few states as possible
15… Search tree “What if” tree of possible actions and outcomes Starting stateSuccessor stateActionGoal state“What if” tree of possible actions and outcomesThe root node corresponds to the starting stateThe children of a node correspond to the successor states of that node’s stateA path through the tree corresponds to a sequence of actionsA solution is a path ending in the goal stateNodes vs. statesA state is a representation of a physical configuration, while a node is a data structure that is part of the search tree
16Tree Search Algorithm Outline Initialize the fringe using the starting stateWhile the fringe is not emptyChoose a fringe node to expand according to search strategyIf the node contains the goal state, return solutionElse expand the node and add its children to the fringe
20Search strategiesA search strategy is defined by picking the order of node expansionStrategies are evaluated along the following dimensions:Completeness: does it always find a solution if one exists?Optimality: does it always find a least-cost solution?Time complexity: number of nodes generatedSpace complexity: maximum number of nodes in memoryTime and space complexity are measured in terms ofb: maximum branching factor of the search treed: depth of the least-cost solutionm: maximum length of any path in the state space (may be infinite)
21Uninformed search strategies Uninformed search strategies use only the information available in the problem definitionBreadth-first searchUniform-cost searchDepth-first searchIterative deepening search