03 Uninformed Search Algorithms Flashcards

1
Q

How do you define a search problem?

Initial State: where the agent starts i

Transition Model Result(s, a): returns result of action a in state s

Goal Test Is-Goal(s): …

A

State Space: set of possible states

Actions(s): possible actions that are applicable in a state s

checks whether s is a goal state

Action Cost (s, a, s’): cost of applying action a in state s to reach s’

(Examplifying the concepts on slides)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Tree-Like Search Algorithm

A

function Tree-Like-Search (problem) returns a solution or failure initialize the frontier using the initial state of problem
loop do
if the frontier is empty then return failure
choose a leaf node and remove it from the frontier
if the node contains a goal state then return the corresponding solution expand the chosen node, adding the resulting nodes to the frontier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Is it possible that graph search is slower than tree-like search?

What is the maximum number of steps required in graph search (according to slide 21)?

You have to assemble parts, and each part exists only once. What search technique would you use?

A

Yes, in graph search, each node is tracked to avoid revisiting nodes, which adds computational overhead to keep track of visited nodes==> graph search generally slower, but often more efficient in terms of memory usage and prevents redundant exploration of the same paths.

The number of edges of the graph.
In graph search, the worst-case scenario involves traversing all edges in the graph before reaching the goal. This is because graph search must explore every possible path without revisiting nodes unnecessarily, which could require examining each edge once.

Since each part exists only once, revisiting nodes would be redundant. Graph search is suitable here because it avoids re-exploring already-visited nodes, ensuring that each part is only considered once in the assembly sequence.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Generating a search tree

A

We are searching for an action sequence to a goal state. The possible actions from the initial state form the search tree:
Root: Initial state.
Branches: Actions.
Nodes: Reached states.
Leaves: Unexpanded nodes. We call the set of leaves the frontier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Avoiding cycles in the search tree

Problem: In the previous example, we went back to Arad from Sibiu: Expanding from Arad only contains repetitions of previous possibilities.

A

Only expand nodes that have not been visited before. Reached states are stored in a reached set.

Idea is referred to as graph search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Graph Search vs Search tree

A

see slides

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Measuring Problem-Solving Performance
Search Algorithms
We can evaluate the performance of a search algorithm using the following criteria:

A

Completeness: Is it guaranteed that the algorithm finds a solution if one exists?

Optimality: Does the strategy find the optimal solution (minimum costs)?

Time complexity: How long does it take to find a solution?

Space complexity: How much memory is needed to perform the search?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Structure of a node n
n.STATE: …
n.PARENT: The node in the search tree that generated this node;
n.ACTION: …
n.PATH-COST: The cost, traditionally denoted by g(n), of the path from the initial state to the node.

A

The state in the state space to which the node corresponds;

The action that was applied to the parent to generate the node;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Operations on a queue (required for the frontier)

Empty(queue): Returns true if ….

Pop(queue): Removes the …

Add(node, queue): Inserts a node and …

A

queue is empty;

first element of the queue and returns it;

returns the resulting queue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Uninformed Search vs. Informed Search

Uninformed search
No additional information besides the problem statement (states, initial state, actions, transition model, goal test, action cost) is provided.
Uninformed search can only produce next states and check whether it is a goal state.

A

Informed search
Strategies know whether a state is more promising than another to reach a goal.
Informed search uses measures to indicate the distance to a goal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly