Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group...

30
Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University

Transcript of Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group...

Page 1: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Automated Critique of Sketched Mechanisms

Jon Wetzel and Ken Forbus

Qualitative Reasoning Group

Northwestern University

Page 2: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Outline

• Motivation• Algorithm

– Input: CogSketch

– State Transition Verification• Generate requirements from sketches

• Make predictions using QM

• Verify that predictions reflect requirements

• Evaluation• Related Work• Future Work

Page 3: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Motivation

Engineering Design and Communication Courseat Northwestern University

http://www.segal.northwestern.edu/undergraduate/edc/

Page 4: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Example Sketch of EDC project

Palm-actuated one-handed fingernail clipper

Page 5: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Long-term Goal: Design Buddy

• Given: An explanation consisting of…

• Return:– Is the explanation logically consistent?

– Why or why not?

– Provide feedback that improves users’ communication skills

Sketches Language-like input

+

Page 6: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Outline

• Motivation• Algorithm

– Input: CogSketch

– State Transition Verification• Generate requirements from sketches

• Make predictions using QM

• Verify that predictions reflect requirements

• Evaluation• Related Work• Future Work

Page 7: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Critique of Sketched Mechanisms

Critique is a three-step process

1. Derive a set of state transition requirements using the qualitative representation of a sketch

2. Use qualitative mechanics (QM) to predict outcome of each state• Qualitative mechanics (Wetzel and Forbus, 2008)

based on Nielsen (1988) and Kim (1993)

3. Compare prediction with requirements

Page 8: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Input: CogSketch

• User draws three categories of things– Objects

– Annotations

– Relations

• User labels each using our ontology (based on OpenCyC KB)

• No reliance on recognition, except for arrows

Page 9: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Input: CogSketch

Sketches include knowledge representation

(isa PalmRest RigidObject)

(isa Spring1 Spring-Device)

(forceApplied PalmRest Down) . . .

Page 10: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Input: CogSketch

CogSketch computes spatial relations

(touchesDirectly PalmRest LeverArm)

(connectedTo-Directly Spring1 LeverArm)

(QualitativeVectorBetween (tail ForceArrow1) (head ForceArrow1) Down)

Page 11: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Input: CogSketch

• Multiple subsketches

• One subsketch per mechanical state

Up (open) position

Down (closed) position

Page 12: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Each sketch has a metalayer

• Contains all of the subsketches

• User draws relation arrows indicating cause-effect relationship

Input: CogSketch

Page 13: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Outline

• Motivation• Algorithm

– Input: CogSketch

– State Transition Verification• Generate requirements from sketches

• Make predictions using QM

• Verify that predictions reflect requirements

• Evaluation• Related Work• Future Work

Page 14: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

State Transition Verification

• Input: CogSketch sketch with labeled state transitions

• Output: Comparison of requirements and verification1. Sketches depict the required result of previous state

2. Qualitative mechanics predicts state behaviors

3. Verify the predicted behavior makes required results

Page 15: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Step 1/3: Derive Requirements

Spatial relations are computed between subsketches

(relativePositionChange State1 State2 PalmRest ClipperFrame Down)

(q-2D-orientation State1 PalmRest Horizontal)

(q-2D-orientation State2 PalmRest Horizontal)

. . .

Page 16: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Step 1/3: Derive Requirements

Spatial relations become the state transition requirements.

(relativePositionChange State1 State2 PalmRest ClipperFrame Down)

(q-2D-orientation State1 PalmRest Horizontal)

(q-2D-orientation State2 PalmRest Horizontal)

. . .

To go from state1 from state2, PalmRest must move down.

To go from state1 from state2, PalmRest must not rotate.

. . .

RequirementsSpatial Relations

Page 17: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Step 2/3: QM Predicts Behavior

Each requirement becomes a query for the initial state.

To go from state1 from state2, PalmRest must move down.

To go from state1 from state2, PalmRest must not rotate.

. . .

Query: (in State1 (transMotion PalmRest ?dir))How will PalmRest translate?

Query: (in State1 (rotMotion PalmRest ?dir))How will PalmRest rotate?

. . .

Requirements Queries based on requirements

Page 18: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Step 2/3: QM Predicts Behavior

Qualitative Mechanics rules generate prediction• Last year:

– Representation for forces, rigid objects and their surfaces

– Rules propagate forces and motion between surface contacts

• New this year: – Non-rigid body: springs

– Representation for surface textures

– Gears

Based on work by Nielsen (1988) and Kim (1993)

Page 19: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Step 2/3: QM Predicts Behavior

Qualitative Mechanics rules generate prediction

QM

Query: (in State1 (transMotion PalmRest ?dir))How will PalmRest translate?

Query: (in State1 (rotMotion PalmRest ?dir))How will PalmRest rotate?

. . .

(transMotion PalmRest Down))PalmRest will move down.

(rotMotion PalmRest CW))

PalmRest will rotate clockwise.. . .

Result of verificationQueries based on requirements

Page 20: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Step 3/3: Compare Results

Check to see if requirements are verified

(transMotion PalmRest Down))PalmRest will move down.

(rotMotion PalmRest CW))

PalmRest will rotate clockwise.. . .

To go from state1 to state2, PalmRest must move down.

To go from state1 to state2, PalmRest must not rotate.

. . .

Requirements Result of verification

Disagree

Indicates a possible bug in the design or explanation

Agree

Page 21: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Outline

• Motivation• Algorithm

– Input: CogSketch

– State Transition Verification• Generate requirements from sketches

• Make predictions using QM

• Verify that predictions reflect requirements

• Evaluation• Related Work• Future Work

Page 22: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Evaluation

• Selected EDC projects from previous years– Mechanical systems

– Could be easily represented in two dimensions

• Final corpus:16 student projects worked with CogSketch and our QM– 6 were very similar to other projects, so 10 were

sketched

Page 23: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Evaluation

• Success criterion: – Illustrate motions and forces in the design

– Successful state transition verification• All requirements correctly derived from sketch

• QM successfully verifies all requirements

• Result: succeeded on examples representing 15 of the 16 projects

Page 24: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Examples from EDC Projects

Page 25: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Examples from EDC Projects

Page 26: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Examples from EDC Projects

Page 27: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Examples from EDC Projects

Page 28: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Related Work

• SketchIt (Stahovich et al, 1998)

• Recognition: (Alvarado and Davis, 2004; Hammond & Davis, 2005; Kurtoglu and Stahovich, 2002)

• Physics simulation: (Alvarado and Davis, 2001)

Page 29: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Future Work

• Extend and improve QM– Use surface texture representation to implement

friction

– Automatically suggest axes of rotation

– Predict possible outcomes from ambiguous input

• Studies with EDC students this Fall– Add interface for language-like input– Generate feedback which improves communication

skills

Page 30: Automated Critique of Sketched Mechanisms Jon Wetzel and Ken Forbus Qualitative Reasoning Group Northwestern University.

Acknowledgements

This research was supported by NSF SLC Grant SBE-0541957, the Spatial Intelligence and Learning Center (SILC)