The Role of Mental Models in Learning to Program.
暂无分享,去创建一个
A production system moael (GRAPES) has been developed that simulates problemsolving and learning in the domain of writing recursive functions. Protocol analyses and simulations by the model suggest that students typically use representations of example program solutions to guide tier problem-solving on initial recursion problems This process of problem-solving by analogy to examples leads to acquisition of new production rules that generalize across example and target problem features Two experiments are reported which indicate that providing subjects with insightful representations of example programs and guiding subject through an "ideal" problem-solving strategy facilitates learning Mental Models in Programming 2 Mental Models in Programming The Role of Mental Models in Learning to i rogram Over the past few years the GRAPES research project at Carnegie-Mellon has concerned itself with specifying a detailed process model of the development of problemsolving skill in programming (Anderson, Farrell. & Sauers, 1984: Anderson. Pirolli. & Farrell. in press: Piro lli & Anderson. in press; Our theory of problem-solving and learning of programming was developed in the context of the GRAPES production system (see Sauers & Farrell. 1982. for details) which was designed to emulate certain aspects of the ACT' theory of cognitive architecture (Anderson. 1983). In this paper. we present some of our findings for a subset of programming, namely learning to program recursive functions. We will focus on four issues: (a) the process of writing programs by analogy to examples. (b) the formation of generalizations from analogy processes. (c) which representations (i.e., mental models) of program examples facilitate learning, and (d) how guided use of such mental models in problem-solving facilitates learning. Recursive functions are ones that are defined in terms of themselves A standard example of recursion in mathematics is the factorial function. f(n) = n x f(n-1). or n > 0 (called the recursive case because It involves the recursive call f(n-1)). and f(0) = 1 (called the base or terminating case) The computation of factorial is carried out by suspending the calculation of n x f(n-11 until f(n-i) is carried out. which in turn requires that (n-4,1 x f(n-21 be suspended until f(n-2) is carried out and so on until f(0) is reached Despite the formal simplicity and elegance of recursive functions. we have observed that many students have great difficulty learning to code such functions. This difficulty seems to be due in large part to the unfamiliarity of recursion to most students 'Anderson et al in press) While there are many everyday conceptual analogs to other programming constructs such as iteration (e g.. cashiers processing customers' there are few if any simple everyday conceptual analogs to recursion
[1] Jaime G. Carbonell,et al. Derivational Analogy and Its Role in Problem Solving , 1983, AAAI.
[2] John R. Anderson,et al. ACQUISITION OF PROOF SKILLS , 1983 .