^{1}], [

^{2}], [

^{3}]. It seems that the game is interesting and more acceptable for students to realize the abstract concepts through the real-world examples. However, the game rules of the traditional puzzle games are predefined with the fix set of Boolean expressions. It is not easy for teachers to collect related games or modify the rules to teach the designated Boolean logic operations. How to design a game-based activity which can manipulate the game rules and the difficulty to meet the specific teaching objectives is a challenging and important issue.

^{4}] as shown in Fig. 1. To assist the students' practice, the Boolean operations, interactive tools, such as electronic circuit simulator [

^{5}], and interactive Venn diagram exercises [

^{6}] are developed. However, the traditional instruction tools can only support students to be proficient with the abstract Boolean logic expression. How to formulate and realize the Boolean logic to real-world case is difficult for students.

^{1}] allows players to practice the Boolean algebra by applying a sequence of Boolean operations on given numbers to produce specific objective numbers. The Logic Puzzle [

^{2}] provides a series of English expressions and asks players to conclude the properties of each subject. The classic Wolf Sheep and Cabbage logic game [

^{3}] allows players to reason and find a solution from every combination of subjects. Although there are several practical case studies of game and logic learning, these games are basically developed for fun. How to further apply the pedagogical theory to the game platform is still a challenging and important issue.

^{7}], [

^{8}] simulated the biology, chemistry, and economics of farm management, and the Fish Tank [

^{9}] simulated the nitrogen cycle in an aquarium. Applying game as assignment [

^{10}], [

^{11}] can motivate students engaging in the assignments with interesting game scenario and game context, such as the scoring, adventure, and competition properties. Applying game creation project [

^{12}] can assist students to easily understand the abstract knowledge with interesting game context. In this paper, we aim to apply the game creation project to support the students' learning. However, the programming is too difficult for the junior high school students. Therefore, providing an easy-to-use tool and the well-designed learning activity is important to apply the game-based creation approach.

^{13}], the turtle graphics, is one of the oldest libraries used to introduce computing concepts to beginners in the early 1970s. The concept of a “turtle” that can move across a 2D plane with a pen, which can be positioned on or off the ground, and thus, may leave a trace of the turtle's movements. Programming the turtle to draw different patterns can be used to introduce general computing skill, such as procedural operations, iteration, and recursion. The process of computing can be easily realized for students by mapping onto the turtle world.

^{14}], [

^{15}], [

^{16}], [

^{17}], [

^{18}]. The programming is based on a virtual robot, named as Karel, in a 2D grid world with walls around and beepers to collect. Similar to the turtle graph, it provides a metaphor for students to easily understand the physical meaning and execution effect of the abstract object-oriented programming by observing the changes of objects' behavior in the 2D grid world.

^{19}] is an educational programming tool specially designed for students to understand the concepts of object-oriented programming by visualizing the properties, such as classes, objects, and methods, etc. The BlueJ tool provides the class diagram for students to define classes and their relations. Next, the execution screen supports strong graphical feedback to visualize how objects behave to reflect the designed class diagram.

^{20}], [

^{21}], [

^{22}], [

^{23}] is the object-oriented programming tool that supports the concept of learning within given scenarios and storytelling, e.g., it supports several predefined game scenarios as learning samples and students can directly interact with visualized objects called actors to build up a game based on teacher's assignment. Currently, classical computer applications including robot control, ant colonies ecological simulation, the lifts simulation, and turtle graphics, etc., are provided.

^{24}], [

^{25}], [

^{26}] developed by Resnick from MIT Media Lab is another game creation platform based on the self-defined object-oriented programming language. It should be noticed that the Scratch programming tool provides building-block-based interface with low barrier and high expressive programming power. With the easy three steps including image, program, and share, the children can easily create their own games or animations and upload them to the Scratch online website to share their works with other community members.

^{27}] from CMU provides an object-oriented 3D animation programming tool for the introductory computer science courses. The properties and behaviors of 3D objects can be learned by editing or programming for the animation. To further make computer programming more attractive for middle school girls, the Storytelling Alice [

^{28}] was proposed. Three major improvements were made in the comparison of Storytelling Alice to generic Alice: the high-level animation by analyzing the storyboard that the girls created, the library of 3D models to help spark idea, and the story-based tutorial through Stencil technique.

