G52AIP Artificial Intelligence Programming - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

G52AIP Artificial Intelligence Programming

Description:

Constraint Optimisation Problems. Real world problems present to be messy ... Constraint optimisation problems (C,f) Constraint Satisfaction Problem (C) ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 29
Provided by: rxq
Category:

less

Transcript and Presenter's Notes

Title: G52AIP Artificial Intelligence Programming


1
G52AIPArtificial Intelligence Programming
Dr Rong Qu
  • Constraint Optimisation Problems

2
Constraint Satisfaction Problems
  • So far
  • All solutions are equally good
  • In some real world applications, we
  • Not only want feasible solutions, but also good
    solutions
  • We have different preferences on constraints
  • Problems are too constrained that there is no
    solution satisfying all constraints

3
Constraint Optimisation Problems
  • Real world problems present to be messy
  • In some cases a conflict-free solution is needed
  • All constraints must be satisfied
  • In some cases preferences are given, rather than
    constraints
  • Hard and soft constraints
  • In some cases, some constraints are more
    important than others
  • Constraints with different weights

4
Constraint Optimisation Problems
  • What are good solutions?
  • Objective function
  • Problem specific function
  • How much are constraints satisfied
  • Relatively new research
  • Scheduling
  • Timetabling
  • Resource allocations, etc

5
Constraint Optimisation Problems
  • Constraint optimisation problems
  • Find feasible solutions with the best value of
    objective function
  • Constraint optimisation problems (C,f)
  • Constraint Satisfaction Problem (C)
  • Objective function (f)(maps every solution to a
    numeric value)

6
Constraint Optimisation Problems
  • A solution ? is preferred to solution ?
  • If the value of objective function f under ? is
    less (or larger in maximisation problem) than ?
  • An optimal solution of COP (C,f)
  • A solution ? of C, such that no other solution of
    C is preferred to ?.

7
Constraint Optimisation Problems
  • Examples
  • Graph colouring
  • Minimum number of colours used
  • Linear expression
  • With constraints for variables in the expression
  • Minimise the result of linear expressions

8
Branch and Bound (BB)
  • General method
  • In COP most widely used
  • CPLEX in ILOG software
  • Based on depth first search
  • Branches pruned during the search by a bound

9
Branch and Bound (BB)
  • Keep the best solution so far
  • During the search
  • If partial solution (node) are proved cannot
    improve the result
  • Prune the branch under the node
  • All solutions in branches under the node are
    abandoned

10
Branch and Bound (BB)


X
X
Best solution
Best solution
11
B B
  • Two important factors
  • A heuristic function, h
  • Estimated objective values for compound labels of
    partial solutions
  • A bound, b
  • Used to prune brunches with no optimal solutions
  • Updated during the search

12
B B
  • During the search in the search tree
  • Before labelling a variable, a value of the
    heuristic function is calculated
  • If the heuristic value is greater than the bound
  • The whole sub-tree under the node is pruned
  • If the heuristic value of a solution is less than
    the existing bound
  • Update the bound
  • Store the newly found solution
  • For a minimisation problem

13
B B heuristic
  • Heuristic h
  • Function maps partial solution to an estimate of
    the objective function value
  • Good estimate of the best values of all branches
    under the current node
  • If the best value under the branch are worse than
    the current bound, then there is no need to
    explore these branches
  • Problem specific

14
B B heuristic
  • Use heuristic to prune the search tree
  • There is no solution in the sub-tree (under the
    node)
  • All solution in the sub-tree are not optimal
  • So that
  • Solutions can be found earlier
  • Reduce the search space
  • Speed up the search

15
B B heuristic
  • A good heuristic h is the key to successful BB
  • Must underestimate
  • Admissible
  • Return the lower bound of the heuristic value
  • Otherwise the optimal solution may be pruned
  • h is the actual cost, h lt h
  • For a minimisation problem

16
B B heuristic
  • A good heuristic h is the key to successful BB
  • Must underestimate
  • The closer the estimation of heuristic, the
    larger the part of search tree pruned
  • h is the actual cost, the closer h is to h the
    better

17
B B bound
  • Usually set as infinite value at the beginning
  • Updated during the search by recording the best
    so far heuristic value
  • For a minimisation problem

18
B B bound
  • Better bound, b
  • Helps to find good solutions earlier
  • In practice, user can provide a bound
  • Satisfied even the solution is not optimal

v

19
SEND MORE MONEY - Problem
  • S E N D
  • M O R E
  • M O N E Y
  • Cryptarithmetic problem mathematical puzzles
    where digits are replaced by symbols
  • Find unique digits the letters represent
    satisfying the above constraints

20
SEND MORE MONEY - Model
  • Variables
  • S, E, N, D, M, O, R, Y
  • Domain
  • 0, , 9

21
SEND MORE MONEY - Model
  • Constraints
  • Distinct variables, S ? E, M ? S,
  • S1000 E100 N10 D
  • M1000 O100 R10 E
  • M10000 O1000 N100 E10 Y

22
SEND MORE MONEY How?
  • How would you solve the problem using CP
    techniques?
  • Search tree with backtracking
  • Constraint propagation
  • Forward backward checking
  • Combination of above?
  • Different problems may find different techniques
    more appropriate

23
SEND MORE MONEY - Solution
  • 9 5 6 7
  • 1 0 8 5
  • 1 0 6 5 2
  • Is this the only solution?
  • Sometimes we want to maximise an objective

S E N D M O R E M O N E Y
24
SEND MOST MONEY - Problem
  • S E N D
  • M O S T
  • M O N E Y
  • Objective we now want to maximise MONEY

25
SEND MOST MONEY - Problem
  • Modelling
  • What does best mean
  • How to find best solution
  • Search
  • Assign scores for proposed solution, h
  • Update the bound, b

26
Constraint Optimisation Problems
  • Real world problems
  • Resource allocation
  • Nurse rostering systems in hospitals
  • BT services
  • Airport scheduling at British Airways
  • Flight scheduling, ECLiPSe
  • Aircraft allocation, ILOG

27
Constraint Optimisation Problems
  • Real world problems
  • Timetabling
  • University course/exam scheduling systems
  • Transportation
  • ILOG vehicle routing
  • Scheduling
  • Job shop scheduling

28
Summary
  • Constraint optimisation problem
  • Branch and bound (BB)
  • Heuristic h
  • Bound b
  • Example
  • SEND MORE MONEY (CSP)
  • SEND MOST MONEY (COP)
Write a Comment
User Comments (0)
About PowerShow.com