Cognitive Architectures: A Way Forward for the Psychology of Programming Michael Hansen Ph.D Student in Comp/Cog Sci CREST / Percepts & Concepts Lab Indiana.

Slides:



Advertisements
Similar presentations
MODELING PARAGIGMS IN ACT-R -Adhineth Mahanama.V.
Advertisements

Pat Langley School of Computing and Informatics Arizona State University Tempe, Arizona USA Modeling Social Cognition in a Unified Cognitive Architecture.
Pat Langley Computational Learning Laboratory Center for the Study of Language and Information Stanford University, Stanford, California USA
Cognitive Systems, ICANN panel, Q1 What is machine intelligence, as beyond pattern matching, classification and prediction. What is machine intelligence,
Universal Design for Learning October, What about reading? What part of the brain do we read with?
© 2005 Prentice Hall6-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Yiannis Demiris and Anthony Dearden By James Gilbert.
Faculty of Management and Organization Emergence of social constructs and organizational behaviour How cognitive modelling enriches social simulation Martin.
Cognitive modelling, Users models and Mental models What’s cognitive modelling ? The human information processing approach Cognitive Models of Users in.
1 Learning from Behavior Performances vs Abstract Behavior Descriptions Tolga Konik University of Michigan.
Korea Univ. Division Information Management Engineering UI Lab. Korea Univ. Division Information Management Engineering UI Lab. Human Interface PERCEPTUAL-MOTOR.
Pattern Recognition Pattern - complex composition of sensory stimuli that the human observer may recognize as being a member of a class of objects Issue.
Overview and History of Cognitive Science. How do minds work? What would an answer to this question look like? What is a mind? What is intelligence? How.
1 CS 430 / INFO 430 Information Retrieval Lecture 24 Usability 2.
Korea Univ. Division Information Management Engineering UI Lab. Korea Univ. Division Information Management Engineering UI Lab – 2 학기 Paper 7 Modeling.
Chapter Four The Cognitive Approach I: History, Vision, and Attention.
ACT-R.
Models of Human Performance Dr. Chris Baber. 2 Objectives Introduce theory-based models for predicting human performance Introduce competence-based models.
The Cognitive Approach I: History, Vision, and Attention
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Research Methods for HCI: Cognitive Modelling BCS HCI Tutorial 1 st September, 2008.
Chapter 12: Simulation and Modeling Invitation to Computer Science, Java Version, Third Edition.
Cognitive level of Analysis
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Cognitive Psychology, 2 nd Ed. Chapter 1. Defining Cognitive Psychology The study of human mental processes and their role in thinking, feeling, and behaving.
1. Human – the end-user of a program – the others in the organization Computer – the machine the program runs on – often split between clients & servers.
Reasoning Abilities Slide #1 김 민 경 Reasoning Abilities David F. Lohman Psychological & Quantitative Foundations College of Education University.
Chapter 5 Models and theories 1. Cognitive modeling If we can build a model of how a user works, then we can predict how s/he will interact with the interface.
PROCESSING APPROACHES
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence Using Expectations to Drive Cognitive Behavior Unmesh Kurup, Christian Lebiere,
Modeling Driver Behavior in a Cognitive Architecture
Modeling meditation ?! Marieke van Vugt.
Processing of Information and Performance of Experts.
Psychology: memory. Overview An understanding of human memory is critical to an appreciation of how users will store and use relevant information when.
Testing & modeling users. The aims Describe how to do user testing. Discuss the differences between user testing, usability testing and research experiments.
Shane T. Mueller, Ph.D. Indiana University Klein Associates/ARA Rich Shiffrin Indiana University and Memory, Attention & Perception Lab REM-II: A model.
Demonstration and Verbal Instructions
Korea Univ. Division Information Management Engineering UI Lab. Korea Univ. Division Information Management Engineering UI Lab. IMS 802 Cognitive Modeling.
New Bulgarian University MindRACES, First Review Meeting, Lund, 11/01/2006 Anticipation by Analogy An Attempt to Integrate Analogical Reasoning with Perception,
Understanding Users Cognition & Cognitive Frameworks
Chapter 3 System Performance and Models Introduction A system is the part of the real world under study. Composed of a set of entities interacting.
Architectural Styles, Design Patterns, and Objects Joe Paulowskey.
U SER I NTERFACE L ABORATORY Situation Awareness a state of knowledge, from the processes used to achieve that state (situation assessment) not encompass.
Human Performance Modeling
마스터 제목 스타일 편집 마스터 텍스트 스타일을 편집합니다 둘째 수준 셋째 수준 넷째 수준 다섯째 수준 The GOMS Family of User Interface Analysis Techniques : Comparison and Contrast Bonnie E. John.
RULES Patty Nordstrom Hien Nguyen. "Cognitive Skills are Realized by Production Rules"
Artificial Intelligence: Research and Collaborative Possibilities a presentation by: Dr. Ernest L. McDuffie, Assistant Professor Department of Computer.
 Introduction  Methodology  Case Study 1 : Event-B and RODN  Case Study 2 : B-Method and Atelier B  Observations and Analysis  Conclusion.
