Download presentation
Presentation is loading. Please wait.
Published byJonah Gibbs Modified over 9 years ago
1
Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Problem abstraction and symbolic representation
2
Alford Academy Business Education and Computing2 Lesson Objectives Problem Abstraction Symbolic Representation Graphs (tree, state space, AND/OR) Searching
3
Alford Academy Business Education and Computing 3 Stages of Problem Solving in AI 1. Problem abstraction 1. Symbolic Representation 1. Search Technique
4
Alford Academy Business Education and Computing 4 Problem Abstraction Problem abstraction is the process of defining the problem clearly and unambiguously. This includes defining the initial or start state, defining the goal or end state, and defining the constraints that apply.
5
Alford Academy Business Education and Computing 5 Chess Example Start state - initial layout of the 32 chess pieces on the board - represented in the computer as a 2-dimensional array? The end or goal state - definition of the end of a game eg the loser’s King unable to escape, or player has ’resigned’. Constraints would be the rules of chess
6
Alford Academy Business Education and Computing 6 Symbolic Representation Consider the transitional states, all the possible positions between the start and goal How do these states relate to each other? Chess has a virtually infinite number of transitional states - Combinatorial explosion
7
Alford Academy Business Education and Computing 7 Methods of Representation 1. State Space graphs 2. Trees 3. AND/OR graphs 4. Production Rules Each method has advantages and disadvantages
8
Alford Academy Business Education and Computing 8 Search Technique Breadth Depth Heuristic
9
Alford Academy Business Education and Computing 9 Example Problem - Matches Problem Abstraction 1.Start state - shown in diagram 2.Goal state – move matches to form 3 equal piles 3. Constraints - a. any move must double the number of matches in the destination pile; b. no move may result in a pile ending up with 0 matches. Symbolic representation Start state represented as: (11,7,6) with rules 1. move matches from the left pile to the middle pile (LtoM); 2. move matches from the left pile to the right pile (LtoR); 3. move matches from the middle pile to the left pile (MtoL); 4. move matches from the middle pile to the right pile (MtoR); 5. move matches from the right pile to the left pile (RtoL); 6. move matches from the right pile to the middle pile (RtoM).
10
Alford Academy Business Education and Computing 10 Matches – creating search tree 1.Establish root node – start state 2.Apply legal moves to generate descendents 3.Repeat until goal state is reached
11
Alford Academy Business Education and Computing 11 Example problem – Rearranging blocks Problem Abstraction 1.Start state - shown in diagram 2.Goal state – rearrange to produce new stack 3. Constraints – a. Only one block may move at a time b. Place block on table or on top of another block Symbolic representation
12
Alford Academy Business Education and Computing 12 Blocks – creating state space graph Similar to search tree but: 1. it has no single root node 2. there are ’cross branches’ 3. some (in this case, all) of the arrows are bi-directional
13
Alford Academy Business Education and Computing 13 Trees and Graphs Can convert a tree to a graph replacing the two identical (2 4 6) nodes with a single node
14
Alford Academy Business Education and Computing 14 Classic AI Problems Route finding/travelling salesman
15
Alford Academy Business Education and Computing 15 AND/OR Graphs Previous trees and graphs have OR branches - can go down one branch or down one of the others. Certain problems can be split into independent sub-problems and represented with AND branches - shown with an arc joining the branch lines. Example – finding routes between start and finish points that must go through some intermediate point or points. Start (S), finish (F) and intermediate point (I) Split the problem of finding routes from S to F into the sub-problems of finding routes from S to I and from I to F.
16
Alford Academy Business Education and Computing 16 AND/OR graph representation
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.