Using Game-based Learning in Teaching CS Algorithms

3 downloads 0 Views 239KB Size Report
consistency algorithms (i.e AC-3 algorithm) and their combination with search algorithms (i.e. depth-first with backtracking). In addition, we investigate how ...
Using Game-based Learning in Teaching CS Algorithms Ioannis Hatzilygeroudis, Foteini Grivokostopoulou, Isidoros Perikos School of Engineering Department of Computer Engineering & Informatics University of Patras 26500 Patras, Hellas (Greece) { ihatz, grivokwst, perikos }@ceid.upatras.gr

Abstract— Artificial Intelligence curriculum comprises some difficult concepts for a student to grasp and traditional teaching methods are proven to be ineffective and unable to motivate them. A basic AI concept is Constraint Satisfaction (CS), which is acknowledged by most tutors to be a hard domain for teachers to teach and student to understand. To solve a CS problem (CSP), a CS algorithm should be used. In this paper we present a game based approach, to be used as an assistant tool in an AI course, to assist students in understanding CS algorithms in an easy, interactive and motivating way. The game is based on a classical CSP, the map coloring problem. Preliminary evaluation results are quite encouraging. Game based-learning ; Constraint Satisfaction Algorithms

I.

INTRODUCTION

Artificial Intelligence (AI) is a field that does not have a generally accepted definition. AI is the field of computer science that tries to do things that are difficult or impossible to do with traditional programming techniques. So, teaching AI is a hard task that cannot be approached as a traditional Computer Science or Software Engineering subject. The traditional manner can become a boring task for the students. On the other hand, the students get excited when using electronic means and somehow participate in the learning process. So, the computer games incorporated can be used as tools for teaching Artificial Intelligence (AI) concepts. Computer games can be used to teach almost every area of computer science. Many students, like most individuals, spend a large part of their entertainment time playing computer games. Computer games have been used successfully in both introductory computer science courses [9][1] and general artificial intelligence classes [3][11] to build excitement and enthusiasm. Indeed, through games students are given motives to increase their interest and teachers to implement the learning by doing or by participating principle. So, the students have a framework for better grasping or understanding AI concepts. A basic concept in Artificial Intelligence is Constraint Satisfaction (CS), a general approach for solving what are called Constraint Satisfaction Problems (CSPs). This is part of almost any introductory AI course and textbook [10][5]. Usually, students find difficulties in understanding the concept of constraint satisfaction.

In this paper, we present a computer game that can assist teaching in an AI course. The game implements the mapcoloring problem [4]. Map-coloring game offers an environment for learning concepts related to CS, like the arc consistency algorithms (i.e AC-3 algorithm) and their combination with search algorithms (i.e. depth-first with backtracking). In addition, we investigate how students can grasp CS related concepts and solve various map-coloring problems. Initial evaluation results look promising. II.

GAMES FOR TEACHING AI ALGORITHMS

There are a number of efforts for using games in teaching AI. In [6] the N-Puzzle game is used for teaching state-space search and machine learning. In the introductory artificial intelligence course at UC Berkeley, the Pac-Man game has been used for teaching AI concepts such as, state-space search, adversarial search, Markov decision process, reinforcementlearning and probabilistic tracking [3]. Furthermore, the Rook Jumping Maze has been used for teaching uninformed search, stochastic local search and machine learning [8] . A common characteristic of the above efforts is that games are mainly involved in AI programming projects. A project is designed based on a game that asks for implementation of algorithms concerning state search, reinforcement learning, etc. The game acts as a motive for the students to make the implementations. Another effort is presented in [2], where a game-based learning approach is used to help students learn graph theory topics and more specifically Kruskal’s, Prim’s and Dijkstra’s algorithms. The game is called Ticket to Ride and the students through the missions that they choose about connecting one city to another, come across the implementation of the above algorithms. This effort has more similarities with ours. In this paper, we present use of a game for teaching basic concepts of constraint satisfaction (CS) problem solving. The main objective of this effort is not to involve the game in some programming tasks, but to design it for allowing students to grasp concepts while playing the game. We want to use the game as a means of students creating a right cognitive model of the corresponding concepts or processes. To this end, a game based on the map-coloring problem is used to attract the attention of the students and enhance the traditional way of

exercising in an AI introductory course. By playing the game, a student comes across concepts of CS and unknowingly emulates steps of the corresponding algorithms. III.

MAP-COLORING AS CSP

Constraint satisfaction (CS) is a general approach for solving problems, which can be expressed as constraint satisfaction problems (CSPs). A CSP is defined as follows. Given a finite set of variables, together with a finite set of possible values that can be assigned to each variable and a list of constraints, find the values of the variables that satisfy every constraint. The map-coloring problem is a problem that can be modelled as a CSP. In this problem, a map consisted of a number of regions is given and we need to color each region of the map with one of a given set of colors in such a way that no two adjacent regions have the same color. Figure 1 shows a simple map-coloring problem. The map has four regions that are to be colored red, green or blue.