Minds and Computers Discovering the nature of intelligence by studying intelligence in all its forms: human and machine Artificial intelligence (A.I.)
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
What is Psychology? Pages What is Psychology? Give me your own personal definition of Psychology.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Cognitive Modeling Cogs 4961, Cogs 6967 Psyc 4510 CSCI 4960 Mike Schoelles
COGNITIVE LEVEL OF ANALYSIS An Introduction. Cognitive Psychology studies: how the human mind comes to know things about the world AND how the mind uses.
Program Comprehension Program Understanding Behavior During Debugging Of Large Scale Software Anneliese von Mayrhauser (Andrews) and A. Marie Vans Rizal.
Chapter 12: Simulation and Modeling
OPERATING SYSTEMS CS 3502 Fall 2017
What is cognitive psychology?
Software Metrics 1.
Chapter 6 Heuristics and Controlled Problem Solving
Architecture Components
Conceptual Frameworks, Models, and Theories
CSc4730/6730 Scientific Visualization
An Integrated Theory of the Mind
GOMS as a Simulation of Cognition
The Cognitive Level of Analysis
Cognitive models linguistic physical and device architectural
Testing & modeling users
Remembering and Learning
Presentation transcript:

Cognitive Architectures: A Way Forward for the Psychology of Programming Michael Hansen Ph.D Student in Comp/Cog Sci CREST / Percepts & Concepts Lab Indiana University Bloomington Onward! Workshop 2012

2 “Many claims are made for the efficacy and utility of new approaches to software engineering – structured methodologies, new programming paradigms, new tools, and so on. Evidence to support such claims is thin and such evidence, as there is, is largely anecdotal. Of proper scientific evidence there is remarkably little.” - Frank Bott, 2001 Françoise Détienne

How to Quantify the “Goodness” of a Language Feature? 3 for x in [10, 20, 30]: for y in [1, 2, 3]: print x+y for x in [10, 20, 30]: print x

How to Quantify the “Goodness” of a Language Feature? 4 for x in [10, 20, 30]; y in [1, 2]: print x+y ?

How to Quantify the “Goodness” of a Language Feature? 5 for x in [10, 20, 30]; y in [1, 2]: print x+y 1111error! st 2nd 3rd Why?

The Psychology of Programming 6

History of the Psychology of Programming First Period ( ) –Imported theories and methods from Psychology Short-term memory, descriptive statistics –Correlations between task and language/human factors Example: comments vs. defects detected Second Period (1980-present) –Cognitive models Knowledge, strategies, task, environment/tools –Response times, eye movements, intermediary code –Experts and students 7

Structural Complexity Metrics & Miller’s Magic Number (7 ± 2) Lines of code –Coupled with everything! Cyclomatic Complexity –# of branches Halstead Volume/Effort –Operators, operands Object-Oriented metrics –Coupling, cohesion, inheritance 8

9 “Furthermore, such [scientific evidence] as there is can be described as ‘black box’, that is, demonstrates a correlation between the use of a certain technique and an improvement in some aspect of the development. It does not demonstrate how the technique achieves the observed effect.” - Frank Bott, 2001 Françoise Détienne

