Constraint Satisfaction Problems: Lecture Notes - Prof. Introduction to Artificial Intelli, Summaries of Material Engineering

Introduction to Artificial Intelligence

Typology: Summaries

2020/2021

Uploaded on 03/20/2022

nguyen-trung-nhan-b2012237
nguyen-trung-nhan-b2012237 🇻🇳

5

(1)

1 document

1 / 77

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ICS-271:Notes 5: 1
Set 5: Constraint Satisfaction Problems
Chapter 6 R&N
ICS 271 Fall 2016
Kalev Kask
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d

Partial preview of the text

Download Constraint Satisfaction Problems: Lecture Notes - Prof. Introduction to Artificial Intelli and more Summaries Material Engineering in PDF only on Docsity!

Set 5: Constraint Satisfaction Problems

Chapter 6 R&N

ICS 271 Fall 2016 Kalev Kask

Outline

  • The constraint network model
    • Variables, domains, constraints, constraint graph, solutions
  • Examples:
    • graph-coloring, 8-queen, cryptarithmetic, crossword puzzles, vision problems,scheduling, design
  • The search space and naive backtracking,
  • The constraint graph
  • Consistency enforcing algorithms
    • arc-consistency, AC-1,AC- 3
  • Backtracking strategies
    • Forward-checking, dynamic variable orderings
  • Special case: solving tree problems
  • Local search for CSPs

A B

red green red yellow green red green yellow yellow green yellow red

Constraint Satisfaction

Example: map coloring

Variables - countries (A,B,C,etc.)

Values - colors (e.g., red, green, yellow)

Constraints: AB , AD , DE , e tc.

C

A

B

D

E

F

G

Hard vs Soft Constraints

  • Hard constraints : must be satisfied
    • Satisfaction problem
  • Soft constraints : capture preferences
    • Optimization problem

Sudoku

Each row, column and major block must be all different

“Well posed” if it has unique solution: 27 constraints

Example : The 4-queen problem

Q

Q

Q

Q Q

Q

Q

Q

Place 4 Queens on a chess board of 4x4 such that no two queens reside in the same row, column or diagonal.

Standard CSP formulation of the problem:

  • Variables : each row is a variable.

Q

Q

Q

Q

X 1

X 4

X 3

X 2

  • Domains : Di { 1 , 2 , 3 , 4 }.
  • Constraints : There are ( 42 ) = 6 constraints involved: R 12 {( 1 , 3 )( 1 , 4 )( 2 , 4 )( 3 , 1 )( 4 , 1 )( 4 , 2 )} R 13 {( 1 , 2 )( 1 , 4 )( 2 , 1 )( 2 , 3 )( 3 , 2 )( 3 , 4 )( 4 , 1 )( 4 , 3 )} R 14 {( 1 , 2 )( 1 , 3 )( 2 , 1 )( 2 , 3 )( 2 , 4 )( 3 , 1 )( 3 , 2 )( 3 , 4 )( 4 , 2 )( 4 , 3 )} R 23 {( 1 , 3 )( 1 , 4 )( 2 , 4 )( 3 , 1 )( 4 , 1 )( 4 , 2 )} R 24 {( 1 , 2 )( 1 , 4 )( 2 , 1 )( 2 , 3 )( 3 , 2 )( 3 , 4 )( 4 , 1 )( 4 , 3 )} R 34 {( 1 , 3 )( 1 , 4 )( 2 , 4 )( 3 , 1 )( 4 , 1 )( 4 , 2 )} - Constraint Graph : X 1

X (^2) X 4

X 3

Class scheduling/Timetabling

But only dn^ unique assignments