Figure 1.

Associated with every CSP is a constraint graph. The constraint graph contains a node for each variable and an edge between each pair of nodes for which there is a constraint between the corresponding two variables. Figure 2 presents the constraint graph for the map coloring problem of Figure 1. Each edge represents two adjacent regions in the map. We are developing a CSP on finite domains to be solved using a form of search, in particular, AC-3 algorithm and a combination of the AC-3 and depth-first with backtracking algorithms, which are among the fundamental mechanisms of artificial intelligence. Also, how to solve the map-coloring problem as a CSP is covered in almost all textbooks [10][5]. IV.

GAME DESCRIPTION

We designed and implemented a computer game that help students to understand CS algorithms. The implementation of the game is based on the map-coloring problem, presented as a CSP. The game is called “Coloring Map” and a snapshot of it is illustrated in Figure 3.

A 4-region map-coloring problem.

The problem in Figure 1 can be represented as a CSP as follows: • A set of variables V: Each variable represents a region in the map. In our case: V={V1,V2,V3,V4}. • A set of value domains D: Each domain includes the values that corresponding variable can take. In our case: D={D1,D2,D3,D4} and D1=D2=D3=D4={red, green, blue}. • A set of constraints C: Each constraint represents a relation between variables of the problem. In our case, C={C12,C14,C23,C24,C34}, where Cij ≡ Vi≠Vj (that is each region represented by its corresponding variable has a different color/value from its adjacent region).

Figure 2.

Graph representation

Figure 3.

A snapshot of Map-Coloring Game

The design of the game was based on the following requirements (or objectives). First, the game should assist students in learning and tutors in teaching CS related concepts. Second, the game should be easy to learn and play. Third, the game should be fun and challenging. The game has been implemented in the Microsoft XNA platform [7], a game development suite of tools for use with Visual C#. We selected the map-coloring problem to implement as a computer game for two reasons. First, it is a classical example problem for illustrating CS algorithms and is covered in almost all textbooks. Second, it is suitable for optical representation of each step of the algorithmic process in a natural way, without a heavy cognitive load. These both help students in realizing and grasping the notion of constraint propagation occurring during CS problem solving. The goal of the game is to help students to understand CSP solving. The map-coloring game is a one-player game played coloring the map, using a set of available colors so that the adjacent regions the map do not have the same color. The complexity of the generated maps (number of distinct areas) and the available colors set are parameterized. The students can select the kind of the game to be played. The available modes

of the game are “Educational game” and “Fun game” (Figure 4).

Figure 4.

The alternative mode of the game is the “Fun game”. It is more challenging and fun oriented. The student cannot select the difficulty level of the game, but has to solve predetermined levels of the map-coloring problem, each one in a specified amount of time, making the game more challenging and motivating. Additionally, the game calculates the student's score, which is determined by the difficulty level of the problem and the time taken to solve it. In Figure 6, the time and the score of the student are depicted.

The options menu of the game.

In the “Educational game”, the students determine the complexity of the problem to be solved. They can either decide by themselves on how many colors they think are adequate for solving the problem or can choose one of the three available difficulty levels. In the first level, students use two additional colors beyond the minimum required. In the second level, one additional color is used and in the third level the minimum number of colors are used, thus making the game more difficult to solve. Additionally, the students can choose to play the map-color game using help or not. The latter is concerned with whether the user chooses from the set of all available colors for each area, or the system filters the colors that cannot be used (i.e. propagates the constrains, in other words makes an AC-3 step). In this way, the student gets a useful model of how the constraints are propagated, which is an important and fundamental characteristic of CSPs. Furthermore, a student can step back to previous states (of the solution path), a process known in search algorithms as backtracking. Backtracking is in several cases a difficult to grasp aspect of search algorithms. Using the game, the student can see it in practice while playing. Finally, the student can solve the problem as many times as he/she wants, using different color combinations, thus producing a set of different solution paths (Figure 5).

Figure 6.

The time and score of “Fun game”.

V.

“Coloring-Map” game described above can be used in different ways in an AI introductory course. First, it can be used before teaching students search algorithms or solving CSPs, to draw students' attention and motivate them. Playing with the game, students unknowingly become familiar with concepts like constraints propagation, backtracking, multiple solution paths etc by actually emulating steps used by a search algorithm. This can greatly facilitate teaching of the theory behind CSP solving and corresponding algorithms, which may come next. So, then students attend corresponding lectures and tutorials on CSP solving and algorithms. Finally, they can use the game again to test the obtained knowledge on algorithms and experiment with them, working out their differences and details. This can be easily done, given that really the game can take on many different configurations and make multiple tradeoffs between complexity and fun factors Of course, in using the game the tutor could specify different scenarios to make learning more directed and avoid useless playing. VI.

Figure 5.

A snapshot of “Educational game”.