Teaching Boolean logic realization: How to manipulate the difficulty of Boolean logic to assist students in easily observing the effects of specific logic operations.

Teaching real-world case formulation: How to manipulate the dissimilarity among different modified game scenarios to choose appropriate difficulty of game case for students' formulation practice.

**3.2.1 The Game Context**The elements of the Pac-Man game can be defined as follows: The main game scenario of the Pac-Man is that a player controls Pac-Man through a maze, eating pac-dots. When all dots are eaten, Pac-Man is taken to the next stage. Four ghosts including

*Blinky, Pinky, Inky, and Clyde*roam the maze, trying to catch Pac-Man. If a ghost touches Pac-Man, a life is lost. When all lives have been lost, the game ends. Thus, the game objects include Pac-Man, ghost, pac-dot, power pill, and fruit. To simplify the discussion, the game rules which are embedded on the specific game object are controlling the behavior of the object. The definition of elements of the game rule is as follows:

**Definition 1 (The Elements of the Game Rule).** *The game rule of a game is defined as , where the O is a set of game objects representing the scene objects and roles in the game scenario, the S is the actions in the game scenario including the change of events and status, and is a set of game rules with left side of compound event representing trigger conditions and right side the status changing actions.*

In the Pac-Man game, the , the , and the R are shown in Fig. 4. Each game rule is composed with left-side compound conditions and right-side actions. There are three types of rules corresponding to different actions. The is the surviving rule, the and are the scoring rules, and the and are the ending rules.

**3.2.2 The Platform Context**The Scratch [

^{21}], [

^{25}] open source programming tool was developed by Resnick [

^{26}] from MIT Media Lab in 2007 for students to easily create games and share their creations. The Scratch is used as the learning platform in the Boolean logic learning. The Scratch programming tool is based on the self-defined object-oriented programming language with the support of the logical operators including the conjunction, disjunction, and negation. As shown in Fig. 5, the WYSIWYG (what you see is what you get) interface of the Scratch programming tool allows students to easily compare the game scenario (the left part of Fig. 5) and game rules (the right part of Fig. 5).

To provide the game-rule-tuning activity, the events and subroutines of original *Pac-Man* game, such as *Ate_Power_ Pill, Touched_Ghost, and Score etc.* are controlled by the corresponding global variables. For example, the game events of *Ate_Power_Pill* can be obtained from the global variable *eat_pill* in a period of time and the subroutines of *Score* can be activated by reconfiguring the global variable *score*. Therefore, the students can tune the logic expressions of game rules, using the Scratch components including global variables, if-statements, logical operations, and variable operations as shown in Fig. 6.

*Pac-Man*game are provided in the Boolean logic expression, for example,

*“If Ate_Power_Pill AND Touched_Ghost then Score*.” Then, the quest of game rule tuning with new operation, such as “

*changing logical AND to logical OR*” is given to students. Next, students can obtain the new game with new rule,

*“If Ate_Power_Pill OR Touched_Ghost then Score”*in the modified Pac-Man game. Students can play the game and analyze the change of the difficulty degree and interesting degree of the game.

*“tuning the game rule to allow the Pac-Man to get score when touching the ghost without eating the power pill.”*

*adding more constrains with logical AND operation*and

*providing more options with logical OR operation*in the game scenario. For example, the scoring rule can be modified from the original expression, “

*If (Ate_Dot*OR

*Ate_Fruit*), then

*Score”*to the complex conditions: “

*If ((Ate_Dot*AND NOT

*Lose_once)*OR (

*Lose_once*AND

*Ate_Pill*AND

*Ate_Dot*) OR (

*Ate_Dot*AND

*Ate_Fruit*)), then

*Score.”*The new scenario means

*“the Pac-Man will not be able to eat the pac-dot to score while loses once except eating the pill or fruit to recover.”*The complex conditions can be modeled and taught in the game.

