仓库源文站点原文


layout: post title: "AI 笔记 Week 03 Search" date: "2017-10-12 02:23:38" categories: 计算机科学 excerpt: "This week you should watch Lecture 2, Search, and read Chapter 3 in *AIM..."

auth: conge

This week you should watch Lecture 2, Search, and read Chapter 3 in AIMA (Russell & Norvig).

膜拜AI大神 Peter Norvig

challenge question

Which algorithm to choose to solve a tri-city problem?

Challenge 2 Rubik’s Cube

Readings Korf, 1997. Finding Optimal Solutions to Rubik's Cube Using Pattern Databases. God's Number is 26 in the Quarter-Turn Metric.

Introduction

Intro

Elements of a problem

Example Route Finding

Route finding problem

Tree Search

Tree search algorithm

Breadth-First Search

the next fronts from "sibiu"

Back-track path in Tree search

Graph Search

avoid repeated search

Quize: frontier to add if we visit Zerind

Quiz: what' the next state and is the problem solved?

Uniform Cost Search (AKA cheapest-first search)

Which path to choose?

which to expand to next?

Expand the cheapest path

expand rimnicu Vilcea

Expean Eugoj to Mehadia, and then Fagars to Bucharest

Search Comparison

Breadth-first V.S. Cheapest-first V.S. Depth-first

Find the search order and if the algorithm optimal

Is all the search algorithms are complete?

Complete means if the search tree or graph is infinite, the search algorithm can still manage to find the end goal.

Clarification on cheapest first search:

Consider an infinite path whose costs are as follows: 1 + 1/2 + 1/4 + 1/8 + 1/16 + 1/32 + ... The infinite sum of this series in the limit is 2. If the shortest path to the goal node has a cost greater than 2, the cheapest first search will be incomplete.

More On Uniform Cost

Uniform Cost will cost a lot of time when the search space is large.

Greedy best-first search

Greedy best-first search

Greedy best-first search with obstacles

A<sup>*</sup> Search

formula

example

Quiz: which path should we choose to explore next

keep spending with A*

expanding...

The algorithm does not stop when the agent add the goal state into the frontier

A* finds the optimal paths

Will A* always find the optimal?

  1. The algorithm does not stop when the agent adds the goal state into the frontier, it only finds the shortest path when the goal state was popped out of the frontier.
  2. A finds the optimal paths Will A always find the optimal?

Conditions h should meet

Optimistic Heuristic

Vacuum world

Quiz: State Spaces

How many states are in the space?

How many states are in the space?

all the states and connections between states

state space 2

Sliding Blocks Puzzle

Sliding Blocks

Which function is admissible? (what is admissible?)

Assume that a move in this game is moving a single block into the empty space (and cannot be a shift of multiple blocks).

Can the AI come up heuristic functions by itself?

Generate h function be relaxing constrains

Search only works when:

implementing Search

Readings

Challenge Question Revisited

challenge question

Peter's Take On AI

Definition of AI: program computer to do the right thing when you don't know that the right thing is.

20170907 first try, stopped at "sliding block" 150 min
20170908 finished the rest