History of the Psychology of Programming First Period ( ) –Imported theories and methods from Psychology Short-term memory, descriptive statistics –Correlations between task and language/human factors Example: comments vs. defects detected Second Period (1980-present) –Cognitive models Response times, eye movements, intermediary code Knowledge, strategies, task, environment/tools –Experts and students 10

Models and Modelers Elliot Soloway (1984) –Plan analysis, Rules of Discourse Nancy Pennington (1987) –Text structure, levels of representation Anneliese von Mayerhauser (1995) –Integrated Metamodel Françoise Détienne (2001) –Effect of task (read to reuse) Chris Parnin / Christopher Douce (2008) –Task Memory Model / Stores Model of Code Cognition 11

Models and Modelers Elliot Soloway (1984) –Plan analysis, Rules of Discourse Nancy Pennington (1987) –Text structure, levels of representation Anneliese von Mayerhauser (1995) –Integrated Metamodel Françoise Détienne (2001) –Effect of task (read to reuse) Chris Parnin / Christopher Douce (2008) –Task Memory Model / Stores Model of Code Cognition 12 Quantitative Predictions?

The Cognitive Complexity Metric 13

The Cognitive Complexity Metric (Cant et. al, 1995) 14

The Cognitive Complexity Metric (Cant, 1995) 15

The Cognitive Complexity Metric (Cant, 1995) 16

Building Up A Representation 17 Mental Representation Mental Representation Code Feature X Feature Y

Building Up A Representation All we need are quantitative models of … –The visual system, reading text –Chunking and short/long term memory –Goal-driven behavior –Pattern recognition and learning –Logical reasoning and problem solving –How these fit together! 18 Mental Representation Mental Representation Code Feature X Feature Y

Cognitive Architectures 19

The ACT-R Cognitive Framework (Anderson, 2007) Cognitive Architecture –Software simulation environment –Similar constraints that (supposedly) give rise to the mind –Symbolic and sub-symbolic processes 20 “…a specification of the structure of the brain at a level of abstraction that explains how it achieves the function of the mind.” - How Can the Human Mind Occur in the Physical Universe?

The ACT-R Cognitive Framework (Anderson, 2007) Cognitive Architecture –Software simulation environment –Similar constraints that give rise to the mind –Symbolic and sub-symbolic processes Massively Parallel Components –Pattern matcher (production system) –Declarative memory (Bayesian activation calculus) Serial Bottlenecks –Single production at a time (50 ms) –Visual attention –Manual action (keypresses, mouse clicks) 21 “…a specification of the structure of the brain at a level of abstraction that explains how it achieves the function of the mind.” - How Can the Human Mind Occur in the Physical Universe?

The ACT-R Cognitive Framework (Anderson, 2007) 22 (p encode-letter =goal> isa read-letters state attend =visual> isa text value =letter1 ?imaginal> buffer empty ==> =goal> state wait +imaginal> isa array letter1 =letter1 ) Symbolic + Sub-symbolic Layers

Benefits of a Cognitive Architecture Bringing together many different psychological theories –Attention, memory, cognition, vision, etc. –Bridging theories Interaction with real* tools –Models and subjects can use same development environment –Fill in the “cognitive gaps” of a GOMS analysis Repeatable simulations –Measurements of cognitively relevant dimensions Make assumptions explicit –Parameters, model code, memory contents are reportable 23

Where To Go From Here? Eye-tracking / code comprehension experiments –Participants predict output of simple programs –Novices and experts –Model should predict response time, visual strategy, response 24 def add_1(num): added = num + 1 return added added = 4 add_1(added) print(added) What does this program output?

How to Quantify the “Goodness” of a Language Feature? Use cognitive model simulation to make “objective” judgments –Model response time – how long to complete task? –Visual search strategy – looking at the right things? –Richness of representation – matched the best schema? –Prediction mistakes – consistent errors? Potential problems –Assumptions/gaps in cognitive architecture –Experimental variables may not provide enough constraints –Approach may not scale to larger programs –What about dramatically new features or paradigms? 25

Thank You! Questions? 26