Set Based Search Modeling Examples - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Set Based Search Modeling Examples

Description:

Set Based Search Modeling Examples Andrew Kuipers amkuiper_at_cpsc.ucalgary.ca Please include [CPSC433] in the subject line of any emails regarding this course. – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 11
Provided by: amkuiper
Category:

less

Transcript and Presenter's Notes

Title: Set Based Search Modeling Examples


1
Set Based Search Modeling Examples
  • Andrew Kuipers
  • amkuiper_at_cpsc.ucalgary.ca
  • Please include CPSC433 in the subject line of
    any emails regarding this course.

2
Example Tic Tac Toe
  • To model Tic Tac Toe as a set based search model,
    we need to define
  • What a fact is
  • Which combinations of facts constitute legal
    states
  • What the extension rules are that we can use to
    move from one set of facts (state) into another

3
Example Tic Tac Toe
  • Facts
  • A fact will simply be that a certain mark is made
    at a specific location on the tic-tac-toe board
  • let R 1, , 3
  • let M X, O, B (note were also modeling
    blanks as marks)
  • F (i, j, m) ? i, j ?R, ? m ?M

4
Example Tic Tac Toe
  • States
  • A set of facts satisfying the following
  • For each location on the board, there exists a
    fact marking that location either X, O or blank
  • Each location on the board may have only one fact
    associated with it (only one mark per location)
  • The play order is preserved
  • ie by forcing X to always have the first move,
    the of Xs should never exceed the of Os by
    more than 1, and the of Os should never exceed
    the of Xs

5
Example Tic Tac Toe
  • States
  • S F ? F Covered(F) ? AllUnique(F)
  • ? PlayOrderPreserved(F)
  • Covered(F) ? ?i,j?R ?m?M (i, j, m) ? F
  • AllUnique(F) ? ?i,j?R ?m,m?M
  • ((i,j,m)?F?(i,j,m)?F) ? (m m)

6
Example Tic Tac Toe
  • PlayOrderPreserved(F) ?
  • 0 ? (Count(X, F) Count(O, F)) ? 1
  • Count(m, F) (i, j, m) ? F, ?i, j?R
  • ie (1,1,X), (1,2,B), (1,3,B),
  • (2,1,O), (2,2,O), (2,3,B),
  • (3,1,X), (3,2,B), (3,3,B)

X
O
O
X
7
Example Tic Tac Toe
  • Extension Rules
  • Now we need to model what a valid move is in
    the game
  • Can only change blank marks to either an X or an
    O we dont allow changing Xs or Os
  • Only one change per move
  • The result of the move must itself be a valid
    state, such that the conditions of Coverage,
    Uniqueness and Play Order defined above are
    preserved

8
Example Tic Tac Toe
  • Extension Rules
  • Ext A ? B ?s?S ? A ? S (s-A)?B?S
  • ? SingleMove(A,B)
  • SingleMove(A, B) ?
  • A (i, j, B) ? B (i, j, p) s.t. p?
    X, O

9
Example Tic Tac Toe
  • ie
  • Which of the following are in Ext?
  • (1,2,B) ? (1,2,O)
  • (3,3,B) ? (3,3,X)
  • (2,1,O) ? (2,1,X)
  • (2,3,B) ? (3,2,X)

X
O
O
X
10
Example Tic Tac Toe
  • What now?
  • We have defined the search model
  • How can we define a search instance?
  • What would a search control for the problem look
    like?
Write a Comment
User Comments (0)
About PowerShow.com