**Definition 2 (Game Rule Boolean Logic Expression).** *The game rule Boolean logic expression is a context-free grammar as follows: Let be a set of terminal symbols representing the propositions of Boolean expression with S being the start symbol and N a nonterminal symbol. In each game rule, the implication operator ( ) appears once, where the left side represents the conditional propositions and the right side represents the game action propositions. Thus, the grammar of game rule Boolean logic expression R is as follows: .*

**Definition 3 (The Disjunctive Normal form of Game Rule).** *A Boolean logic expression or a formula is in disjunctive normal form (DNF) if it is a disjunction of clauses, where a clause is a conjunction of literals, for example, “ .”*

**Example 1 (The Game Rule of Scoring in Context-Free Grammar).** For the game rule, *“If (Ate_Pill AND Touched_Ghost) OR Ate_Fruit then Score,”* let P, T, F, and C annotate the facts *Pac-Man Ate_Pill, Touched_Ghost, Ate_Fruit,* and *player Scored,* respectively. Then, the Boolean logic expression of the game rule is represented as “ .”

**Definition 4 (Difficulty of Boolean Logic Expression).** *The difficulty measurement is defined as , where e ,*

**Definition 5 (Game Rule Case).** *A game rule case is a set of Boolean logic expressions, which are modified from Pac-Man game rules.*

**Definition 6 (Dissimilarity of Game Rule Cases).** *The dissimilarity of two propositional logic expression e1 and e2 is defined as , where is the number of different propositions between and . Thus, the dissimilarity of two cases of games A, B is .*

**Example 2 (Dissimilarity of Game Rule Cases).** This example introduces the dissimilarity among Case 1, Case 2, and Case 3 in Fig. 6. First, the game rules of three cases are shown.

*Ate_All_Dot,*respectively; L, C, and O are the propositions that players

*Lose_Once, Score,*and

*Win*; G denotes that

*Ghost_Ate_Pill*. The transformation of expressions into DNF can replace the implication statement with and remove the parentheses using the De Morgan's law: . For some case, the distributive law should be further applied to obtain the DNF. The original case rules above can be converted into the disjunctive normal form of the corresponding Boolean logic expressions as follows:

1. The pretest and posttest of students' scores have significant improvement in experimental group.

2. The posttest scores of students in experimental group have significantly greater achievements than students in control group.

Table 1. Students Joined the Experiment

^{29}], the mathematic ability and logic ability are usually applied together for investigating issues logically. To make sure that students selected in two groups have the same level of logic ability, the pretest has been applied. The pretest results show that students in two groups, which have the same level of mathematical scores also have the same level of logical ability.

*Pac-Man rule*,

*poker game*, and

*school regulation*. Students should answer true or false and explain correctly for the statements. The test sheet is applied in pretest and posttest without giving students answers after the tests.

Table 2. The Test Sheet for Boolean Logic Realization

**5.1.1 Comparison of Learning Improvements**The scores and the evaluations of the learning improvements between pretest and posttest are shown in Table 3. To evaluate the difference between two groups, the paired two-sample t-test for means of scores is applied. A statistically significant score is found for the pretest and posttest scores in experimental group with and . For the control group, the scores of pretest and posttest are not found to be statistically significant with , . Consequently, the t-test results of the experimental groups suggest significant differences but the control group has no significant differences. Finally, we may conclude that only the experimental group has significant learning improvement.

Table 3. The Paired t-Test of Pretest and Posttest Scores for Control Group and Experimental Group

**5.1.2 Comparison of Learning Outcomes**The evaluations of the learning achievements of posttest are shown in Table 4. To evaluate the difference between two groups, the unpaired two-sample t-test for means of scores is applied. The t-test result for pretest shows that F-value is 1.35117 and p-value is 0.3774. Consequently, the t-test results of the two groups suggest no significant differences for scores of pretest at a confidence interval of 95 percent. The t-test result for posttest shows that F-value is 1.56083 and p-value is 0.01946. Consequently, the t-test results of the two groups suggest significant differences for the scores of posttest at a confidence interval of 95 percent. Finally, we may conclude that the experimental group has higher learning achievement than control group.

Table 4. The Two-Sample t-Test of Pretest and Posttest Scores for Control Group and Experimental Group

