et al, 2006) and simulation of robots for teaching programming (Becker, 2006), as a visual .... Prototype GUI application from the programming exercise. As in the .... http://lejos.sourceforge.net/p_technologies/rcx/downloads.php accessed on.
ROBOTICS WITHIN THE TEACHING OF PROBLEM-SOLVING SCOTT TURNER AND GARY HILL DIVISION OF COMPUTING, UNIVERSITY OF NORTHAMPTON ABSTRACT This paper considers the experiences of teaching on a module where problem-solving is taught first, then programming. The main tools for the problem-solving part, alongside two problem-solving approaches, are tasks using Mindstorm (LEGO, Denmark) robot kits. This is being done as a foundation step before the syntax of a language (Java) is taught to enable a Graphical User Interface (GUI) emulation of a previous robot problem. Results of student evaluation and feedback will be presented and the use of two simulators will be considered.
Keywords Student experience, problem-solving, robots, Java, GUI, emulation.
1. INTRODUCTION Mindstorm based robots have been used previously, not only for teaching programming to computing and engineering students (Lawhead et al,2003; Price et al,2003; Williams et, 2003 and Fagin 2003) but equally for problem solving. Lawhead et al (2003) stated that robots “…provide entry level programming students with a physical model to visually demonstrate concepts” and “the most important benefit of using ROBOTS in teaching introductory courses is the focus provided on learning language independent, persistent truths about programming and programming techniques. ROBOTS readily illustrate the idea of computation as interaction”. These advantages also apply to problem solving where synergies can be made with the work on pre-object programming (Culwin et al, 2006) and simulation of robots for teaching programming (Becker, 2006), as a visual approach to java. This approach differs from previous approaches by the focusing upon the development of problem solving skills and not on learning a new programming language from the outset. Therefore, initially, any programming is kept simple with the minimum of commands and objects are unknowingly used, these are introduced/learnt during the programming stage of the module. Preliminary work within the team (Turner and Hill, 2006; Turner and Hill, 2007) suggests that using LEGO robots within the teaching of problem solving and the resulting java GUI emulation has some benefits for the students.
The students come on the courses with a range of experiences and abilities, but many of them have limited experience of programming. The module was divided into eight weeks focusing on problem-solving techniques and sixteen weeks of programming in Java. The two assessments within this module are linked by a
ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
108
robot-based task in the problem-solving assignment, which is developed further into a graphical emulator in the programming part of the module.
2. PROBLEM-SOLVING 2.1 Approach: Problem solving is not trivial (Beaumont and Fox, 2003). Two explicit but related problem-solving approaches were taught. The first was based around analysis, design, testing design, implement and test. The second approach is similar, but includes brainstorming and therefore more suited to group working (University of Minnesota). A series of problem-solving tasks that increase in complexity were provided to give the students practice in attempting these problem-solving approaches and to learn from their mistakes. Some of the problems included ambiguities or were ill-defined, to enable the student to resolve these as part of the process. An example of this was “Calculate the area of a rectangular room”. What does this mean? Floor area or does it mean area of the floor, ceiling, and/or four walls?
Figure 1. Template for the wall-following routine and downloading the routine to the robot.
Mindstorm (Lego, Denmark) robots formed the core of the problem-solving activities, based around six exercises; these were also designed to gradually increase in complexity, one of which formed part of the assessment. The assessment included a task which involved the student producing a list of instructions to get the robot to follow a maze. The assessment task was also developed further in the programming assignment where they were asked to repeat the same exercise but as a graphical emulation. During the problemsolving robotic tasks students were given a simple set of instructions to control the robot and templates for each exercise to fit these instructions within (figure
ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
109
1). The emphasis during the problem-solving exercises is the analysis of the problem, not the generation of code.
1.2 Evaluation: Two questionnaires were used as part of the evaluation of the approach. At the beginning of the module to investigate student’s initial thoughts and concerns with problem-solving. A second one, after the robot exercises, to gauge the response to including robots for teaching problem-solving.
The first question asked was, did they think that robotics based problems help with developing problem-solving skills; all respondents said it did. When asked how it helped, the main two types of comment (50%) suggested the approach provided a physical or visual representation of the problem or enabled the problem to be viewed in different ways (figure 2). Physical/visual representation
How has it helped? 15%
25%
5%
View problems from different views Decomposition of problem No comment
5% Tasks enjoyable 20%
25% 5%
New activity Improved problemsolving
Figure 2. Student’s view on how the robot-based approach helped.
Approximately 81% of the respondents said they did enjoy this approach and 19% said it was okay. When asked about the positive aspects of the approach (figure 3) 13% of the respondents did not provide any further comment. The physical representation of the problem and visualization accounted for 68% of the comments.
ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
110
Positive aspects 13% 25%
Physical representation of problem Using the robots Visualisation No comment provided
43%
19%
Figure 3. Student’s view on the positive aspects of robot-based approach.
An interesting feature can be seen in Figure 4, which represents some of the areas for improvement, 53% of respondents did not want to or did include comments on how this approach could be improved. This taken with the high levels of satisfaction scores can be, in part, taken as a positive indication that the approach is at least on the right lines. 13% of the comments discussed the physical arrangement of the robots (usually not enough sensors or not interesting exercises). A further interesting point is that 13% of the comments said the problem was with the programming language. Negative aspects
7%
7% No comment Too repetitive
13%
Programming language 53%
Physical arrangement Unexpected behaviour
13%
Not enough time to test 7%
Figure 4 Student’s view on the areas for improvement of robot-based approach.
3. PROGRAMMING Java programming forms the second section of the module (16 sessions of 1.5 hours duration). The approach taken was to get the students producing Graphical User Interfaces (GUIs) at the earliest possible opportunity. A recommended course text (Bell and Parr 2006) was used to facilitate the GUI programming.
ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
111
This section of the module was assessed by the production and documentation of a java GUI application that emulated the movement of a robot in a maze. It was expected that the design would be based upon an adaptation of the previous robot routines produced in the earlier assignment. A requirement of the assignment was to write a test method runRobot() which was to be called and used to solve the maze (from the red to the green square) as in figure 5. The assignment also specified that forward() and rotate() methods were to be called from within runRobot().
Figure 5. Prototype GUI application from the programming exercise.
As in the problem-solving section the grades, feedback and engagement with the activity were consistently positive. The idea of linking the problem-solving and programming assignments with the same task, was seen as a positive feature. One student made the explicit comment that they felt there was a ‘good progression from problem-solving to programming’. In addition, the students commented that they could take the ideas developed in one part of the module to the second part, thus evidencing clear transferability of skills. The module tutor has found that the students not only find the programming of GUIs in Java challenging and interesting, but fun and exciting. The ‘eureka’ moment is evident with each small problem solved and the increasing functionality of their GUI application. Whilst the assignment itself is complex and may seem daunting to the students at the outset, they gradually become more excited by the ‘revealing’ of each new aspect of Java that is introduced to them partly due to its application to their assignment. This was particularly evident ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
112
with the introduction of two areas of the course: layout managers and repetition. The use of a layout manager (BorderLayout) initially enables the students to arrange the GUI (with Center, East and South JPanels). Then repetition (for loops) offers the ability to add 100 maze squares, initially, in around six lines of code. Then another layout manager (GridLayout) is introduced to finally arrange the squares to give the required GUI. Another interesting observation is that whilst the assignment explicitly stated that the Java GUI application should emulate the one shown in the assignment brief (Figure 5) an additional adaptation of this could be submitted to include extra functionality/complexity – for additional reward! It was pleasing to receive approximately 15% of the assignments wishing to incorporate such extras. One of which can be seen in Figure 6.
Figure 6. Student prototype GUI application showing additional functionality/complexity.
It is felt that the visual approach to programming adopted from the outset and transferability of the visual problem-solving to the visual programming task aids their engagement, enjoyment and learning.
4. Simulations ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
113
A limiting factor, raised in the student’s feedback on the problem-solving approach was the limited availability of the robots. It was not possible for robot kits to be available 24 hours a day - for security reasons - or to be taken home by the students - due to the number of kits available. Therefore an alternative approach of using simulators for the Lego robots was considered. One of the requirements/limitations the module tutors imposed on the choice of a simulator the needed to be accessible/free for the students to download and use, this led to two options Microsoft Robotics Studio (MSRS) and Lego Mindstorms Simulator (Straeter W and Kuensting B 2007).
4.1 Lego Mindstorms Simulator (LMS): The first option was to use the simulator developed at the University of Paderborn (Straeter W and Kuensting B 2007) which proved useful. This package uses the LeJOS API (Sourceforge, 2006) and Java to simulate these robots. Figure 7 shows an example of a line-following robot. The major advantage of this approach is that the code written to control the robots in the simulator can in theory be implemented unchanged on the robots.
Figure 7: LEGO Mindstorms Simulator
Though this is very useful software, it did however, have a few drawbacks as often the code required minor modifications to work. In a small evaluation the students found this package a little harder to use than programming than programming the robots directly. Despite this the potential of this package means work is still on-going on developing its use for this application. This package has since been incorporated into a module on artificial intelligence techniques, where the students have the additional experience to be able to use this package. 4.2 Microsoft Robotics Studio: A series of on-line learning material has been ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
114
developed, centred on Microsoft’s Robotics Studio (Microsoft, 2006) for teaching problem-solving. It had been decided early on in the project that the Visual Programming Language, integral to Robotics Studio, would be used due to its visual nature (Figures 8 & 9).
It was expected that these material could be integrated within teaching in two ways. First as sections 1 and 2 are general problem-solving exercises and material, admittedly with a programming bias, can be integrated into one exercise to enhance these skills.
Figure 8. Visual programming Language example
Figure 9. Simulator example
ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
115
Evaluation of this package by a small group of five students, before they started the problem-solving material, concluded that the Visual Programming Language was not easy to work with, though one of the students who had previous experience of programming did like the package. The major hurdle to use this in the University of Northampton module was that it moves away from the original concept of teaching problem-solving using a language (for example Java) where the students will later go on to develop their own solutions in a more general way. The simulation, though, is visually appropriate and interest has been shown in using it with engineering students, where the language choice is less significant. 4.3 Comparison of the approach: Though Microsoft robotics studio (MRS) is a very impressive package, for developing pre-programming problem-solving skills, where Java is the follow-on programming language, the LMS approach is more appropriate. If C# was the follow-on language, MRS shows significant potential because of the ability to program the robots in C# through this package.
5. DISCUSSION One of the features suggested by figure 4 is that the student’s still see this is a programming exercise.
Student satisfaction for both parts of the module is over 92%. One of the comments made was that the linking of the problem-solving robot task and the programming assignment was liked. This feedback is similar to that reported by other authors when teaching programming using robots (Williams et al, 2003). There is enough scope in this approach to have different levels of complexity/functionality within an assignment task offering a basic ‘pass’ level for a particular task, but also the scope for those students that desire more of a challenge.
6. CONCLUSIONS This is an area which the authors feel can be developed further. The results suggest this approach is worth investigating based on the indicative increase in grades and the positive response of students. The improvements to the approach that were suggested by the students can be summarised as more access to the robots, possibly more featured robots, and increased difficulty of the exercises.
ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
116
The main benefit was that the students believe robots provide a method to visually and physically see the outcome of a problem. The approach taken in both parts of the module has been visually-orientated. The appropriateness of this seems to be borne out by the student comments.
A limiting factor to the approach is availability and numbers of the robots. It is not possible for the robot kits to be available 24 hours a day or to be taken home by the students. An area under investigation is to develop the material, instead of being based around these robots, using Microsoft’s Robotics Studio. Microsoft Robotics Studio is free so is readily available, and is part of Microsoft’s growing interest in robotics (Gates 2007). This has been selected to still keep some of the advantages of the robot-based approach, but increase flexibility of where and when the student’s can use the material. This increases the flexibility of where the student can work on this material and fits in this the university Elearning strategy. The ongoing activity in this work is focussed on three key areas in the shortterm: •
•
•
Development of the simulations approaches. Though there are currently problems with the simulator used thus far. These are not insurmountable and could address some of the issue raised in the evaluation stages. Improvement in the physical properties of the robot. The latest version of the Lego Mindstorms robotic kits, Mindstorms NXT (Lego, Denmark), include features that have the potential to lead to more interesting tasks. The robot construction is also more resistant to falling apart. The further development of generic problem-solving skills is seen as an area of development. These techniques have also crossed over into an engineering course. This cross-discipline work is also leading to further feedback on the approach from a different perspective, but also new ideas that could be incorporated in to this work.
A possible further direction that is being considered for the problem-solving part is a problem based learning approach (Beaumont and Fox, 2003) which seems a sensible direction to explore. This would also help address the possible concern over the ownership of the problem, moving the problem from one that the tutor sets to their own problem, whether an individual or group activity.
There two other areas where this material can be developed further. The first is creativity. The authors feel that not many people would argue against the idea that computing has a creative element, see for example Grand Challenges in Computing Education (McGettrick et al, 2004). The use of the embedded ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
117
simulator can help with developing this, by adding the ability to create objects, different robots, etc. Confidence building is another area, as whatever is developed within the simulator will not affect anything in the real world and it is felt, increases the student’s confidence to try out different ideas.
ACKNOWLEDGMENTS The development of this approach has been supported by the HE-ICS Development Fund and the HE-ICS/Microsoft Innovative Teaching Fund.
Appendix A www.computing.northampton.ac.uk/~scott/robot2.html resource directly related to this work. www.computing.northampton.ac.uk/~scott/robot1.html related resource to this work using some of the same material but based around Java.
REFERENCES Beaumont C and Fox C (2003) LEARNING PROGRAMMING: ENHANCING QUALITY THROUGH PROBLEM-BASED LEARNING Proceedings of 4th Annual Conference of the ICS HE Academy Galway 26-28 August 2003 Proceedings pg 241-242. Becker BW (2006) Java: Learning to Program with Robots Thomson ISBN 0619-21724-3. Bell D, Parr M (2006), Java for Students, 5th Edition, Prentice Hall. Culwin F, Adeboye K, Campbell P (2006) Pooples-Pre-Object Orientated Programming Learning Environments Proceedings of 7th Annual Conference of the ICS HE Academy Trinity College, Dublin, 29th - 31st August 2006 pg 59-63 Fagin B (2003) Ada/Mindstorms 3.0 IEEE Robotics and Automation Magazine June pg 19-24 Gates, B (2007) A Robot in Every Home, Scientific American January pp. 58-65. Lawhead PB, Bland CG, Barnes DJ, Duncan ME, Goldweber M, Hollingsworth RG, Schep M (2003), A Road Map for Teaching Introductory Programming Using LEGO Mindstorms Robots SIGCSE Bulletin, 35(2): 191-201. McGettrick A, Boyle R, Ibett R, Lloyd J, Lovegrove G and Mander K (2004) Grand Challenges in Computing: Education, The British Computing Society ISBN 1– 902505–63–8. ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
118
Microsoft (2006) Microsoft Robotics Studio http://msdn2.microsoft.com/enus/robotics/aa731520.aspx accessed on 14/2/2008 University of Minnesota (2003) Five steps in problem- solving[online] http://cda.mrs.umn.edu/~fauxr/computing/problemsolve.html accessed on: 10/10/2003 Price BA, Richards M, Petre M, Hirst A and Johnson J (2003), Developing robotics e-teaching for teamwork, Int. J. Cont. Engineering Education and Lifelong Learning, Vol. 13 Nos1/2. Straeter W and Kuensting B (2007) LMS-Lego Mindstorms Simulator http://ddi.uni-paderborn.de/en/software/lego-mindstorms-simulator.html accessed on 31/10/2007. Sourceforge (2006) LeJOS: Java for Mindstorms http://lejos.sourceforge.net/p_technologies/rcx/downloads.php accessed on 14/02/2008. Turner S and Hill G (2006) The Inclusion Of Robots Within The Teaching Of Problem Solving: Preliminary Results Proceedings of 7th Annual Conference of the ICS HE Academy Trinity College, Dublin, 29th - 31st August 2006 Proceedings pg 241-242. Turner S and Hill G (2007) Robots in Problem-Solving and Programming 8th Annual Conference of the Subject Centre for Information and Computer Sciences, University of Southampton, 28th – 30th August 2007, pp 82-85. Williams AB (2003) The Qualitative Impact of Using LEGO MINDSTORMS Robot to Teach Computer Engineering IEEE Trans. Educ. Vol. 46 pp 206.
ITALICS Volume 7 Issue 1 June 2008 ISSN: 1473-7507
119