仓库源文站点原文


layout: post title: "AI 笔记 Week 05 Constraint Satisfaction" date: "2017-10-12 02:23:52" categories: 计算机科学 excerpt: "This week: watch Lesson 4, Constraint Satisfaction, and read Chapter 6 i..."

auth: conge

This week: watch Lesson 4Constraint Satisfaction, and read Chapter 6 in AIMA (Russell & Norvig). Assignment 2: Tridirectional Search **Due: September 24! Here is the GitHub repo.  

I need to read the book to understand this chapter.


Constrint Satisfaction Problem

challenge question

Quiz: GSP Challenge Question

Map Coloring problem

map

The map-coloring problem has the following components:

  1. Variables
  2. Domains
  3. Constraints: or rules to specify the problem.

Constraint Graph

Map coloring

  1. Nodes are variables
  2. Arc (Edges) represents constraints.

quiz

quize: my answer

There are multiple solutions to the quiz. But all the solutions must follow the rules (satisfy the constraints).

Constraint Hypergraph for the challenge question

image.png

Backtracking Search

psuedo code

Example

There are ways to improve the search efficiency

  1. choose the least constraining value for each step
  2. choose the variable with the fewest legal values

Least constraining value

Minimum remaining values [Minimum remaining values]: or we can choose the middle-lower region because it has the least color to choose from. Degree Heuristic When there is a tie, a heuristic could be used to select the next step/ area to explore.

quiz

quiz

forward checking

forward checking

Arc Consistency

quiz Question: select all the possible values for each region and indicate whether the entire network arc consistent or not.

Structured CSPs

Structured CSPs

Conditioned CSP as tree

Iterative Algorithms

Iterative Algorithms

the challenge question

challenge question

can be resolved by forward-checking: checking the available domains for values.

s Readings

AIMA: Chapter 6