Deductive Reasoning - University of California, Irvine

Download Report

Transcript Deductive Reasoning - University of California, Irvine

Computer Simulation (1)
A
(8)
B
(5)
C
(3)
8
Initial State
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
A
(8)
B
(5)
4
4
C
(3)
Goal State
Some fun (and difficult!) games
• Theseus and the Minotaur:
– http://www.logicmazes.com/theseus.html
• More special mazes
– http://www.logicmazes.com/
Tower of Hanoi
INITIAL STATE
GOAL STATE
?
Play the game: http://www.mazeworks.com/hanoi/
Role of Computer Simulation
• Cognitive Science:
– Simulate human behavior
– Make vague terms concrete (e.g., ‘goals’, ‘memory’,
‘problem solving’)
– Simulations help to think through the implications of a
complicated theory
• Artificial Intelligence:
– Simulate intelligent behavior - not necessarily human
behavior
– Example: chess playing programs
Newell & Simon (1972)
• Collected verbal protocols = a record of verbalized
thought processes.
• Explored computer programs for solving problems in a
human way
• Refined their computer programs to be closer to
protocols
Problem solving as a search problem
Goals are often metaphorical spatial locations:
– “Searching for a way to reach the goal”
– “Getting around roadblocks”
– “getting lost” in the middle of a solution
– “hitting a dead end” and being forced to “back-track”
– “Approaching the problem from a different angle”
Representation of Problem
1) initial state
2) goal state
3) a set of legal operators
4) evaluation function: how far away is each state from goal
state
Definitions
• Search space (Problem space): the set of all states
that potentially be reached by applying available
operators.
• Solution: a sequence of operators that transform initial
state into goal state
• A problem solving method: a procedure for finding a
solution
Initial
state
Solution
Goal
state
Problem Solving is a
search problem
Search Space
(Problem space)
Search spaces can be large
#DISCS
#STATES
3
4
5
6
33 = 27
34 = 81
35 = 243
36 = 729
Search Strategies
• Trial and Error
• Hill Climbing
• Means-End Analysis
Trial & Error
Reach goal after
large number of
random steps
many wasted moves
But there is a role for
randomness in
problem solving –
when getting stuck
Initial
State
4
Hill Climbing
4
3
3
2
At each step, choose
a next state with
better score
(strictly speaking, we
are descending from
a hill as lower scores
are better in this
particular example)
3
2
1
2
1
Goal
State
At each state, assign
a score – here, lower
is better
Initial
State
Hill Climbing
4
3
Problem:
4
3
2
3
2
1
2
1
Goal
State
getting stuck
when each next
move leads to
worse score
Hill climbing
• Problem: depending on initial state,
may get stuck in local maximum
0
0
1
1
1
0
0
2
Hill Climbing
Each state has an
associated score –
e.g., #discs on peg 3
1
1
2
1
higher = better
2
1
1
0
2
0
2
3
1
1
2
From current state,
go to next best state
(highest score)
0
0
1
1
1
0
0
2
1
1
2
1
1
0
2
a state from which
any next step is
worse
solution: make some
random steps to get
out of the “local high”
2
3
1
Problem:
‘local high’
2
1
0
Hill Climbing
1
2
randomness in
problem-solving can
be good at times
Most subjects
choose this path
initially, it seems
closer to the goalstate
Hill-climbing
describes part of
human behavior –
no global planning
Means-end Analysis
• No planning involved in trial & error and hillclimbing
• Means-end analyses distinguishes between planning a
move vs. executing moves by setting goals
• Means-end analysis was first proposed as part of the
General Problem Solver (GPS)
(Newell and Simon (1972):
Means-end Analysis
Search is guided by detection of differences between
current state and goal state
1) compare current state to goal state and identify
difference
2) select an operator to reduce difference
3) if the operator can be applied, do so; if not, set a new
subgoal of reaching a state at which the operator could
be applied. Means-ends analysis is then applied to this
new subgoal.
4) return to 1
A simple example
•
•
•
•
•
Painting your house
Apply paint
Need paint and brush
Go to hardware store
Find car keys
Goal Stack
•
•
•
•
Painting your house
Apply paint
Need paint and brush
Go to hardware store
(GOAL 1)
(SUBGOAL 2)
(SUBGOAL 3)
(SUBGOAL 4)
•
•
•
•
Went to hardware store
Got paint and brush
Apply paint
Paint the house
(SUBGOAL 4)
(SUBGOAL 3)
(SUBGOAL 2)
(GOAL 1)
Goal Stack
Push
Push
Push
Push
Goal 1
Goal 2
Goal 3
Goal 4
on Stack on Stack on Stack on Stack
G1
G2
G1
G3
G2
G1
G4
G3
G2
G1
Solved Goal 4:
Pop-off
Stack
G3
G2
G1
Production Systems
A set of production rules (if-then rules)
IF you have a paint roller
And you have paint
And you have a surface ready to paint on
And the surface is large
And your goal is to paint the surface
THEN roll the paint onto the surface
And expect the surface to be painted
Applying production systems
1) conditions of rules are matched against the currently
active contents of working memory
2) if more than one rule is matched, apply procedures for
conflict resolution
3) the selected rule is fired
4) return to 1
Anderson’s ACT* model: human cognition is based on
production systems