• Sonuç bulunamadı

Yapay Zeka 802600715151

N/A
N/A
Protected

Academic year: 2021

Share "Yapay Zeka 802600715151"

Copied!
11
0
0

Yükleniyor.... (view fulltext now)

Tam metin

(1)

Yapay Zeka 802600715151

Doç. Dr. Mehmet Serdar GÜZEL

Slides are mainly adapted from the following course page:

at http://ai.berkeley.edu created by Dan Klein and Pieter Abbeel for CS188

(2)

Lecturer

 Instructor: Assoc. Prof Dr. Mehmet S Güzel

Office hours: Tuesday, 1:30-2:30pm

Open door policy – don’t hesitate to stop by!

 Watch the course website

Assignments, lab tutorials, lecture notes

 slid e 2

(3)

Depth-First Search

(4)

Depth-First Search

 

• Depth-first search is a recursive algorithm for traversing a tree or graph data structure.

• It is called the depth-first search because it starts from the root node and follows each path to its greatest depth node before moving to the next path.

• DFS uses a stack data structure for its implementation.

• The process of the DFS algorithm is similar to the BFS algorithm.

(5)

Depth-First Search

(6)

Breadth-First Search

(7)

Breadth-First Search

(8)

Breadth-First Search

S

a b

d p

a c

e

p h

f r q

q c G

a e q

p h

f r q

q c G

a

S

G

d b

p q

c e h a

f r

Search

Tiers

Strategy: expand a

shallowest node first

Implementation: Fringe

is a FIFO queue

(9)

Breadth-First Search (BFS) Properties

 What nodes does BFS expand?

Processes all nodes above shallowest solution

Let depth of shallowest solution be s

Search takes time O(b

s

)

 How much space does the fringe take?

Has roughly the last tier, so O(b

s

)

 Is it complete?

s must be finite if a solution exists, so yes!

 Is it optimal?

Only if costs are all 1 (more on costs later)

… b 1 node

b nodes b

2

nodes

b

m

nodes s tiers

b

s

nodes

(10)

DFS vs BFS

(11)

Cost-Sensitive Search

BFS finds the shortest path in terms of number of actions.

It does not find the least-cost path. We will now cover a similar algorithm which does find the least-cost path.

START

GOAL

d b

p q

c

e

h a

f

r 2

9 2

8 1

8 2

3

2 4

4 15 1

3 2

2

Referanslar

Benzer Belgeler

Analytical methods are classified according to the measurement of some quantities proportional to the quantity of analyte. Classical Methods and

Pac-Man is a registered trademark of Namco-Bandai Games, used here for educational purposes Demo1: pacman-l1.mp4

 Backtracking is an algorithmic-technique for solving problems recursively by trying to build a solution incrementally, one piece at a time, removing those solutions that fail

 Go: Human champions are now starting to be challenged by machines, though the best humans still beat the best machines.. In go, b

The Palestinian authorities have been in the pursuit of international recognition especially after Israel got recognized in the international community and the armed struggle

We compare growth and aortic root geometry in patients who have undergone relief of discrete SAS using either single-or three-patch technique.. Methods: Twenty-five patients (14

Consequently, the governing Turkish political elite perceives peace operations in the Middle East and Africa instrumentally, as means to increase Turkey ’s power and prestige in

The major contribution of the paper can be stated as follows: In a neural network based learning task of distributed data, it is possible to obtain an accuracy almost as good as the