*poker game*and

*school regulation.*It supports that the students with game-rule-tuning activity may have better capability to apply the Boolean logic to the new problems. From the teacher's feedback, the students in experimental group surprisingly engaged in the activity and had many discussions with peers and with their teacher.

Although the game-based learning is interesting for students, the game is additive for students. Therefore, the teacher should control the progress of the teaching stages and provide a clear and well-designed learning goal.

Since teaching the realization of Boolean logic is our main objective, choosing the well-known game with simple game scenario is better for students to quickly catch the point.

The learning materials and learning platform should be prepared for students to avoid wasting time in getting familiar or while installing the preliminarily used tools.

Understanding the application of Boolean logic affecting the interesting games is surprisingly attractive for students to actively engage in the learning activities.

# Acknowledgments

*J.-F. Weng and T.-J. Lee are with the Department of Computer Science, National Chiao Tung University, EC447 KDELab, No. 1001, Ta Hsueh Road, Taiwan 300, R.O.C.*

*E-mail: roy@cis.nctu.edu.tw, freeman1217@gmail.com.*

*S.-S. Tseng is with the Department of Information Science and Applications, Asia University, EC447 KDELab, No. 500, Lioufeng Rd., Wufeng, Taichung 41354, Taiwan, R.O.C. E-mail: sstseng@asia.edu.tw.*

*Manuscript received 9 Dec. 2009; revised 17 Apr. 2010; accepted 26 Aug. 2010; published online 14 Oct. 2010.*

*For information on obtaining reprints of this article, please send e-mail to: lt@computer.org, and reference IEEECS Log Number TLTSI-2009-12-0193.*

*Digital Object Identifier no. 10.1109/TLT.2010.33.*

#### References

**Jui-Feng Weng**received the BS and MS degrees from the Department of Computer and Information Science, National Chiao Tung University, Taiwan, in 2000 and 2002, respectively. He is currently working toward the PhD degree at the Department of Computer Science, National Chiao Tung University, Taiwan. His current research interests include e-learning, knowledge engineering, expert systems, and data mining.

**Shian-Shyong Tseng**received the PhD degree in computer engineering from National Chiao Tung University in 1984. From 1983 to 2009, he was on the faculty of the Department of Computer and Information Science at National Chiao Tung University. From 1991 to 1992 and 1996 to 1998, he acted as the chairman of the Department of Computer and Information Science. From 1992 to 1996, he was the director at the Computer Center, Ministry of Education, and the chairman of Taiwan Academic Network (TANet) Management Committee. In December 1999, he founded the Taiwan Network Information Center (TWNIC) and was the chairman of the board of directors from 1999 to 2005. He was the dean in the College of Computer Science, Asia University, from 2005 to 2008. He is currently a vice president of ASIA University and the chairman of the board of directors of TWNIC. He is an editor-in-chief of the

*International Journal of Digital Learning Technology*and an editor of the

*International Journal of Fuzzy Systems*, the

*Journal of Internet Technology*, and the

*International Journal of Computational Science*. He is also a co-editor-in-chief of the

*Asian Journal of Health and Information Science*. He was named an Outstanding Talent of Information Science of the Republic of China in 1989. He obtained the 1992, 1994, and 1995 Outstanding Research Awards of the National Science Council of the Republic of China. He was the winner of the 1990, 1991, 1998, and 2000 Acer Long Term Awards for outstanding MS Thesis Supervision and the winner of 1992 and 1996 Acer Long Term Awards for outstanding PhD Dissertation Supervision. He was also awarded the Outstanding Youth Honor of R.O.C. in 1992. His current research interests include expert systems, data mining, computer-assisted learning, and Internet-based applications. He has published more than 100 journal papers. He is a member of the IEEE and Phi Tau Phi Societies.

**Tsung-Ju Lee**received the BS degree in mathematics from TungHai University in 2000 and the MS degree in applied mathematics from National Chiao Tung University, Taiwan, in 2002. He is currently working toward the PhD degree in the Department of Computer Science, National Chiao Tung University, Taiwan. His current research interests include machine learning, data mining, and various applications, especially in network security, e-learning, and software testing.

| |||