Expressing Computer Science Concepts Through Kodu Game Lab
Total Page:16
File Type:pdf, Size:1020Kb
Expressing Computer Science Concepts Through Kodu Game Lab Kathryn T. Stolee∗ Teale Fristoe∗ Department of Computer Science and Expressive Intelligence Studio Engineering University of California, Santa Cruz University of Nebraska–Lincoln Santa Cruz, CA, U.S.A. Lincoln, NE, U.S.A. [email protected] [email protected] ABSTRACT students should enjoy their experiences to gain the most Educational programming environments such as Microsoft from them. For this reason, these languages often target Research’s Kodu Game Lab are often used to introduce media creation, such as art, animations, or games. However, novices to computer science concepts and programming. Un- rarely are the actual educational benefits of the languages like many other educational languages that rely on scripting the focus of scrutiny, resulting in a stark lack of understand- and Java-like syntax, the Kodu language is entirely event- ing of the skills these languages provide for their users. driven and programming takes the form of ‘when – do’ clauses. Microsoft Research’s Kodu Game Lab [4] is a recent addi- Despite this simplistic programing model, many computer tion to this tradition of educational programming environ- science concepts can be expressed using Kodu. We identify ments. Since its release in the summer of 2009, it has been and measure the frequency of these concepts in 346 Kodu installed over 50,000 times in over 120 countries. Kodu al- programs created by users, and find that most programs lows users to create their own video games by designing the exhibit sophistication through the use of complex control world, deciding which characters will appear in it, and pro- flow and boolean logic. Through Kodu’s non-traditional lan- gramming the characters using an easy-to-understand visual guage, we show that users express and explore fundamental programming language. It takes the unique perspective that computer science concepts. children should be both producers and consumers of games. Like many similar programming environments, Kodu has been shown to be enjoyable for users, and clubs have formed Categories and Subject Descriptors worldwide to teach Kodu (e.g., [1, 2, 5]), but its educational K.3.2 [Computers and Education]: Computer and In- benefits have not been explored in any rigorous fashion. formation Science Education; D.3.3 [Programming Lan- In this work, we begin to identify which computer science guages]: Language Constructs and Features concepts users can express through Kodu, and then explore which concepts actual users have utilized in Kodu. We aim General Terms to address the following research questions: Languages, Experimentation RQ1: Which computer science concepts can be expressed through the Kodu Language? Keywords RQ2: How much time do end users spend designing and programming during a Kodu session? Educational programming languages, Kodu RQ3: How often does each computer science concept ap- pear in the programs created by the Kodu community? 1. INTRODUCTION To this end, we look at several language features available Since the development of high level programming lan- in Kodu, connecting them to fundamental computer science guages, researchers and educators have embraced domain concepts. We empirically investigate what users of Kodu specific languages designed to introduce children to pro- are actually learning, first by determining what percentage gramming from a young age [10]. While ease of use has of their time is spent programming and configuring their always been a concern with these languages, often attrac- program as opposed to playing or exploring, and then by tiveness to children is a top priority, with the rationale that performing a frequency analysis on 346 end user programs, Work completed while at Microsoft FUSE Labs. measuring how often each computer science concept appears. ∗ The rest of this paper is structured as follows. Section 2 presents related work in educational programming languages and Section 3 gives some background on Kodu Game Lab Permission to make digital or hard copies of all or part of this work for and the Kodu language. Section 4 presents the computer personal or classroom use is granted without fee provided that copies are science concepts that can be learned in Kodu (RQ1), Sec- not made or distributed for profit or commercial advantage and that copies tion 5 shows how users spend their time during a Kodu ses- bear this notice and the full citation on the first page. To copy otherwise, to sion (RQ2), and Section 6 addresses RQ3 by exploring how republish, to post on servers or to redistribute to lists, requires prior specific often each concept is present in the games created by the permission and/or a fee. SIGCSE’11, March 9–12, 2011, Dallas, Texas, USA. community. Section 7 presents the threats to validity, and Copyright 2011 ACM 978-1-4503-0500-6/11/03 ...$10.00. Section 8 presents future work and conclusions. 99 Rule Condition Action Condition → Sensor FilterSet Action → Actuator ModifierSet Selector FilterSet → Filter FilterSet Filter ModifierSet → Modifier ModifierSet| Modifier Sensor → see bump | Filter → apple| red Actuator → move | eat | Modifier → toward| away Selector → it me | | → | | Figure 1: Grammar Sketch for a Rule Figure 2: Programming Interface in Kodu 2. RELATED WORK condition, do action. If the condition is satisfied, then the Released in 1967, Logo [10] pioneered the development of action is performed. All the rules on a page are evaluated in educational programming environments, and has been very a single frame, from top to bottom. There are over 500 tiles influential on the development of subsequent languages in that can be used to compose rules in the Kodu Language. In the domain [3, 6, 13, 15]. While there have been count- Figure 1, we give a grammar sketch for a rule in Kodu, and less educational programming environments since Logo, Al- limit the alphabet to 10 tiles. Each capitalized word (e.g., ice [6], Greenfoot [3], and Scratch [13] are commonly ex- Rule, Condition) represents a non-terminal symbol and ap- plored by the research community and have many simi- pears on the LHS of a production rule. Each lowercased larities to Kodu. Like Kodu, all are visual programming word (e.g., see, apple) represents a terminal symbol that languages that allow users to create their own animations, maps to one tile in the Kodu language. games, and simulations. Scratch also has extensive commu- nity features that facilitate sharing of programs and collabo- 3.2 Programming in Kodu ration [13]. Unlike Kodu, the languages of Alice, Greenfoot, Programming in Kodu involves the placement of program- and Scratch follow the Java-like syntax of many mainstream ming tiles in a meaningful order to form the condition and programming languages, whereas the Kodu language is en- action on each rule. We show an example of the program- tirely event-driven (see Section 3.1 for language details). ming user interface in Figure 2, where the program shown In terms of evaluation, educational programming environ- was generated using the grammar shown in Figure 1. In the ments have been measured primarily using qualitative and example, there are two rules, one per line. The condition anecdotal evidence [15, 17]. A more recent trend has been of each rule is on the left, and the action on the right, as is toward the inclusion of quantitative data in the evaluation, defined by the grammar rule, Rule Condition Action. though sample sizes generally remain small. Kelleher has For the first rule, the condition is,→ when see red apple, and analyzed user habits by tracking time spent programming the action is, move toward. In the condition, see is the sensor versus other activities, such as designing in Alice [9]; we and red and apple are filters. The action defines the behavior perform a similar analysis with Kodu. Pre- and post-tests of this particular character when it sees a red apple, that is, have also been used to evaluate what users learn by using it moves toward. Here, move is the actuator, toward is the Alice and Scratch, and are generally accompanied by quali- modifier, and it is the default selector, since the condition tative support [11, 12, 14]. Researchers are only beginning identifies a target object (i.e., the red apple). The second to examine artifacts written in Alice and Scratch to deter- rule has a similar condition with a different sensor, bump. mine what the authors of the systems may be learning, a The action, eat, indicates that the character should eat any technique we continue in this work [7, 11, 16, 19]. red apple it bumps. The programming in Figure 2 applies to the first page in this character’s programming, as indicated 3. ABOUT KODU by the number “1” at the top of the screen. At its core, Kodu is an environment that allows users to create and play their own video games. It is available for 4. COMPUTER SCIENCE CONCEPTS download for the Xbox and also on the PC. Developed by Microsoft Research, the vision of the tool is to help users IN KODU learn computer science concepts through game creation. While the Kodu language is unlike most mainstream pro- gramming languages, it allows its users to explore many 3.1 Kodu Language fundamental concepts in computer science. In this section, Kodu is a high-level, visual, and interpreted language that we explore each of these concepts and how they can be ex- can be represented as a context-free grammar [18]. Users can pressed and used in the Kodu language (RQ1). program each character (e.g., a fish, cycle, apple, tree) indi- vidually, and the programming defines how it interacts with 4.1 Variables and Scope the world, much like an intelligent agent. The programming Simply, a variable is a symbol that holds a value.