
RobotWorld: a Simulation Environment for Introductory Computer Science Education by Craig Allen Henderson Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Master of Engineering in Electrical Engineering and Computer Science at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY September 1999 © Massachusetts Institute of Technology 1999. All rights reserved. A uthor . .. ...................... Departnlent of Electrical Engineering and Computer Science June 29, 1999 Certified by ....r~~~ ~.. ~~~~~~~~~.. r - .r .. .s .. .. ......~ .. YnnProfesso nu of Sence Associate Professor of Computer Science Thesis Supervisor 'I y Accepted by : .. Chairman, Department RobotWorld: a Simulation Environment for Introductory Computer Science Education by Craig Allen Henderson Submitted to the Department of Electrical Engineering and Computer Science on June 29, 1999, in partial fulfillment of the requirements for the degree of Master of Engineering in Electrical Engineering and Computer Science Abstract Conventional approaches to computer science instruction focus too narrowly on the computation to be performed, and fail to illuminate the greater scheme in which the computation plays a role: as one member in an ensemble of interacting entities. In order to facilitate the design and construction of these ensemble systems at multiple scales, a virtual world inhabited by programmable agents has been devel- oped. Using such a framework, beginning-level students can: wire up an agent brain to discover its overall behavior patterns, program a community of agents to achieve global behaviors, design interactive graphical displays, and experiment with the un- derlying distributed architecture of the system. Armed with this knowledge of interactive programming early in their careers, students will have fewer illusions to dispel, more involvement in the course material, and a clearer understanding of software design as it is practiced today. Thesis Supervisor: Lynn Andrea Stein Title: Associate Professor of Computer Science 2 Acknowledgments First and foremost, I would like to thank Lynn Andrea Stein, for providing the op- portunity to put a microworld to practical use, as well as for being an inspiration and a role model. After exposure to your efforts and Rethinking CS101, I can see science education as an enjoyable and fulfilling endeavor. Thanks to the CS101 staff, especially to Robert Duvall, Mike Wessler, and Mike Harder for feedback on Robot- World's design and usability. I am grateful to Ryan Olson, for introducing me to the beauty of Java and the dream of massively interactive systems. The dream is now more alive than ever. I should also thank Erik Bailey for many fruitful discussions about science and engineering education as well as for deepening my understanding of control theory. Thanks also to Corey Geving, biologist extraordinaire, for keeping my mind open and in search of the strange and wondrous in nature, and by extension, in ourselves. Thanks to my mother and father, whose encouragement and support over the years have been the firmament to this hurling planet... A son could not ask for better parents. And finally, Reem, I wish to thank you especially for your warmth, laughter, curiosity, generosity, perspective, strength, sanity, and deep and profound interest in human nature. As your pupil and friend, I am indebted to you. This thesis describes research done at the MIT Artificial Intelligence Laboratory, where the author was supported by grants from the National Science Foundation, under the Young Investigator Award No. IRI-9357761 granted to Prof. Lynn Andrea Stein. Any opinions, findings, conclusions, or recommendations expressed in this ma- terial are those of the author and do not necessarily reflect the views of the National Science Foundation. In addition, the Rethinking CS101 Project has received support from MIT's Class of 1951 Fund for Excellence in Education and Class of 1955 Fund for Excellence in Teaching, the EECS Department at MIT, the Office of Naval Re- search through the Science Scholars Program at the Mary Ingraham Bunting Institute of Radcliffe College, Microsoft Research/University Curriculum Programs, and Sun Microsystems. 3 Contents 1 Introduction 11 1.1 What is RobotWorld and What Can It Do? ....... ....... 11 1.2 Motivation: Rethinking CS101 ...... ....... ........ 17 1.3 How to Read This Thesis .. ...... ...... ..... ...... 18 2 Microworld as Learning Tool 20 2.1 How Are They Useful? ...................... ........ 20 2.2 Motivating Principles ....................... ... ..... 20 2.2.1 Constructivism: Building as Learning ... ... ... ..... 21 2.2.2 Transparency Through Visual Design ... ... ........ 22 2.2.3 Experimental vs. Structured Programming ... 23 2.2.4 The Beginner's Development Environment ... ........ 24 2.3 Inspirations ... .... ..... ..... .... ... 25 2.3.1 Dynamical Systems . ...... ...... ... 25 2.3.2 A rtificial Life ... .... ... .... ... .. ... ..... 27 2.3.3 Behavior-Based Al and Situated Robotics ... ... ..... 29 2.3.4 Computer Graphics .... ..... .... ... ... ... 32 2.3.5 Object-Oriented and Concurrent Programming ... ... .. 33 2.3.6 The Software Development Process ..... .. .... .... 35 3 A Quick Architectural Overview 36 4 The robotworld.net Package 41 4 4.1 Background: Blackboard Systems .......... .......... 41 4.2 C ore Interfaces ...... ..................... ... 42 4.3 Current Implementation .. ........... ........... 45 4.3.1 SimpleBlackboard .......... ............... 46 4.3.2 JiniBlackboard ....... ........... ........ 47 5 The robotworld.ide Package 49 5.1 Background: Development Environments ................ 49 5.2 Core Interfaces .. ..................... ....... 50 5.3 Current Implementation .. ........... ........... 52 6 The robotworld.gui Package 54 6.1 Background: Dataflow Analysis . .................... 55 6.2 C ore Interfaces .. ..................... ....... 55 6.3 Current Implementation ........... .......... .... 58 7 The robotworld.ctl Package 59 7.1 Background: Client-Server Models . ........... ........ 59 7.2 C ore Interfaces . .......... ........... ........ 60 7.3 Current Implementation .... ........... .......... 67 8 The robotworld.sim Package 68 8.1 Background: Physically-based modeling. .. .. 69 8.1.1 2D Particle Systems ..... .. ..... 70 8.1.2 Braitenburg Vehicle Model .. .. .. .. 73 8.1.3 Vehicular Feedback Control . .. .. .. 75 8.2 Core Interfaces ... ....... .... ... ... 79 8.3 Current Implementation .. ....... ..... 84 9 Putting It All Together 87 9.1 The Abstract Factory Mechanism ......... ........... 89 9.2 Sprites, Layers and Beanbags ........... ........... 90 5 10 Problem Set Examples 97 10.1 Phototaxis ... ...... ...... ....... ...... ..... 97 10.1.1 What are Braitenburg Vehicles? ........ ......... 97 10.1.2 Exploring Fear and Aggression .............. .... 100 10.1.3 Turning Fear and Aggression into Love and Curiosity ..... 102 10.1.4 Colliding: When Bad Things Happen to Good Robots .. 103 10.1.5 Obstacle Avoidance: The Path to Self-Actualization ...... 106 10.2 Virtual Oscilloscope ... ......... ........ ........ 107 10.3 F locking ...... ............ ............. ... 111 11 Future Work 115 11.1 For RobotWorld Developers ..... ........ ......... 115 11.1.1 Consistency .. .......... .......... ...... 116 11.1.2 Efficiency ...... ........ ........ ....... 117 11.1.3 Transparency ...... ........ ....... ...... 119 11.1.4 Flexibility .. ....... ........ ........ .... 124 12 Conclusions 128 A Key to UML Notation 130 B User's Manual 131 B.1 Table Of Contents .. ...... ...... ...... ...... .. 131 B .2 W hat is it? ......... ............ ........... 132 B .3 Installing .. ............. ............ ...... 133 B.3.1 Basic Install .......... .................. 133 B.3.2 Multiuser Install ......................... 134 B.4 Custom Configuration ... ............ ........... 135 B.4.1 JDK Configuration ............ ........... 135 B.4.2 NT Emacs Configuration ......... ........... 136 B.5 Starting Up . ........ ......... ........ ...... 137 B.5.1 Singleuser Startup ... ........ ....... ...... 137 6 B.5.2 Multiuser Startup . .. ..... 137 B.6 Using the Workspace .. .. .. ..... ...... ....... 13 8 B.6.1 The Beanbag . .. ... .. .... .... ..... .... 13 9 B.6.2 The Canvas .. .. .. ... .... ... ... ... .... 14 0 B.6.3 Sprites and Layers . ... ... ... ... .... ... .. 14 0 B.6.4 The Menu Bar .. .. .. .. ... ... .. ... .. ... 14 2 B.7 The Five Layers of Observation . .. ... ... .. ... .. ... 14 2 B.7.1 The Architecture Layer . ... .. ... ... .. ... .. .. 144 B.7.2 The Habitat Layer . .. ... .... .... ..... .... 14 5 B.7.3 The Morphology Layer .. ... .... ... ... ... ... 14 6 B.7.4 The Behavior Layer .. .. ... ... .. ... .. ... .. 14 9 B.7.5 The Code Editing Layer .. ... .... ... ... ... ... 1 52 B.8 Future Directions .. .. .. ... .... .... ..... .... 15 3 B.8.1 Example Problem Sets . ... ... .... ... ... ... 15 3 B.8.2 Extending RobotWorld ... .... ... ... ... .... 15 4 B.8.3 Bugs and Features . .. ... .. ... ... .. ... .. 15 4 B.8.4 Finding Out More . .... .... .... .... ..... 15 5 C Source Code 156 C.1 The robotworld.net package . .... ... ... ... .... ... 15 6 C.2 The robotworld.net.simple packa! e .. ... ... .... ... ... 16 5 C.3 The robotworld.net.jini package . .... ... ... ... .... ... 1 7 4 C.4 The robotworld.ide package . .... ..... .... .... 18 3 C.5 The robotworld.gui package . .... ..... .... .... 2 1 3 C.6 The robotworld.ctl package . .. ... ... .... ... ... ... 2 3 7 C.7 The
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages338 Page
-
File Size-