USING THE GAME

EVALUATION

An evaluation of the results of using the game in teaching CS aspects in the introductory AI course at our Department during last semester was conducted. In the evaluation, 10 undergraduate students from those enrolled in the course participated. We created two groups of five students each named group A and group B respectively. We selected randomly group A to play with game and group B not to play

it. After that, all the students of the groups took a test with questions related to CSPs and algorithms. The results of the test (Table I) show that students of group A, who used the map-coloring game had a better performance (56%) than those of group B who did not used (44%) it. TABLE I.

STATISTICS OF TEST

Group

Correctly (%)

Group A

56%

Group B

44%

So, the students who interacted with the game seem to better understand the CSP solving. Then, they were asked to fill in a questionnaire including questions for evaluating usability of the game, stating their experience and their opinions about the learning impact of the game in teaching CSP. The questionnaire included seven questions. The questions Q1-Q5 were based on the Likert scale (1: not at all, 5: very much). Questions 6-7 were open type questions and concerned strong and weak points of the game or problems faced and also improvements that can be made to the game. TABLE II.

offer to the students an entertaining, interactive and most of all motivating way to experience with and learn about CSPs. The evaluation results are very encouraging. The students found the game an enjoyable experience. From an educational perspective, the game had a positive impact on students’ engagement and motivation and the evaluation results obtained indicate that the game helped students in learning CSP aspects. More specifically, the game helped students get a better insight of the representation of CSPs and also of the implementation of the AC-3 and the search algorithms. However, there are some points that the game could be improved. A larger scale evaluation could be conducted in order to get a further insight how the game is performing. Moreover, an aspect for future work is to create a graphical representation of search tree at each student's choice. More information about the game as well as a downloadable versions of it, are available at: http://aigroup.ceid.upatras.gr/index.php/en/tools ACKNOWLEDGMENT This work is supported by the project “Research in Informatics” (Research Committee, University of Patras, Greece, Project No C355)

QUESTIONNAIRE RESULTS

REFERENCES

ANSWERS (%) Q

QUESTIONS

1

2

3

4

5

1

How enjoyable is it to play?

0

0

14

34

52

2

How difficulty/easy is to play?

0

0

22

24

54

3

How much the game did assisted you to learn CSP? Will you suggest the using of the game to next year students? Did you find the interface of the game helpful?

0

3

19

39

39

0

0

14

32

54

0

0

14

61

21

4 5

In general, students’ feeling about the game was positive, as summarized in Table II. Students in general enjoyed playing with the game with an average score 4.4 (Q1, Table II) and also found the game relatively easy to play with an average score 4.3 (Q2, Table II). In addition, most of the students agreed that the game helped them in learning Constraint Satisfaction Problems and also that it will be helpful to incorporate it into the AI course. VII. CONCLUSIONS AND FUTURE WORK Contemporary education may not be based exclusively on class lectures, given the current capabilities of game technology. Educational games are suitable for a more engaging, motivating and entertaining learning. In this paper, we present a game developed to help students get familiar with CSP solving. The game was developed to

[1]

Bayliss, J. D. 2007. The effects of games in CS1–3. Journal of Game Development 2. [2] Chang, WC., Chiu, YD., Li, MF., 2008. Learning Kruskal’s Algorithm,Prim’s Algorithm and Dijkstra’s Algorithm by Board Game, International Conference on Web-based Learning, pp. 275-284 [3] DeNero, J., and Klein, D. 2010. Teaching introductory artificial intelligence with pacman. In Proc. of the EAAI Symposium. [4] Fritsch, R. and Fritsch, G. 1998. The Four Color Theorem, History, Topological Foundations and Idea of Proof, Springer - Verlag, New York. [5] Luger, G. F 2004. Artificial Intelligence: Structures and Strategies for Complex Problem Solving. 5th Edition, Addison-Wesley. [6] Markov, Z., Russell, I., Neller, T., Zlatareva, N. 2006. Pedagogical Possibilities for the N-Puzzle Problem. In Proc. of the 36th ASEE/IEEE Frontiers in Education, S2F-1 - S2F-6. [7] Microsoft Corporation. XNA developer centers. http://msdn.microsoft.com/en-us/aa937791, Retrieved February 2011 [8] Neller, T. W. 2011. Rook Jumping Maze Generation for AI Education. In Proc. of the 24th FLAIRS Conference, 382-387. [9] Parberry, I., Roden, T. and Kazemzadeh, M. B. 2005. Experience with an industry-driven capstone course on game programming. In Proc. of the SIGCSE Symposium. [10] Russell, S.J. and P. Norvig. 2003. Artificial Intelligence A Modern Approach. Second Edition. Prentice Hall, Englewood Cliffs, New Jersey. [11] Wong, D., Zink, R. and Koenig, S. 2010. Teaching artificial intelligence and robotics via games. In Proc. of the EAAI Symposium.

Suggest Documents