You are on page 1of 83

TITLE PAGE

INTELLIGENT
RECOMMENDER SYSTEM
FOR
ONLINE QUIZ GAME

CHOLU-PETER VICTOR
128142

SUPERVISOR:
DR. YETUNDE FOLAJIMI

A dissertation in the Department of Computer Science submitted to the


Postgraduate School in partial fulfillment
Of the requirements for award of a Master of Science Degree (M.Sc) in
Computer Science of the University of Ibadan, Ibadan, Nigeria

APRIL, 2014

i
CERTIFICATION
This is to certify that this work was carried out by CHOLU-PETER Victor (Matriculation
Number: 128142) in the Department of Computer Science, University of Ibadan, Ibadan,
Nigeria as part of the requirement for the award of M.Sc degree in Computer Science, under
my supervision.

Dr. Yetunde Folajimi Date

Supervisor

Computer Science Department

University of Ibadan.

Dr. A.B. Adeyemo Date

Head of Department (HOD)

Computer Science Department

University of Ibadan.

ii
DEDICATION
This research work is dedicated to God Almighty – The Author and Finisher of my faith,
without whose unflinching support, it might never have happened. To my parents, Mr. and
Mrs. P.E. Cholu, who strived hard to make my MSc programme a reality.

To my Sunshine who remains my greatest discovery, Abbie. You and me, love.

In loving memory of my Uncle Mr. G.O. Ediale.

iii
ACKNOWLEDGEMENTS
I would like to express my sincere gratitude to my supervisor Dr. Yetunde Folajimi whose
constructive criticism, insights, corrections, and motherly and Christ-like love made this
project work a reality and my colleagues who have shared with me their opinions about this
project right from the design stage to the implementation and testing stages and suggested
improvements and corrections. I acknowledge with thanks the academic staff of Computer
Science especially those who taught me in the course of this programme – Dr. Adeyemo
(HOD), Dr. Akinkunmi, Dr. Robert, Dr. Okike, Dr. Osunade, Dr. Longe, Dr. Folajimi
(Supervisor), Dr. Makolo, Dr. Mrs. Adeyemo (my amiable mother), Mr. Adeniji, Mr.
Akomolafe and not forgetting Dr. Akinola (PG Coordinator), Mr. Oguntunde, Dr. Oladejo, etc.

I would also like to thank the following people for their excellent contributions to the content
of this research work. Ajayi Abiodun, Akinyemi Damilola, Abdulganiy Idris, Abiona Tunde,
Osundiran Ayoade, Adeleke Idris, Suberu Sally, Nwanne Uzo. My boss and uncle – Mr.
Oguntoye Abiodun Stephen. You are the best. God bless you all abundantly.

Personally, I give thanks to Jesus Christ who is, who has been, who will forever be my
everything! Without Christ, my world of colour quickly fades away. In fact, without Him, there
is no me, there will not be any CHOLU-PETER.

My gratitude goes to my friends and colleagues for life for their insights, suggestions and
financial supports throughout the development of this project work. Otunba Ayodeji Iyeola,
Ayangbile Calvin, Wellington Oluwatosin, Unuofin Victor, Balogun Akinrinola Abiodun,
Ogunlola Olusola, Adedoyin Olusola, Abegunrin Ben, Michael Ejeh, Aremu Oluwafemi, and
Ibitoye Michael. Your efforts are greatly appreciated.

Finally, I am forever indebted to every member of my family - Chukwuka, Austin, Christiana,


Emmanuel, Juliet not forgetting my little nieces Covenant and Winner and relations far and
wide. I cannot but say a big “THANK YOU” to my cousins – Florence, Patrick, Martins,
Gloria and Rosemary Ediale together with their mum – Mrs. Alice Ediale. God bless you all! I
am grateful. Thank you all so much for your support, patience, your love, and your belief in
me.

Higher we are going in Jesus name!

iv
TABLE OF CONTENTS
TITLE PAGE i
CERTIFICATION...........................................................................................................................................ii
DEDICATION..............................................................................................................................................iii
ACKNOWLEDGEMENTS.............................................................................................................................iv
TABLE OF CONTENTS..................................................................................................................................v
LIST OF FIGURES.......................................................................................................................................vii
ABSTRACT................................................................................................................................................viii
CHAPTER ONE............................................................................................................................................1
INTRODUCTION..........................................................................................................................................1
Background of the Study............................................................................................................................1
1.1 Problem Statement...............................................................................................................3
1.3 Aim and Objectives...............................................................................................................4
1.4 Significance of the Study.......................................................................................................4
1.5 Limitations and Scope...........................................................................................................4
1.6 Glossary of Terms..................................................................................................................4
CHAPTER TWO...........................................................................................................................................6
LITERATURE REVIEW..................................................................................................................................6
2.0 Introduction..........................................................................................................................6
2.1 Recommendation System......................................................................................................6
2.1.1 Survey of Recommender Systems.........................................................................................7
2.1.1.1 Content-based Methods................................................................................................................8
2.1.1.2 Collaborative Methods...................................................................................................................9
2.1.1.3. Hybrid Methods..........................................................................................................................11
2.1.1.4Limitations of Recommender System Techniques........................................................................12
2.1.1.4.1Content-based Technique..........................................................................................................12
2.1.1.4.2Collaborative Filtering Technique..............................................................................................13
2.2 Game-Based Learning.........................................................................................................14
2.2.1. Adaptive Learning and Web-Based Educational Games......................................................16
2.2.2. Motivation to Play and Flow Experience.............................................................................17
2.2.3 Selected trends affecting game-based learning..................................................................19
CHAPTER THREE.......................................................................................................................................21
SYSTEM ANALYSIS AND DESIGN...............................................................................................................21
3.1 Introduction........................................................................................................................21
3.2 Research Methodology.......................................................................................................21
3.3 Analysis of the Existing System...........................................................................................22
3.4 System Architecture............................................................................................................22
3.4.1 System Architectural Pattern.............................................................................................25

v
3.4.2 System Application Architecture..................................................................................................27
3.5 Data Flow Diagram (DFD)....................................................................................................30
3.5.1 Context Level Diagram 31
3.6 Use Case..............................................................................................................................34
3.6.1 Use Case Basics...................................................................................................................34
3.6 Entity Relationship Diagram................................................................................................36
CHAPTER FOUR........................................................................................................................................41
SYSTEM IMPLEMENTATION.....................................................................................................................41
4.1 Introduction........................................................................................................................41
4.2 Proposed System Requirement...........................................................................................41
4.2 Software/Hardware Requirements.....................................................................................41
4.3 Program Implementation....................................................................................................42
4.4 User Documentation...........................................................................................................42
4.5 System Testing....................................................................................................................45
4.6 Limitations...........................................................................................................................46
CHAPTER FIVE..........................................................................................................................................47
SUMMARY, CONCLUSION AND RECOMMENDATIONS.............................................................................47
5.1 Summary.............................................................................................................................47
5.2 Conclusion...........................................................................................................................47
5.3 Recommendations..............................................................................................................48
References ............................................................................................................................................49

vi
LIST OF FIGURES
6

ABSTRACT
From e-commerce to social networking sites, recommender systems are gaining more and more
interest. They provide connections, news, resources, or products of interest. Nowadays, new
technologies and the fast growth of the Internet have made access to information easier for all
kinds of people, raising new challenges to education when using Internet as a medium.
Information overload results from the availability of a large number of information on any
topic in this jet age. To avoid information overload, a recommender system is important.
Recommender systems form decision support systems for individuals as well as whole
organisations by customising and recommending information or actions.

Game based learning has been studied and seen as an important alternative or supplement to
traditional teaching. Existing web based platforms that utilize the power of the Internet in order
vii
to provide efficient access to information regarding computer learning games aim to create
online communities. Game-Based Learning is an issue that concerns game developers,
educators and trainees.

However, electronic educational games can be highly entertaining, but studies have shown that
they do not always trigger learning. To enhance the effectiveness of educational games, we
proposed an intelligent recommender agent for online quiz game. The recommendation
systems have been tried in e-commerce to entice purchasing of goods, social networking sites
and in e-learning environment to recommend courses to students but as yet to be implemented
in online quiz game.

Therefore, an intelligent recommendation system for online quiz game is implemented. The
motivation behind this project is to make quiz-based game full of fun, enjoyable, interactive
and educative with an intelligent recommender agent as the catalyst. The recommendations
will be based on the user profile, preferences and the performance of the user during the game
play. The techniques used are content filtering and a randomization algorithm. In conclusion,
this system will be useful and vital to promoting learning amongst students in schools and
increasing the learning habit of students.

Keywords: Recommender Agent, Game-based learning, E-learning, Quiz game

viii
CHAPTER ONE
INTRODUCTION
1.1 Background of the Study
Nowadays, new technologies and the fast growth of the Internet have made access to
information easier for all kinds of people, raising new challenges to education when using
Internet as a medium. With the development of computer technology, learning is no longer
limited to classrooms. Technology-Enhanced Learning (TEL) aims at designing, developing
and testing socio-technical innovations to support learning practices at both the individual and
the organizational level (Manouselis et al., 2011). It helps the learners to learn anywhere and
anytime. More and more online platforms such as Symbaloo and Graasp, enable users to
access, share, and organize learning resources of all kinds, and manage their own Personal
Learning Environments (PLEs). PLEs give students the opportunity to shape their own learning
environments. Students can create, organize, repurpose and package their learning content and
tools to learn more effectively and efficiently (Dabbagh and Kitsantas, 2012).

Recommender systems, for advising or recommending subject matter, are emerging as a


growing application and research field (Schmidt-Thieme et al., 2007). These systems help
users deal with information overload (Schmidt-Thieme et al., 2007). Information overload
results from the availability of a large number of information on any topic in this age.
Recommender systems form decision support systems for individuals as well as whole
organisations by customising and recommending information. Recommender systems use
computational intelligence and can be trained to find patterns between different users and
subject matter. In this paper the problem of recommending questions to users in a quiz-based
game is tackled.

Game-Based Learning is an issue that concerns game developers, educators and trainees. The
teaching methods based on educational games are expected to be extremely attractive to either
University students or people who are concerned about Lifelong Learning. In addition, the
social and educational aspect of this type of communities (Bouras et al., 2003) is becoming
increasingly interesting both from a technological and social perspective. Because electronic
games are highly engaging, researchers have started to investigate whether they could be used
to assist learning, especially for those children who have lost interest in math or other science

1
courses (Klawe, 1998). However, there is little empirical evidence that electronic educational
games can promote learning (Randel et al., 1992), unless the interaction is led by teachers and
integrated with other instructional activities (Klawe, 1998). One of the main reasons for this
limitation of educational games is that learning how to play the game does not necessarily
imply learning the target instructional domain. Learning happens only when students actively
build the connections between game moves and underlying knowledge. Whether students can
build these connections usually depends upon individual differences in knowledge and in the
meta-cognitive skills relevant to learn from autonomous exploration (e.g., self-explanation and
self monitoring) (Shute, 1993). However, this proposed online quiz-based game will be
interactive, effective to use, easy to learn with little or no guide as well as providing an
enjoyable user experience. It is worthy of note that most application or program developers do
not always take into cognizance usability experience as every application, program or software
is meant to be used by someone.

The goal of a Recommender System is to generate meaningful recommendations to a collection


of users for items or products that might interest them. Suggestions for books on Amazon, or
movies on Netflix, are real world examples of the operation of industry-strength recommender
systems. The design of such recommendation engines depends on the domain and the
particular characteristics of the data available. For example, movie watchers on Netflix
frequently provide ratings on a scale of 1 (disliked) to 5 (liked). Such a data source records the
quality of interactions between users and items. Additionally, the system may have access to
user-specific and item-specific profile attributes such as demographics and product
descriptions respectively. Recommender systems differ in the way they analyze these data
sources to develop notions of affinity between users and items which can be used to identify
well-matched pairs. Collaborative Filtering systems analyze historical interactions alone, while
Content-based Filtering systems are based on profile attributes; and Hybrid techniques attempt
to combine both of these designs. The architecture of recommender systems and their
evaluation on real-world problems is an active area of research.

The term “collaborative filtering” was introduced in the context of the first commercial
recommender system, called Tapestry (Goldberg et al., 1992), which was designed to
recommend documents drawn from newsgroups to a collection of users. The motivation was to

2
leverage social collaboration in order to prevent users from getting inundated by a large
volume of streaming documents. Collaborative filtering, which analyzes usage data across
users to find well matched user-item pairs, has since been juxtaposed against the older
methodology of content filtering which had its original roots in information retrieval. In
content filtering, recommendations are not “collaborative” in the sense that suggestions made
to a user do not explicitly utilize information across the entire user-base. Some early successes
of collaborative filtering on related domains included the GroupLens system (Resnick et al.,
1994).

Further research was spurred by the public availability of datasets on the web, and the interest
generated due to direct relevance to e-commerce. Netflix, an online streaming video and DVD
rental service, released a large-scale dataset containing100 million ratings given by about half-
a-million users to thousands of movie titles, and announced an open competition for the best
collaborative filtering algorithm in this domain. Matrix Factorization (Bell et al., 2009)
techniques rooted in numerical linear algebra and statistical matrix analysis emerged as a state
of the art technique.

Currently, Recommender Systems remain an active area of research, with a dedicated ACM
conference, intersecting several sub-disciplines of statistics, machine learning, data mining and
information retrievals. Applications have been pursued in diverse domains ranging from
recommending web pages to music, books, movies and other consumer products.

An intelligent recommendation system in a game context is a software agent that tries to


“intelligently” recommend actions to a learner based on the actions of previous learners or the
present users. This recommendation could be an on-line activity such as doing an exercise,
reading posted messages on a conferencing system, or running an on-line simulation, or could
be simply a web resource. Recommender systems use computational intelligence to achieve
their objectives. Recommendation systems have been used successfully in e-commence, social
networking sites – LinkedIn, Facebook, twitter, Google+, etc.

3
1.2 Problem Statement
Recommendation systems have been used successfully in e-commerce. However, to date,
intelligent recommendation system is not prominent in on-line learning environments and most
importantly in a quiz-based game. The research question however is:

How can we integrate recommender systems into an on-line quiz-based game to improve its
performance and ‘intelligence’?

1.3 Aim and Objectives


The aim of this work is to improve the performance (intelligence) of quiz-based games by
developing an intelligent recommender system for on-line quiz-based game.

The specific objectives are to:

i. create a model which recommends questions to users in a quiz-based game based on


their user profile
ii. continuously recommend/give questions (either easy or difficult) to users/learners based
on his/her performance in the game play and awards points for each correctly answered
question.
iii. adaptively test the performance of the learners in the game play and ascertain if the
learners are learning

1.4 Significance of the Study


The research study provides a platform for researchers in an e-learning game-based
recommendation systems thereby opening a vista of research in recommendation systems. It
also enhances the on-line learning experience, fully engaging, challenging, motivating and
creates fun in the game play

1.5 Limitations and Scope


The proposed system is limited in its operations and functionalities. Its search and data mining
strength is limited to the system as it cannot go outside the system to search/mine for
information. In essence, it cannot go to World Wide Web to mine for information with the
keywords which the recommender agent extracts from the user profile.

4
The scope of the project however covers only the field of computer science for the quiz
context. As a result, users’ interests are restricted to only questions from the field of computer
science.

1.6 Glossary of Terms


Recommender Agent: It is an agent that intelligently recommends actions to user based on the
actions of previous users or the present user’s preferences.

Educational Game: They are games that are designed to teach people about certain subjects,
expand concepts, reinforce development, understand an historical event or culture, or assist
them in learning a skill as they play.

Pedagogical Agent: It is a software agent which helps learners in computer-based education

E-learning: It is the use of electronic media and Information Technologies (IT) in education.

Web-Based Quiz Game: It is a quiz game that can be played online.

Recommendation Systems: They are a type of information filtering systems that recommend
products available in e-shops, entertainment items (books music, videos, Video on Demand,
books, news, images, events etc.) or people (e.g. social networking sites) that are likely to be of
interest to the user.

5
CHAPTER TWO
LITERATURE REVIEW
2.0 Introduction
Machine competence in games has long served as a benchmark for progress in artificial
intelligence (AI). While we seem hardly close to building systems capable of passing a full-
blown Turing Test, machine excellence in a growing number of games signals incremental
progress. Recently, attention has turned to less structured game environments, like crossword
puzzles (Keirn et al., 1999), video games (van Lent et al., 1999), and soccer (Stone and Sutton,
2001), where game states, actions, or both are not easily enumerable, making a pure search
formulation unnatural or impractical.
In another clime, the roots of recommender systems can be traced back to the extensive work
in the cognitive science (Rich, 1979), approximation theory (Powell, 1981), information
retrieval (Salton, 1989), forecasting theories (Armstrong, 2001), and also have links to
management science (Murthi and Sarkar, 2003), and also to the consumer choice modeling in
marketing (Lilien et al., 1992), recommender systems emerged as an independent research area
in the mid- 1990’s when researchers started focusing on recommendation problems that
explicitly rely on the ratings structure. Recommendation systems on the web were first
popularized by Amazon.com, which would show users personalized recommendations of items
that the system thought they would like based on the items that they had bought or rated in the
past (Linden et al., 2003). Since then, the practice has spread widely, as computing power
becomes cheaper and as the algorithms become more widespread. From e-commerce (e.g.
Amazon) to social networking sites (e.g. Facebook, LinkedIn, twitter, Google+), recommender
systems are gaining more and more popularity whether to recommend connections, news,
resources to access, or products to purchase.
In the light of the foregoing, a lot of research has been conducted in the areas of
recommendation systems and game-based learning. In the sections that follow, an overview of
different techniques, methodologies and algorithms that have been developed will be
presented. Also influential works in the areas of recommender systems and game-based leaning
will be considered.

6
2.1 Recommendation System
Recommender systems became an important research area since the appearance of the first
papers on collaborative filtering since the mid-1990s (Hill et al., 1995); (Resnick et al., 1994);
(Shardanand and Maes, 1995). There has been much work done both in the industry and
academia on developing new approaches to recommender systems over the last decade. The
interest in this area still remains high because it constitutes a problem rich research area and
because of the abundance of practical applications that help users to deal with information
overload and provide personalized recommendations, content and services to them.

2.1.1 Survey of Recommender Systems


Although the roots of recommender systems can be traced back to the extensive work in the
cognitive science (Rich, 1979), approximation theory (Powell, 1981), information retrieval
(Salton, 1989), forecasting theories (Armstrong, 2001), and also have links to management
science (Murthi et al., 2003), and also to the consumer choice modeling in marketing (Lilien et
al., 1992), recommender systems emerged as an independent research area in the mid- 1990’s
when researchers started focusing on recommendation problems that explicitly rely on the
ratings structure. In its most common formulation, the recommendation problem is reduced to
the problem of estimating ratings for the items that have not been seen by a user. Intuitively,
this estimation is usually based on the ratings given by this user to other items and on some
other information that will be formally described below. Once we can estimate ratings for the
yet unrated items, we can recommend to the user the item(s) with the highest estimated
rating(s).
Extrapolations from known to unknown ratings are usually done by (a) specifying heuristics
that define the utility function and empirically validating its performance, and (b) estimating
the utility function that optimizes certain performance criterion, such as the mean square error.
Once the unknown ratings are estimated, actual recommendations of an item to a user are made
by selecting the highest rating among all the estimated ratings for that user, according to
formula (1). Alternatively, we can recommend N best items to a user or a set of users to an
item.
The new ratings of the not-yet-rated items can be estimated in many different ways using the
methods from machine learning, approximation theory and various heuristics. Recommender
systems are usually classified according to their approach to rating estimation, and in the next

7
section, we will present such a classification that was proposed in the literature and will
provide a survey of different types of recommender systems. The commonly accepted
formulation of the recommendation problem was first stated in (Hill et al., 1995; Resnick et al.,
1994; Shardanand et al., 1995) and this problem has been studied extensively since then.
Moreover, recommender systems are usually classified into the following categories, based on
how recommendations are made (Balabanovic and Shoham, 1997).
 Content-based recommendations: the user is recommended items similar to the ones the
user preferred in the past;
• Collaborative recommendations: the user is recommended items that people with
similar tastes and preferences liked in the past;
• Hybrid approaches: these methods combine collaborative and content-based methods.
In addition to recommender systems that predict the absolute values of ratings that individual
users would give to the yet unseen items (as discussed above), there has been work done on
preference-based filtering, i.e., predicting the relative preferences of users (Cohen et al., 1999;
Freund et al., 1998; Jin, Si, and Zhai, 2003a; Jin, Si, Zhai, and Callan, 2003b). For example, in
a movie recommendation application preference-based filtering techniques would focus on
predicting the correct relative order of the movies, rather than their individual ratings.
However, we will review and focus primarily on the rating-based recommenders, since it
constitutes the most popular approach to recommender systems.

2.1.1.1 Content-based Methods


In content-based recommendation methods, the utility u(c, s) of item s for user c is estimated
based on the utilitiesu ( c , s i ) assigned by user c to items si ∈ S that are “similar” to item s. For
example, in a movie recommendation application, in order to recommend movies to user c, the
content-based recommender system tries to understand the commonalities among the movies
user c has rated highly in the past (specific actors, directors, genres, subject matter, etc.). Then,
only the movies that have a high degree of similarity to whatever user’s preferences are would
get recommended.
The content-based approach to recommendation has its roots in information retrieval (Baeza-
Yates and Ribeiro-Neto, 1999; Salton, 1989) and information filtering (Belkin & Croft, 1992)

8
research. Because of the significant and early advancements made by the information retrieval
and filtering communities and because of the importance of several text-based applications,
many current content-based systems focus on recommending items containing textual
information, such as documents, Web sites (URLs), and Usenet news messages. The
improvement over the traditional information retrieval approaches comes from the use of user
profiles that contain information about users’ tastes, preferences, and needs. The profiling
information can be elicited from users explicitly, e.g., through questionnaires, or implicitly –
learned from their transactional behavior over time.
More formally, let Content(s) be an item profile, i.e., a set of attributes characterizing item s. It
is usually computed by extracting a set of features from item s (its content) and is used to
determine appropriateness of the item for recommendation purposes. Since, as mentioned
earlier, content-based systems are designed mostly to recommend text-based items, the content
in these systems is usually described with keywords. For example, a content-based component
of the Fab system (Balabanovic et al., 1997), which recommends Web pages to users,
represents Web page content with the 100 most important words. Similarly, the Syskill and
Webert system (Pazzani and Billsus, 1997) represents documents with the 128 most
informative words. The “importance” (or “informativeness”) of word k i in document d j is
determined with some weighting measure w ij that can be defined in several different ways.

2.1.1.2 Collaborative Methods


Unlike content-based recommendation methods, collaborative recommender systems (or
collaborative filtering systems) try to predict the utility of items for a particular user based on
the items previously rated by other users. More formally, the utility u(c, s) of item s for user c
is estimated based on the utilities u(cj, s) assigned to item s by those users cj∈C who are
“similar” to user c. For example, in a movie recommendation application, in order to
recommend movies to user c, the collaborative recommender system tries to find the “peers” of
user c, i.e., other users that have similar tastes in movies (rate the same movies similarly).
Then, only the movies that are most liked by the “peers” of user c would get recommended.
There have been many collaborative systems developed in the academia and the industry. It
can be argued that the Grundy system (Rich, 1979) was the first recommender system, which
proposed to use stereotypes as a mechanism for building models of users based on a limited

9
amount of information on each individual user. Using stereotypes, the Grundy system would
build individual user models and use them to recommend relevant books to each user. Later on,
the Tapestry system relied on each user to identify like-minded users manually (Goldberg et
al., 1992). GroupLens (Konstan et al., 1997; Resnick et al., 1994), Video Recommender (Hill
et al., 1995), and Ringo (Shardanand et al., 1995) were the first systems to use collaborative
filtering algorithms to automate prediction. Other examples of collaborative recommender
systems include the book recommendation system from Amazon.com, the PHOAKS system
that helps people find relevant information on the WWW (Terveen et al., 1997), and the Jester
system that recommends jokes (Goldberg et al., 2001).
Billsus et al. (1998) proposed a collaborative filtering method in a machine learning
framework, where various machine learning techniques (such as artificial neural networks)
coupled with feature extraction techniques (such as singular value decomposition – an
algebraic technique for reducing dimensionality of matrices) can be used. Both (Breese et al.,
1998) and (Billsus et al., 1998) compare their respective model-based approaches with
standard memory-based approaches and report that in some applications model-based methods
outperform memory-based approaches in terms of accuracy of recommendations. However, the
comparison in both cases is purely empirical and no underlying theoretical evidence supporting
this claim is provided.
There have been several other model-based collaborative recommendation approaches
proposed in the literature. A statistical model for collaborative filtering was proposed in (Ungar
et al., 1998), and several different algorithms for estimating the model parameters were
compared, including K-means clustering and Gibbs sampling. Other collaborative filtering
methods include a Bayesian model (Chien and George, 1999), a probabilistic relational model
(Getoor et al., 1999), a linear regression (Sarwar et al., 2001), and a maximum entropy model
(Pavlov et al., 2002). More recently, a significant amount of research has been done in trying to
model the recommendation process using more complex probabilistic models. For instance,
(Shani et al., 2002) view the recommendation process as a sequential decision problem and
propose to use Markov decision processes (a well known stochastic technique for modeling
sequential decisions) for generating recommendations. Other probabilistic modeling techniques
for recommender systems include probabilistic latent semantic analysis (Hofmann, 2003;
Hofmann, 2004) and a combination of multinomial mixture and aspect models using generative

10
semantics of Latent Dirichlet Allocation (Marlin, 2003). Similarly, (Si and Jin, 2003) also use
probabilistic latent semantic analysis to propose a flexible mixture model that allows modeling
the classes of users and items explicitly with two sets of latent variables. Furthermore, (Kumar
et al., 2001) use a simple probabilistic model to demonstrate that collaborative filtering is
valuable with relatively little data on each user, and that, in certain restricted settings, simple
collaborative filtering algorithms are almost as effective as the best possible algorithms in
terms of utility.
As in the case of content-based techniques, the main difference between collaborative model-
based techniques and heuristic-based approaches is that the model-based techniques calculate
utility (rating) predictions based not on some ad-hoc heuristic rules, but rather based on a
model learned from the underlying data using statistical and machine learning techniques. A
method combining both memory-based and model-based approaches was proposed in
(Pennock and Horvitz, 1999), where it was empirically demonstrated that the use of this
combined approach can provide better recommendations than pure memory-based and model-
based collaborative approaches.
A different approach to improving the performance of existing collaborative filtering
algorithms was taken in (Yu et al., 2002), where the input set of user-specified ratings is
carefully selected using several techniques that exclude noise, redundancy, and exploit the
sparsity of the ratings’ data. The empirical results demonstrate the increase in accuracy and
efficiency for model-based collaborative filtering algorithms. It is also suggested that the
proposed input selection techniques may help the model-based algorithms to address the
problem of learning from large databases (Yu et al., 2002). Furthermore, among the latest
developments, (Yu et al., 2004) propose a probabilistic approach to collaborative filtering that
constitutes yet another way to combine the memory-based and model-based techniques. In
particular, (Yu et al., 2004) propose (a) to use an active learning approach to learn the
probabilistic model of each user’s preferences and (b) to use the stored user profiles in a
mixture model to calculate recommendations. The latter aspect of the proposed approach
deploys some of the ideas used in the traditional memory-based algorithms.

2.1.1.3. Hybrid Methods


Several recommendation systems use a hybrid approach by combining collaborative and
content based methods, which helps to avoid certain limitations of content-based and

11
collaborative systems (Balabanovic et al., 1997; Basu, Hirsh, & Cohen, 1998; Claypool,
Gokhale, Miranda, Murnikov, Netes, & Sartin, 1999; Pazzani, 1999; Schein, Popescul, Ungar,
& Pennock, 2002; Soboroff, & Nicholas, 1999; Ungar et al., 1998). Different ways to combine
collaborative and content-based methods into a hybrid recommender system can be classified
as follows: (1) implementing collaborative and content-based methods separately and
combining their predictions, (2) incorporating some content-based characteristics into a
collaborative approach, (3) incorporating some collaborative characteristics into a content-
based approach, and (4) constructing a general unifying model that incorporates both content-
based and collaborative characteristics. All of the above approaches have been used by
recommender systems researchers.
Hybrid recommendation systems can also be augmented by knowledge-based techniques
(Burke, 2000), such as case-based reasoning, in order to improve recommendation accuracy
and to address some of the limitations (e.g., new user, new item problems) of traditional
recommender systems. For example, knowledge-based recommender system Entrée (Burke,
2000) uses some domain knowledge about restaurants, cuisines, and foods (e.g., that “seafood”
is not “vegetarian”) to recommend restaurants to its users. The main drawback of knowledge-
based systems is a need for knowledge acquisition – a well-known bottleneck for many
artificial intelligence applications. However, knowledge-based recommendation systems have
been developed for application domains where domain knowledge is readily available in some
structured machine-readable form, e.g., as an ontology. For example, Quickstep and Foxtrot
systems (Middleton, Shadbolt, & de Roure, 2004) use research paper topic ontology to
recommend online research articles to the users.
Moreover, several papers, such as (Balabanovic et al., 1997; Melville et al., 2002; Pazzani,
1999; Soboroff et al., 1999), empirically compare the performance of the hybrid with the pure
collaborative and content-based methods and demonstrate that the hybrid methods can provide
more accurate recommendations than pure approaches.
2.1.1.4 Limitations of Recommender System Techniques
2.1.1.4.1 Content-based Technique
Limited content analysis: Content-based techniques are limited by the features that are
explicitly associated with the objects that these systems recommend. Therefore, in order to
have a sufficient set of features, the content must either be in a form that can be parsed
automatically by a computer (e.g., text), or the features should be assigned to items manually.

12
While information retrieval techniques work well in extracting features from text documents,
some other domains have an inherent problem with automatic feature extraction. Another
problem with limited content analysis is that, if two different items are represented by the same
set of features, they are indistinguishable. Therefore, since text-based documents are usually
represented by their most important keywords, content-based systems cannot distinguish
between a well-written article and a badly written one, if they happen to use the same terms
(Shardanand et al., 1995).
Over-specialization: When the system can only recommend items that score highly against a
user’s profile, the user is limited to being recommended items similar to those already rated.
For example, a person with no experience with Greek cuisine would never receive a
recommendation for even the greatest Greek restaurant in town. This problem, which has also
been studied in other domains, is often addressed by introducing some randomness. For
example, the use of genetic algorithms has been proposed as a possible solution in the context
of information filtering (Sheth and Maes, 1993). In addition, the problem with over-
specialization is not only that the content-based systems cannot recommend items that are
different from anything the user has seen before. In certain cases, items should not be
recommended if they are too similar to something the user has already seen, such as different
news article describing the same event. Therefore, some content-based recommender systems,
such as DailyLearner (Billsus et al., 2000), filter out items not only if they are too different
from user’s preferences, but also if they are too similar to something the user has seen before.
Furthermore, (Zhang et al., 2002) provide a set of five redundancy measures to evaluate
whether a document that is deemed to be relevant contains some novel information as well. In
summary, the diversity of recommendations is often a desirable feature in recommender
systems. Ideally, the user should be presented with a range of options and not with a
homogeneous set of alternatives.
New user problem: The user has to rate a sufficient number of items before a content-based
recommender system can really understand user’s preferences and present the user with
reliable recommendations. Therefore, a new user, having very few ratings, would not be able to
get accurate recommendations.

13
2.1.1.4.2 Collaborative Filtering Technique
New user problem: It is the same problem as with content-based systems. In order to make
accurate recommendations, the system must first learn the user’s preferences from the ratings
that the user makes. Several techniques have been proposed to address this problem. Most of
them use hybrid recommendation approach, which combines content-based and collaborative
techniques. An alternative approach is presented in (Rashid et al., 2002; Yu et al., 2004), where
various techniques are explored for determining the best (i.e., most informative to a
recommender system) items for a new user to rate. These techniques use strategies that are
based on item popularity, item entropy, user personalization, and combinations of the above
(Rashid et al., 2002; Yu et al., 2004).
New item problem. New items are added regularly to recommender systems. Collaborative
systems rely solely on users’ preferences to make recommendations. Therefore, until the new
item is rated by a substantial number of users, the recommender system would not be able to
recommend it. This problem can also be addressed using hybrid recommendation approaches.
Sparsity: In any recommender system, the number of ratings already obtained is usually very
small compared to the number of ratings that need to be predicted. Effective prediction of
ratings from a small number of examples is important. Also, the success of the collaborative
recommender system depends on the availability of a critical mass of users. For example, in the
movie recommendation system there may be many movies that have been rated only by few
people and these movies would be recommended very rarely, even if those few users gave high
ratings to them. Also, for the user whose tastes are unusual compared to the rest of the
population there will not be any other users who are particularly similar, leading to poor
recommendations (Balabanovic et al., 1997). One way to overcome the problem of rating
sparsity is to use user profile information when calculating user similarity. That is, two users
could be considered similar not only if they rated the same movies similarly, but also if they
belong to the same demographic segment. Another approach that also explores similarities
among users has been proposed in (Huang et al., 2004), where the sparsity problem is
addressed by applying associative retrieval framework and related spreading activation
algorithms to explore transitive associations among consumers through their past transactions
and feedback. A different approach for dealing with sparse rating matrices was used in (Billsus
et al., 1998; Sarwar et al., 2000), where a dimensionality reduction technique, Singular Value

14
Decomposition (SVD), was used to reduce dimensionality of sparse ratings matrices. SVD is a
well-known method for matrix factorization that provides the best lower rank approximations
of the original matrix (Sarwar et al., 2000).

2.2 Game-Based Learning


Games, play, learning have enjoyed a symbiotic relationship throughout recorded history
(Johan Huizinga, 1995). Game-based learning has already been successfully applied to both
school and workplace settings and its adoption is continually increasing. In addition, there has
recently been some increasing interest in “gamification” of education as a means to increase
students’ motivation for learning. Gamification refers to the use of game design elements, or
the so-called game mechanics, in non-game contexts and applications with the aim of
increasing users’ engagement with those applications (Deterding et al., 2011; Zichermann and
Cunningham, 2011).
Games have been recognized as being a good tool to promote learners to actively participate in
learning activities (Alessi and Trollip, 1984; Baid and Lambert, 2010; Kirikkaya et al., 2010;
Huizenga et al., 2009). Researchers have indicated that game-based learning could be the best
way to trigger students’ learning motivation (Provost, 1990; Papastergiou, 2009a; Dickey,
2010; Huang, 2010; Tüzün et al., 2009). In addition, it has been reported that a game-based
learning approach might provide a good chance to stimulate children’s abstract thinking during
the process of cognitive development, and further foster their higher order thinking ability
(Carbonaro et al., 2010). Carroll (1982) stated that computer games are able to boost
motivation owing to some characteristics, such as adventure, challenge and freshness.
Therefore, if teachers are able to apply computer games to teaching, students can not only have
better learning achievements, but also learn happily via these games.
Several previous studies have demonstrated the ease of use and usefulness features of computer
games by applying the game-based learning approach to a variety of learning activities
(Bourgonjon et al., 2010; Warren et al., 2008). For example, Terrell and Rendulic (1996) stated
that using computer games for learning in elementary schools can increase the internal
motivations and learning achievements of students. Yun, Jiang and Li (2010) indicated that
through computer games which focus on nutritional education in primary and secondary
schools, the learning motivations and learning achievements of the students can be increased,
and their competences and knowledge can be promoted. Papastergiou (2009b) also pointed out

15
that through computer games, children’s learning interests are effectively promoted, and they
are guided to actively improve their food and drink habits.
There are several theories that are recognized as being relevant to the game-based learning
approach, such as cognitive theory and situated learning theory. Cognitive theory emphasizes
that learners should master basic skills to further acquire higher-level abilities while learning
new things. It also emphasizes that learning processes are progressive and move from
simplicity to complexity; moreover, games that are adopted need to stimulate students’
learning motivation and make learning more fun (Gagné, 1985). Situated learning theory states
that learners should enter learning scenarios to acquire knowledge. The knowledge that is
actively explored in the scenarios should not only be useful, but should also be analogical.
Therefore, establishing a rich learning scenario enables learners to gain practical problem-
solving abilities via observation and behavioral exploration, and a well designed game is able
to provide such a learning scenario (Winn, 1993; Young, 1993; López and Cáceres, 2010; Kim
et al., 2009). Some researchers believe that even the best teaching materials and techniques are
not as good as having children learn happily via games (Norman, 1981).
Compared with other media, games are closer to the children’s world and are easily accepted
by them (Kafai, 1995). Furthermore, researchers believe that games can help children develop
problem-solving skills (Seonju, 2002; Chuang and Chen, 2009; Lee and Chen, 2009; Blumberg
et al., 2008; Shih et al., 2010).
According to Yang (2010), game-based learning (GBL) can be traced back to well-known
kindergarten scholar Friedrich Froebel, who asserted the importance of games and Froebel
Gifts for students’ learning. Also, educational psychologist Piaget proposed that games can
help students learn and believe that in games, the assimilation effect is greater than the
adjustment effect because games do not need players to change themselves or adapt to
environments, but need to use games to repeatedly practice new techniques and become
proficient (Wu and Guo, 2003). Ebner and Holzinger (2007) concluded that findings of using
game based learning in higher education support the efficacy of game playing. Garris, Ashlers,
and Driskell (2002) administered a digital game-based learning model to explain that when
digital games are applied to learning with a process of learner input, process, and outcomes
(Figure1). The input part includes instructional content (the course content and the core). Game
characteristics refer to the fundamental elements in the game, such as competition, challenge,

16
audio-visual, and animation. After the three internal cycles are processed, including the system
feedback, user behavior, and user judgment, the learning outcomes will be produced, which
match with the learning objectives.

Input Process Output

User judgment

Instructional
Content
Learning

Game Figure 2.0: Digital game-based learning model (Source: Garris et al., 2002)Debriefing
Characteristics System User
2.2.1. Adaptive Learning and Web-Based Educationalbehaviour
feedback Games
Educational electronic games (or simply eGames) can provide adaptive learning and fully
personalized itineraries, in addition to the motivational enhancements of the learning process
(Burgos et al., 2007; Gee, 2003; Prensky, 2001). E-Games clearly improve motivation and
involvement, which results in a deeper learning experience (Garris et al., 2002). When thinking
in terms of adaptive learning, it is remarkable how adaptation in games is a very common
feature (typically based on a number of inputs, i.e., the user’s behavior, performance, previous
knowledge or personal decisions).
Within eGames, we distinguish different subgroups or genres, one of them being
conversational games. These specific games have several properties that are worth examining:
they are easy to understand and to model, they are well established and have a long tradition in
the game industry, and they provide an engaging and challenging experience where the content
and the player’s performance have a key role in the flow. Additionally they provide a long list
of interesting pedagogical elements: fun, interactivity, problem solving, user involvement, or
motivation and creativity, just to mention a few (Amory, 2001 & Van Eck, 2007). Finally, they
also awake personal feelings and emotions in the players, and provide support for the
development of personal skills like focused goals, rules, tasks, affiliation, choice, or lack of
adverse consequences in the case of a wrong choice (Squire, 2002).
EGames also provide input, output and feedback in real-time (Laurillard, 1998), which are
used in adaptive learning (Leutner, 1993), e.g., choosing the next action to take or the

17
contextualized help provided. In order to achieve the educational objectives, we can use
various interactive learning techniques (i.e., learning from mistakes, goal-oriented learning,
role playing and constructivist learning (Prensky, 2001) within and/or around the game itself.
The main goal is to turn the game into a fully integrated activity within the whole learning
process, instead of remaining as an isolated stand-alone resource. In doing so, generic games,
as well as specific educational games, can be interwoven with the rest of the learning
experience, increasing the educational value (Burgos et al., 2007). However, we still need an
effective integration model to improve the use of games in this way. But achieving an effective
integration poses several authoring challenges and we also need development processes to
make the authoring process faster and easier for teachers and learning designers when
describing personalized learning processes (Williamson et al., 2005).

2.2.2. Motivation to Play and Flow Experience


Game-based learning can be seen from two different perspectives - the learning and the gaming
perspective – and consequently, the motivation to use an educational game depends on the
motivation to play the game and/or on the motivation to learn about the related domain. Since
the motivation to play is the crucial advantage of game-based learning over traditional
instruction, it is only natural that researchers frequently focus on this motivational component
as a key aspect of instructional games. Motivation to play is strongly related to the motivation
grounded in activity-specific incentives, for which the concept of ‘flow experience’
(Csikszentmihalyi, 1992) is a prominent ambassador. The term ‘flow experience’ refers to a
state of full immersion in an activity, which typically goes along with a loss of sense of time
and no reflection on carrying out the action. The appearance of this ‘optimal experience’ is
likely while interacting with a computer and perceived very positively (Kiili, 2005).
Further the antecedents of a flow experience allow the deduction of some potentially useful
game design principles (Kiili, 2005a & Rheinberg, 2006), which enhance a focused attention
and immersion of the player:
i. The challenge of the game should fit the ability of the player; otherwise she would
experience either anxiety or boredom instead of a ‘flow’. By this means the player has
the feeling of controlling the situation.

18
ii. The goals to be achieved should be clear at any point of the game, so that the player
always knows what to do without exerted thinking about it. Also the provided feedback
should be clear, appropriate, and immediate.
iii. The instructional game should be playful and composed of an action procedure, which
is experienced as fluent. A good usability avoids that the player spends cognitive
resources for inappropriate actions.
The concept of flow experience seems to be very fruitful in game-based learning and attempts
to create ‘flow-based’ educational games (Kiili, 2005b) were quite successful in inducing a
flow experience and enhancing learning. However, some researchers in the field of e-learning
did not find evidence for a relation between the appearance of a flow experience and the
learning effect (Konradt et al., 2003), so that a clear relationship probably cannot be stated
(Schiefele and Rheinberg, 1997).
Beyond that, it is questionable if some characteristics of educational games, which differentiate
them from conventional games for entertainment, impede the appearance of a flow experience
(or generally immersion) dramatically. Castell and Jenson (2003) state that “education has not
been able to realize the immersive possibilities of new digital resources...” and point out two
weaknesses of existing educational games. The authors claim the necessity to connect game-
play elements with the learning content (compared to a series of tasks integrated loosely in a
game narrative, but with no direct connection), and to provide the players with the possibility
for boundless navigation and movement (instead of a rigid structures of learning elements).
These claims obviously relate to the learning approach of learning-by-doing or explorative
learning. One important question in this context is, if all kinds of instructional content can be
integrated in such an explorative game. Procedural knowledge seems to be especially feasible
to be provided within a gaming scenario, because knowing how to do something can be
properly explored and acquired in a playful environment. The creation of an instructional
game, which administers the knowledge of facts, may require somehow more effort to assure a
flowing, boundless explorative game play, because this knowledge has to be taught frequently
by telling and not by free exploration only. All types of educational games, but especially
games dealing with factual knowledge, need more or less intrusive methods of assessment and
adaptation, because the knowledge commonly cannot be observed simply through the
behaviour in the game. After all, playing and learning/working remain somehow different

19
concepts, because latter not always is voluntary, non-productive, and separate from the real
world (Garris et al., 2002). Consequently, it is arguable if specific characteristics of instruction
make exclusively flow-oriented motivational strategies insufficient in the field of game-based
learning. As a result, for a successful and intelligent design of educational games, a more
comprehensive reflection and consideration of motivation and learning processes is necessary.

2.2.3 Selected trends affecting game-based learning


Selected trends affecting game-based learning include:
Widespread use of games technologies and serious games movement
i. Wider use of games technologies in the home is increasing the interest in the use of
games in educational contexts, and in turn this is leading to increasing use of games
particularly in schools and colleges, but also in universities.
ii. The serious games movement is a trend towards designing and analysing the use of
games (and simulations) for supporting formal educational and training objectives and
outcomes. The movement aims to meet the significant challenge of bringing together
games designers and educationalists to ensure fun and motivation as well as
demonstrating educational value.
Authoring and development of immersive worlds (e.g. development of content creation tools)
i. Through modifying existing games applications for educational purposes there is great
potential for learning with games. This approach may have implications upon
instructional/constructional learning design, as well as changing the traditional role of
the tutor towards one of facilitator, collaborator, producer or author.
ii. The approach of self-authored content may also promote greater opportunities for team
and cross-disciplinary teaching and learning.
Growth of online gaming and online gaming communities
i. The growth of online gaming and their communities may have uses for formal
education, having the potential to provide greater support for learning outside of formal
learning contexts and providing support for distance, lifelong and distributed learning
groups.
ii. This trend may also produce more seamless learning experiences – lessening the hard
lines between learning at work, home and formal learning institutions. Learning that
20
follows from online experiences may place a greater emphasis upon team learning,
collaborative learning and forming and maintaining dedicated learning communities of
practice.

CHAPTER THREE
SYSTEM ANALYSIS AND DESIGN
3.1 Introduction
This chapter gives a detailed analysis of An Intelligent Recommendation Agent for an Online
Quiz Game using Data Flow Diagrams (DFD), Entity-Relationship Diagrams, Database
Schema, Use Case and Sequence Diagram to design the Program.

3.2 Research Methodology


“All progress is born of inquiry. Doubt is often better than overconfidence, for it leads to
inquiry, and inquiry leads to invention” is a famous Hudson Maxim in context of which the
significance of research can well be understood. As a matter fact, this proposed research work
tries to incorporate an intelligent recommendation system into an online quiz-based game.
Explicitly, this will be achieved by designing a model which will encase four different
components viz. User profile, recommender agent, search engine and Datastore. Figure 3.1 is a
diagrammatical representation of the proposed model for the recommender agent.

Register
Login
Modify
User Profile Course Datastore

User Interface
Search Engine
(Data Mining)
21

Recommender Agent
Figure 3.1: A recommender Agent
The User Interface which interfaces between the Recommender Agent and the User Profile
fetches the user’s information from the user profile and forwards it to the recommendation
agent. The recommender therefore filters the profile information, creates a search string and
sends it to the search engine. The search engine searches the Question Datastore or database to
retrieve the questions and forwards the result back to the recommender. Therefore, we
used neural network to rank the searched results. Then recommender agent uses the ranked
results in recommending questions to the users. It intelligently keeps recommending questions
to the user as s/he progresses in the game play. And again, in the case where the user logs in as
an existing user the recommender agent uses the user’s details to extract his/her logs from
system record before recommending quiz questions.

Practically, the databases that will house User Profile, and Question Datastore are designed. A
search engine and a recommender system are also developed. We also developed a user
friendly interface for the web-based quiz-game.

3.3 Analysis of the Existing System


There are numerous examples of information customisation systems that have been
implemented. Simple examples are search engines; personalised search engines and online
stores that use user information to customise adverts and goods being sold. Personalised search
engines differ from regular search engines in that they use user habits and preferences to return
better search results and recommend other searches that might be useful.

Other intelligent recommender systems have also been implemented. An example is


MASACAD, which is a Multi Agent System for Academic Advising. It was developed to
assist students in choosing courses to take in university. This system had the limitation that
given new courses the system had to be retrained.

22
3.4 System Architecture
Architectural design is concerned with understanding how a system should be organized and
designing the overall structure of that system. In the model of the software development
process, architectural design is the first stage in the software design process. It is the critical
link between design and requirements engineering, as it identifies the main structural
components in a system and the relationships between them. The output of the architectural
design process is an architectural model that describes how the system is organized as a set of
communicating components. In agile processes, it is generally accepted that an early stage of
the development process should be concerned with establishing an overall system architecture.
Incremental development of architectures is not usually successful. While refactoring
components in response to changes is usually relatively easy, refactoring system architecture is
likely to be expensive.

USER INTERFACE
USER RECORD

Registratio User Login


n Recommend QUIZ GAME
New User er

ExistingUse
r

Search Quiz
engine Records

23

Quiz Search
Figure 3.2: System Architecture

Recommender Agent Pseudocode

Beginner, intermediate and master levels

1. NEW USER (based on USER PROFILE)

Profile – AREA OF INTEREST e.g. maths, current affairs, etc.

Allocate Questions

Award point

Store score after final question

Evaluate score to move to next level (3 out of 5)

2. EXISTING USER (based on USER PROFILE and LEVEL 2 and 3)

Previous points/score

Profile – AREA OF INTEREST e.g. maths, current affairs, etc.

Control to prevent previous questions

Allocate questions

Award point

Store score after final question

Evaluate score to move to next level (3 out of 5)

24
Search
Search Result
Result

RECOMMENDER

Random
5
Question
s

QUIZ GAME

Score

User A: question allocation Figure


based 3.3:
on user profile – Agent
Recommender 5 random questions
Flowchart

User B: question allocation based on user profile – 5 random questions ≠ 5 questions from user
A

User C: question allocation based on user profile – 5 random questions ≠ 5 questions from
users A and B

.
.
.
User Z ...

25
Phase 1 2 3 4 5
Requirement System Design Design/Implementation D Data Migration System Testing
Analysis

UI development Question pool and data upload User Acceptance Testing


Database design
Requirement Definition
User creation Data Integrity Testing
System design Coding
Specifications

Use Cases Development Test Cases

Design Phases

Figure 3.4: Design Phases

3.4.1 System Architectural Pattern


The idea of patterns as a way of presenting, sharing, and reusing knowledge about software
systems is now widely used. An architectural pattern, as a stylized, abstract description of good
practice, has been tried and tested in different systems and environments. So, an architectural
pattern should describe a system organization that has been successful in previous systems. It
should include information of when it is and is not appropriate to use that pattern, and the
pattern’s strengths and weaknesses.

In this current system we will make use of the well-known Model-View-Controller pattern.
This pattern is the basis of interaction management in many web-based systems. The MVC
pattern, separates elements of a system, allowing them to change independently. For example,
adding a new view or changing an existing view can be done without any changes to the
underlying data in the model.

Information about why the pattern is used and its advantages and disadvantages are stated in a
conceptual view in the table below;

Name MVC (Model-View-Controller)

26
Description Separates presentation and interaction from the system data. The
system is structured into three logical components that interact
with each other. The Model component manages the system data
and associated operations on that data. The View component
defines and manages how the data is presented to the user. The
Controller component manages user interaction (e.g., key
presses, mouse clicks, etc.) and passes these interactions to the
View and the Model.

When used Used when there are multiple ways to view and interact with
data. Also used when the future requirements for interaction and
presentation of data are unknown.

Advantages Allows the data to change independently of its representation


and vice versa. Supports presentation of the same data in
different ways with changes made in one representation shown
in all of them.

Disadvantages Can involve additional code and code complexity when the data
model and interactions are simple.

And figure 3.2 shows a possible run-time architecture when this pattern is used for interaction
management in the system;

27
Figure 3.5: MVC Architectural Pattern

3.4.2 System Application Architecture


Application systems are intended to meet a business or organizational need. All businesses
have much in common - they need to hire people, issue invoices, and keep accounts and so on.
Businesses operating in the same sector use common sector-specific applications. Therefore, as
well as general business functions, all phone companies need systems to connect calls, manage
their network, issue bills to customers, etc. Consequently, the application systems used by
these businesses also have much in common.

These commonalities have led to the development of software architectures that describe the
structure and organization of particular types of software systems. Application architectures
encapsulate the principal characteristics of a class of systems. For example, in real-time
systems, there might be generic architectural models of different system types, such as data
collection systems or monitoring systems. Although instances of these systems differ in detail,

28
the common architectural structure can be reused when developing new systems of the same
type.

There are many types of application system and, in some cases; they may seem to be very
different. However, many of these superficially dissimilar applications actually have much in
common, and thus can be represented by single abstract application architecture.

All systems that involve interaction with a shared database can be considered to be transaction-
based information systems. An information system allows controlled access to a large base of
information, such as a library catalogue, a flight timetable, or the records of patients in a
hospital. Information and resource management systems are now usually web-based systems
where the user interfaces are implemented using and are accessed via a web browser. Hence
the application architecture we will be implementing in the quiz game is an information
system.

The system is modeled using a layered approach where the top layer supports the user interface
and the bottom layer is the system database. The user communications layer handles all input
and output from the user interface, and the information retrieval layer includes application-
specific logic for accessing and updating the database.

An instantiation of this layered model shown below shows the architecture of the Intelligent
Recommender Agent for a Web-Based Quiz Game.

29
Figure 3.6: Instantiation of the Layered
.

Detail has been added to each layer in the model by identifying the components that support
user communications and information retrieval and access:

1. The top layer is responsible for implementing the user interface. In this case, the UI has
been implemented using a web browser.

2. The second layer provides the user interface functionality that is delivered through the
web browser. It includes components to allow users to log in to the system and
checking components that ensure that the operations they use are allowed by their role.
This layer includes form and menu management components that present information
to users, and data validation components that check information consistency.

3. The third layer implements the functionality of the system and provides components
that implement system security, student information creation and updating, import and
export of student data from other databases, and report generators that create
management reports.

30
4. Finally, the lowest layer, which is built using a commercial database management
system, provides transaction management and persistent data storage.

Figure 3.7: Detailed Instantiation of the Layered Architectural Model

3.5 Data Flow Diagram (DFD)


DFD is also a virtually designable diagram that technically or diagrammatically describes the
inflow and outflow of data or information that is provided by the external entity. Data flow
diagrams are versatile diagramming tools. With only four symbols, you can use data flow
diagrams to represent both physical and logical information systems. DFDs are not as good as
flow charts in depicting the details of physical systems – but are useful for depicting purely
logical information flows.

DFD is employed in this project purely because it shows how information enters and leaves the
system, what changes the information, and where information is stored. Also, DFDs show the
passage of data through the system by using 5 basic constructs: Data flows, Processes, Data
Stores, External Entities, and Physical Resources.

Furthermore, DFD is a simple but powerful graphic technique which is easily understood. It
represents an information system from the viewpoint of data movements, which includes the

31
inputs and outputs to which people can readily relate. It has the ability to represent the system
at different levels of details gives added advantage. The various levels represent the various
degrees of detail by which the system is represented. This is very useful during discussions
with users, either in fact-finding or getting agreement about system specification. Different
users may want to view the system at different levels of detail. By the incorporation of
different levels, the DFD can provide the view of the whole system or of an area of interest. It
also helps to define the boundaries of the system.

3.5.1 Context Level Diagram


Context-level data flow diagram shows the interaction between the system and external agents
which act as data sources and data sinks. On the context diagram (also known as the Level 0
DFD) the system's interactions with the outside world are modelled purely in terms of data
flows across the system boundary. The context diagram shows the entire system as a single
process, and gives no clues as to its internal organization.

This context-level DFD is next "exploded", to produce a Level 1 DFD that shows some of the
detail of the system being modeled. The Level 1 DFD shows how the system is divided into
sub-systems (processes), each of which deals with one or more of the data flows to or from an
external agent, and which together provide all of the functionality of the system as a whole. It
also identifies internal data stores that must be present in order for the system to do its job, and
shows the flow of data between the various parts of the system.

32
DATA FLOW DIAGRAM (LEVEL 0)

Register
s

DB Admin

Registers DB_Qs
qu
Student er
Returns y
Login details
result
Search Engine

QUIZ GAME Re
R
co Send
m et
s
me ur
ns user’
Extracts nd s
user s Q
detai
details ls
St Recommender
or Agent
e

Record

Figure 3.8: Data Flow Diagram (Level 0)

As shown in figure 3.4 pictorially, the student registers as a new user and the system (quiz
game) provides the user with his/her login details to access the system resources. Following
this, the system extracts and forwards the user’s details to the recommender Agent (R.A.). The
R.A therefore supplies the user details to the search engine. And the S.E queries the
Question_Datastore for questions based on its query parameter. The DB Admin updates the
Question_DataStore. The update can take place once there is change in the users’ details. After
this process, the system saves user’s information record.

33
DATA FLOW DIAGRAM (LEVEL 1)

Student User’s Extract Details R.A


Details 1

Accept User’s
Details

Ex
tr
ac
ts
2 U
Provides Quiz se
r’
Questions s
R
ec
Play Game
Recommends

3
Determines the
Course of Action

Student supplies his/her login details, the system authenticates and accepts if it is correct and
Figure 3.9: Data Flow Diagram (Level 0)
he/she is allowed to play the game (quiz game). His/her result is displayed after he/she is done
Sends
Display
playing the quiz Result
game and a result is sent to the recommender agent.
Result/Report
Record

DATA FLOW DIAGRAM (LEVEL 1)

Sends
Logi Details
Student n
Forwards
Process
Quiz Query
Engine 34
Game
Re
tu
Sends Returns Result Sen
rn
Questions Recommender ds
Que
s
ry
Q
ue
Se Se sti
nd nd on
The depiction above shows that upon the student loggings intos the system (QuizGame
Game),
DB his
Q Re
details are sent to the recommender. With this, the recommender
ue co sends query to the record to
ry rd
know if user has record as this aids the recommender agent in knowing what type of query it
can forward to the search engine. Students’ Record

3.6 Use Case


It identifies system users, their tasks and the priorities of their tasks. It describes what the
system does from the standpoint of an external observer. Emphasis on what the system does
rather on how it does it. It describes sequence of action a system performs that yields an
observable result. It models actions of the system at its external interface.

3.6.1 Use Case Basics


Actor: Someone/something external to the system who/which interacts with the system and
places demands on it. Examples are Student, Recommender Agent, Admin, and Search Engine

Use Case: It is a task to be performed by an actor with the help of the system and should be
documented third person active voice English. Examples are register details, save
authentication details, process user details, extract details, view details, obtains, update details,
etc.

Relationship: Actors are connected to the use cases with which they interact by a line which
represents a relationship between the actors and the use case.

35
System Boundary: It identifies an implicit separation between actors (external to the system)
and the use case (internal to the system).

Figure 3.11 is a User Case Diagram which diagrammatically analyses how different
operations/tasks are carried out by the actors (e.g. Student, Recommender Agent, Admin, and
Search Engine, and Quiz).

First, to have access to the system (quiz game) the student registers his/her details and the
system saves the authentication details. The Process User Details shows that the student can
extract his/her details, view history of his/her logins, and updates his/her details. Also, the
student plays quiz game.

Second, the recommender system extracts the student details upon registration or login. This
intimates the recommender agent on the user’s area of interest and also serves the purpose of
recommending quiz questions to the user/student based on the area of interest during game
play.

Third, the search engine searches the Question_Datastore using user’s area of interest from
Process User’s Details which is supplied by the recommender system.

Fourth, the Admin updates the quiz question database (Question_Datastore).

Fifth, quiz is the interface with the quiz question which the student interacts with during the
game play.

Register Details Recommender


System

<<extends>>

Saves Authentication
Details

Search
Engine 36
Process User’s Details

<<extends> <<implements>>
>
Extrac Views Updates
ts Quiz
Histor Details
Detail y
s

Quiz
Questions

<<extends>
>

Gets Quiz Qs from


DB

Admin

3.6 Entity Relationship Diagram


An entity-relationship data model is a detailed, logical representation of the data for an
organization or for a business area. An E-R model is normally expressed as an entity-
relationship diagram (or E-R diagram) which is a graphical representation of an E-R model.

The basic entity-relationship modeling notation uses three main constructs: data entities,
relationships and their associated attributes.

An entity is a person, place, object, event or concept in the user environment about which the
organization wishes to maintain data. It has its own identity that distinguishes from each other
entity.

An attributes is a property or characteristic of an entity.

Relationships are the glues that hold together the various components of an E-R model. A
relationship is association between instances of one or more entity types. An association
usually means that event has occurred or there exists some natural linkage between entity
instances. Hence, relationships are labeled with verb phrases.

Design Entities and Attributes

37
The following are the entities used in the design and they interact with one another through a
relationship in the database and in the program. The entities and their corresponding attributes
are listed in front of them. They are listed below.

Student (id, firstname, lastname, Othernames, marital_status_id_fk, sex_id_fk, date_of_birth,


nationality_id_fk, state_of_origin_id_fk, lga_of_origin, phones, home_address,
contact_address, passport, area_of_interest, created_on, last_mod_by, last_mode_ts)

Admin (id, firstname, lastname, othernames, phones, home_address, contact_address, passport,


created_on, last_mod_by, last_mode_ts)

Record (student_id)

38
QUIZ_DB_ADMIN

STUDENT Upda
te

registe
r chec
k QUIZ QUESTION

logi QUIZ GAME


n
Returns
processe Send
d result query

modi Send
fy Qs
SEARCH ENGINE
stor
e

Retu
rns Send
RECORD resul user
t details

RECOMMENDER
AGENT

39
Figure 3.12: ER Diagram
Figure 3.12 is an Entity Relationship (ER) Diagram. This ER diagram shows a skeletal flow
of operation in the system.

Diamonds represent relationship types.

Rectangles represent entity types.

Lines link attributes to entity types and entity types to relationship types.

The Entity Student registers and logs in to the quiz game

Figure 3.13 shows some of the database tables, their relationships with each other, their
attributes and actions that can be performed on them (Note: this is not the totality of the
tables to be created or relationship between tables for this project but it is a subset of the
database and uniquely depicts an accurate overview of the entire database.

3.2.1 STUDENT AND ADMIN AUTHENTICATION AND INFORMATION TABLES

Student_Auth Student_Info

id (integer) id (integer)
student_info_id_fk (integer) firstname (varchar)
username (varchar) lastname (varchar)
password (varchar) othernames (varchar)
changed_password (boolean) marital_status_id_fk (integer)
is_enabled (boolean) sex_id_fk (integer)
is_active (boolean) date_of_birth (date)
created_on (timestamp) nationality_id_fk (integer)
last_login_ts (timestamp) state_of_origin_id_fk (integer)
last_mod_by (varchar) lga_of_origin (varchar)
last_mode_ts (timestamp) phones (varchar)
home_address (text)
contact_address (text)
+ login (username, password) passport (varchar)
+ modifyAccount (username, area_of_interest (varchar)
old_password, new_password) created_on (timestamp)
+ changeActiveStatus last_mod_by (varchar)
(username) last_mode_ts (timestamp)
+ verifyAccount (id)
+ create
+ read
+ update
+ delete
Figure 3.13 Student Authentication Table

40
Figure 3.14: Admin Authentication Table

41
CHAPTER FOUR
SYSTEM IMPLEMENTATION
4.1 Introduction
Having completed the analysis and design, next on the system development process is the
implementation of the design using codes. However, certain standards and procedures must be
met prior to program coding. Standards and procedures help in proper documentation of
program for easy understanding by prospective users. They also aid in translating design to
codes. Standardized documentation also helps in locating errors and in making changes.

By structuring codes according to standards, the correspondence between design modules and
code modules is maintained. Changes in the design therefore pose no problem to implement in
the code.

4.2 Proposed System Requirement


The system was developed on a PC with the following specifications which will function
effectively on a LAN/WAN with the underlisted minimum requirements.

 512MB RAM

 60GB HARD DISK

 An SVGA Monitor (desktop)

 A memory card reader (optional)

 DVD-RW Drive (Optional)

 Any compatible printer

 Centrino Duo 1.8 GHz microprocessor

4.2 Software/Hardware Requirements


The system was developed using PHP as the front-end and MySQL was used for the database
which is the backend where the PHP codes query through user to access the system.

PHP is an open-source, server-side, HTML-embedded Web-scripting language that is


compatible with all the major Web servers (most notably Apache). PHP enables you to embed
code fragments in normal HTML pages—code that is interpreted as your pages are served up

42
to users. PHP also serves as a “glue” language, making it easy to connect your Web pages to
server-side databases.

MySQL (pronounced My Ess Q El) is an open source, SQL Relational Database Management
System (RDBMS) that is free for many uses.

4.3 Program Implementation


In developing the site, modular programming approach was used. The program is made up of
sub-programs (modules) with each performing specific functions. The sub-programs are both
event and menu driven and easy to operate.

The system includes major forms description below in user documentation.

4.4 User Documentation


HOME PAGE

43
The home page is the page that the users – new or existing see on launching/opening the quiz
game interface. The interface is so self-explanatory that the new user does not need any help
as to how to navigate on the page. It houses the Registration session for new user and login
session for existing user as well.

This page allows the user to register his/her details. It is a kind of authorization. Any person
that does not register will not have access to play or participate in the quiz contest. Upon
registration username and password are sent the user’s email address.

The registration page also houses the “existing user sign up here”. This gives existing user
and admin access to log on to access the system resources.

QUIZ GAME PAGE

The quiz game interface is the main thing. This is where the user upon logging in plays the
game. The recommender agent recommends quiz questions to the user based on his/her area
of interest. Each question has a timer. 30 seconds is allotted to each question.

44
ADMIN PAGE

Once the administrator logs in, he or she has access to Insert Question, Edit Question, View
Student, Edit Admin Login as in the screenshots.

45
4.5 System Testing
A software system is erroneous if it does not meet the user’s requirements. Testing of the
software is done at every stage of development by the test team to ensure that errors are
detected on time and eliminated.
Among the types of errors that should be guided against are:

1. Algorithmic error: This occurs when the module algorithm or logic of a program
does not produce the proper output for a given input as a result of wrong processing
steps.
2. Computation/precision error: This occurs when a formula’s implementation is
wrong or does not produce the result to a required level of accuracy.
3. Documentation error: This error occurs when program’s description does not match
the program’s function.
4. Standards and Procedures errors: These arise as result of a system not conforming
to prescribed standards. This tends to make the understanding of the program’s logic
or data description needed to solve a problem difficult to other programmers.

In the implementation of this model “an intelligent recommender agent for a web-based
quiz game”, the different modules are tested individually before merging them. An
integration test was performed between the modules.

To ensure integrity and usability, the following tests must be carried out:

Function testing: Checks that the integrated system performs its functional requirement
as specified in the requirements. This test thus ensured that the system performs the
following as specified in the requirements:

46
- Provided an interface that is interactive where users can communicate
effectively.
- Handles all modules and sub-modules forms appropriately.
- Ensured the functionality of the entire modules and sub-modules on the
interface.
The performance was carried out to verify that the system’s output met the specification.

4.6 Limitations
The system limitation is that it does not get feedback from users.

47
CHAPTER FIVE
SUMMARY, CONCLUSION AND RECOMMENDATIONS
5.1 Summary
The great amount of information that exists on the Internet makes the use of techniques that
help the user find what he is looking for necessary. Recommendation Systems are used
efficiently to solve the problem of information overload in areas such as electronic commerce
and social network. This intelligent recommender system for an online quiz game as seen in
this research work has shown that learning is beyond the four walls of the classroom. We
therefore developed a system that improved the performance (intelligence) of quiz-based
games by developing an intelligent recommender system for on-line quiz-based game. We can
see that from the review of related literatures that recommender systems are gaining
prominence by the day as technology advances. Palpably enough is its successful
implementation in e-commerce and the widely embraced social networking sites (e.g.
LinkedIn, facebook, twitter, Google+, etc.). This system addressed the ever changing needs of
learners/students by allowing users to change their preferences at all times. It therefore made
game play fun, motivating, challenging with a nice user experience.

5.2 Conclusion
A pedagogical game should have both gaming and learning outcomes embedded in the game.
Gamers will know they are learning, but the main purpose will be game completion. Users,
immersed in the process of learning and creating within a believable experience supported by
real and user-generated content, will develop skills and knowledge for use in other arenas.
The outcomes of playing the game will be achievement and peer kudos, but the process of
playing will have done much more.

A recommender system is a program that sees what a user is doing and tries to recommend
courses of action it thinks would be beneficial to the user. This is the idea behind some
systems used in electronic commerce sites to recommend products to customers they might
wish to purchase based on their previous purchasing history as well as the purchasing history
of those who bought similar goods as well as we have seen in social networking sites to
recommend actions (friends to add as the case in facebook, LinkedIn, etc. and who to follow
on Google+ and twitter) to users. To date, this hasn’t been well pronounced in on-line
learning environments most especially in quiz game and no known e-learning (quiz based)
system uses such a software agent to enhance the on-line learning experience as described in
this paper.

48
The final system is scalable and has possibilities for future modification and adaptability to
other problem domains. Improvements to the system can be made and the system forms a
good platform for future research into the use of computational intelligence in recommender
systems.

5.3 Recommendations
The implementation of the design methodology shows that it is very possible for existing or
new users to update their preferences. However, it is recommended that this system should be
upgraded to get feedbacks from users/players of the game. Also, the preferences should as
well be increased to cater for more user’s areas of interest.

49
References
Aggarwal, C. C., J. L. Wolf, K-L. Wu, and P. S. Yu (1999). Horting hatches an egg: A
new graph-theoretic approach to collaborative filtering. In Proceedings of the Fifth
ACM SIGKDD International Conference on Knowledge Discovery and Data Mining,
August.
Alessi, S. M., & Trollip, S. R. (1984). Computer-based instruction: Methods and
development. New Jersey, NJ: Prentice-Hall.
Amory A. (2001). "Building an educational adventure game: Theory, design and lessons,"
Journal of Interactive Learning Research, vol. 12, pp. 249–263.
Ansari, A., S. Essegaier, and R. Kohli (2000). Internet recommendations systems. Journal of
Marketing Research, pages 363-375.
Armstrong, J. S. (2001) Principles of Forecasting – A Handbook for Researchers and
Practitioners, Kluwer Academic Publishers.
Baeza-Yates, R., B. Ribeiro-Neto (1999). Modern Information Retrieval. Addison-Wesley.
Baid, H., & Lambert, N. (2010). Enjoyable learning: The role of humour, games, and fun
activities in nursing and midwifery education. Nurse Education Today, 30(6), 548-
552.
Balabanovic, M. and Y. Shoham (1997). Fab: Content-based, collaborative recommendation.
Communications of the ACM, 40(3):66-72.
Basu, C., H. Hirsh, and W. Cohen (1998). Recommendation as classification: Using social
and content-based information in recommendation. In Recommender Systems. Papers
from 1998 Workshop. Technical Report WS-98-08. AAAI Press.
Belkin, N. and B. Croft (1992). Information filtering and information retrieval.
Communications of the ACM, 35(12):29-37.
Billsus, D. and M. Pazzani (1998). Learning collaborative information filters. In International
Conference on Machine Learning, Morgan Kaufmann Publishers.
Billsus, D. and M. Pazzani (2000). User modeling for adaptive news access. User Modeling
and User-Adapted Interaction, 10(2-3):147-180.
Blumberg, F. C., Rosenthal, S. F., & Randall, J. D. (2008). Impasse-driven learning in the
context of video games. Computers in Human Behavior, 24(4), 1530-1541.
Bouras, C., V. Igglesis, V. Kapoulas, T. Tsiatsos, “A Web Based Virtual Community:
Functionality and Architecture Issues.”, IADIS International Conference - Web Based
Communities 2004, Lisbon, Portugal, March 23 - 26 2004, pp. 59 – 66

50
Bourgonjon, J., Valcke, M., Soetaert, R., & Schellens, T. (2010). Students’ perceptions about
the use of video games in the classroom. Computers & Education, 54 (4), 1145-1156.
Breese, J. S., D. Heckerman, and C. Kadie (1998). Empirical analysis of predictive algorithms
for collaborative filtering. In Proceedings of the Fourteenth Conference on
Uncertainty in Artificial Intelligence, Madison, WI.
Burgos D., Tattersall C., and R. Koper (2007). "Re-purposing existing generic games and
simulations for e-learning [Special issue on Education and pedagogy with Learning
objects and Learning designs]," Computers in Human Behavior, vol. 23, pp. 2656-
2667.
Burke, R. (2000). Knowledge-based recommender systems. In A. Kent (ed.), Encyclopedia of
Library and Information Systems. Volume 69, Supplement 32. Marcel Dekker.
Carbonaro, M., Szafron, D., Cutumisu, M., & Schaeffer, J. (2010). Computer-game
construction: A genderneutral attractor to Computing Science. Computers &
Education, 55(3), 1098-1111.
Carroll, J. M. (1982). The adventure of getting to know a computer. IEEE Computer, 15(11),
49-58.
Chien, Y-H. and E. I. George (1999). A Bayesian model for collaborative filtering. In Proc.
of
the 7th International Workshop on Artificial Intelligence and Statistics.
Chuang, T. Y., & Chen, W. F. (2009). Effect of computer-based video games on children: an
experimental study. Educational Technology & Society, 12(2), 1–10.
Claypool, M., A. Gokhale, T. Miranda, P. Murnikov, D. Netes, and M. Sartin (1999).
Combining content-based and collaborative filters in an online newspaper. In ACM
SIGIR'99. Workshop on Recommender Systems: Algorithms and Evaluation.
Cohen, W. W., R. E. Schapire, and Y. Singer (1999). Learning to order things. Journal of
Artificial Intelligence Research, 10:243-270.
Condliff, M., D. Lewis, D. Madigan, and C. Posse (1999). Bayesian mixed-effects models for
recommender systems. In ACM SIGIR'99 Workshop on Recommender Systems:
Algorithms and Evaluation.
Csikszentmihalyi M. (1992). Flow - the psychology of optimal experience, Klett-Cotta
Stuttgart.
Cuenca López, J. M., & Martín Cáceres, M. J. (2010). Virtual games in social science
education. Computers & Education, 55(3), 1336-1345.
De Castell S. & Jenson J. (2003). Serious play, Journal of Curriculum Studies 35, 649-665.

51
Delgado, J. and N. Ishii (1999). Memory-based weighted-majority prediction for
recommender systems. In ACM SIGIR'99 Workshop on Recommender Systems:
Algorithms and Evaluation.
Deshpande, M. and G. Karypis (2004). Item-Based Top-N Recommendation Algorithms.
ACM Transactions on Information Systems, 22(1):143-177.
Deterding, S., Sicart, M., Nacke, L., O’Hara, K., & Dixon, D. (2011). Gamification: Using
game-design elements in non-gaming contexts. In CHI ’11 Extended Abstracts on
Human Factors in Computing Systems (CHI EA '11). ACM, New York, NY, USA, pp.
2425-2428.
Dickey, M. D. (2010). Murder on Grimm Isle: The impact of game narrative design in an
educational gamebased learning environment. British Journal of Educational
Technology. doi:10.1111/j.1467-8535.2009.01032.x
Duda, R. O., P. E. Hart, and D. G. Stork (2001). Pattern Classification, John Wiley & Sons.
Freund, Y., R. Iyer, R.E. Schapire, and Y. Singer (1998). An efficient boosting algorithm for
combining preferences. In Proc. of the 15th Intl. Conference on Machine Learning.
Gagné, R. M. (1985). The conditions of learning (4th ed.). New York: Holt Rinehart and
Winston, Inc.
Garris, R., Ahlers, R., & Driskell, J. E. (2002). Games, motivation, and learning: A research
and practice model. Simulation & Gaming, 33 (4), 441-467.
Gee J. P. (2003). What video games have to teach us about learning and literacy. New York,
USA: Palgrave Macmillian.
Getoor, L. and M. Sahami (1999). Using probabilistic relational models for collaborative
filtering. In Workshop on Web Usage Analysis and User Profiling (WEBKDD'99).
Goldberg, D., D. Nichols, B. M. Oki, and D. Terry (1992). Using collaborative filtering to
weave an information tapestry. Communications of the ACM, 35(12):61-70.
Goldberg, K., T. Roeder, D. Gupta, and C. Perkins (2001). Eigentaste: A constant time
collaborative filtering algorithm. Information Retrieval Journal, 4(2):133-151.
Good, N., J. B. Schafer, J. A. Konstan, A. Borchers, B. Sarwar, J. L. Herlocker, and J. Riedl
(1999). Combining Collaborative Filtering with Personal Agents for Better
Recommendations. In Proceedings of the Conference of the American Association of
Artificial Intelligence (AAAI-99), pp. 439-446, Orlando, Florida.
Hill, W., L. Stead, M. Rosenstein, and G. Furnas (1995). Recommending and evaluating
choices in a virtual community of use. In Proceedings of CHI’95.
Hofmann, T. (2003). Collaborative Filtering via Gaussian Probabilistic Latent Semantic

52
Analysis. In Proc. of the 26th Annual International ACM SIGIR Conference, Toronto,
Canada.
Hofmann, T. (2004). Latent Semantic Models for Collaborative Filtering. ACM Transactions
on Information Systems, 22(1):89-115.
Huang, W. H. (2010). Evaluating learners' motivational and cognitive processing in an online
game-based learning environment. Computers in Human Behavior. doi:
10.1016/j.chb.2010.07.021
Huang, Z., H. Chen, and D. Zeng (2004). Applying Associative Retrieval Techniques to
Alleviate the Sparsity Problem in Collaborative Filtering. ACM Transactions on
Information Systems, 22(1):116-142.
Huizenga, J., Akkerman, S., Admiraal, W., & Dam, G. T. (2009). Mobile game-based
learning in secondary education: engagement, motivation and learning in a mobile city
game. Journal of Computer Assisted Learning, 25(4), 332-344.
Hull, D. A. (1999). The TREC-7 Filtering Track: Description and Analysis. In Proceedings of
the 7th Text Retrieval Conference (TREC-7), pp.
Jin, R., L. Si, and C. Zhai (2003). Preference-based Graphic Models for Collaborative
Filtering. In Proceedings of the 19th Conference on Uncertainty in Artificial
Intelligence (UAI 2003), Acapulco, Mexico, August 2003a.
Jin, R., L. Si, C. Zhai, and J. Callan (2003b). Collaborative Filtering with Decoupled Models
for Preferences and Ratings. In Proc. of the 12th International Conference on
Information and Knowledge Management (CIKM 2003), New Orleans, LA, November
2003b.
Johan Huizinga (1995). Homo Ledens: A Study of the Play-Element in Culture (Boston:
Beacon Press).
Kafai, Y. B. (1995). Minds in play-computer game design as a context for children's learning.
New Jersey: Hillsdale.
Keirn G. A., Shazeer N. N., Littman M. L., Cheves S. A. C. M., Fitzgerald J., Grosland J.,
Jiang F., Pollard S., and Weinmeister K. (1999). Proverb: The probabilistic
cruciverbalist. In Proc. 16th National Conference on Artificial Intelligence, pages 710-
717.
Kiili K. (2005). Content creation challenges and flow experience in educational games: The
T-Emperor case, Internet and Higher Education 8, 183-198.
Kiili K. (2005). Digital game-based learning: Towards an experiential gaming model,
Internet and Higher Education 8, 13-24.

53
Kim, B., Park, H., & Baek, Y. (2009). Not just fun, but serious strategies: using meta-
cognitive strategies in game-based learning. Computers & Education, 52(4), 800-810.
Kirikkaya, E. B., İŞERİ, Ş., & Vurkaya, G. (2010). A board game about space and solar
system for primary school students. The Turkish Online Journal of Educational
Technology, 9(2), 1-13.
Konradt U., Filip R. & Hoffmann S. (2003). Flow experience and positive affect during
hypermedia learning, British Journal of Educational Technology 34, 309-327.
Konstan, J. A., B. N. Miller, D. Maltz, J. L. Herlocker, L. R. Gordon, and J. Riedl (1997).
GroupLens: Applying collaborative filtering to Usenet news. Communications of the
ACM, 40(3):77-87.
Kumar, R., P. Raghavan, S. Rajagopalan, and A. Tomkins (2001). Recommendation Systems:
A Probabilistic Analysis. Journal of Computer and System Sciences, 63(1):42-61.
Lang, K. (1995). Newsweeder: Learning to filter netnews. In Proceedings of the 12th
International Conference on Machine Learning.
Laurillard D. (1998). "Multimedia and the learner’s experience of narrative," Computers in
Education, vol. 31, pp. 229-243.
Lee, C. Y., & Chen, M. P. (2009). A computer game as a context for non-routine
mathematical problem solving: the effects of type of question prompt and level of
prior knowledge. Computers & Education, 52(3), 530-542.
Leutner D. (1993). "Guided discovery learning with computer-based simulation games:
Effects of adaptive and non-adaptive instructional support," Learning and Instruction,
vol. 3, pp. 113-132.
Lilien, G. L., P. Kotler, K. S. Moorthy (1992). Marketing Models, Prentice Hall.
Linden, G., B. Smith, J. York (2003). Amazon.com Recommendations: Item-to-item
Collaborative Filtering. IEEE Internet Computing Industry Report.
Littlestone, N. and M. Warmuth (1994). The Weighted Majority Algorithm. Information and
Computation, 108(2):212-261.
Mannila, H., H. Toivonen, and A. I. Verkamo (1995). Discovering Frequent Episodes in
Sequences. In Proceedings of the First International Conference on Knowledge
Discovery and Data Mining (KDD-95).
Marlin, B. (2003). Modeling User Rating Profiles for Collaborative Filtering. In Proceedings
of the 17th Annual Conference on Neural Information Processing Systems (NIPS’03).
Melville, P., R. J. Mooney, and R. Nagarajan (2002). Content-Boosted Collaborative Filtering

54
for Improved Recommendations. In Proceedings of the Eighteenth National
Conference on Artificial Intelligence, Edmonton, Canada.
Middleton, S. E., N. R. Shadbolt, and D. C. de Roure (2004). Ontological User Profiling in
Recommender Systems. ACM Transactions on Information Systems, 22(1):54-88.
Mooney, R. J. and L. Roy (1999). Content-based book recommending using learning for text
categorization. In ACM SIGIR'99. Workshop on Recommender Systems: Algorithms
and Evaluation.
Mooney, R. J., P. N. Bennett, and L. Roy (1998). Book recommending using text
categorization with extracted information. In Recommender Systems. Papers from
1998 Workshop. Technical Report WS-98-08. AAAI Press.
Murthi, B. P. S. & S. Sarkar (2003). The Role of the Management Sciences in Research on
Personalization. Management Science, 49(10):1344-1362.
Nakamura, A. and N. Abe (1998). Collaborative filtering using weighted majority prediction
algorithms. In Proc. of the 15th International Conference on Machine Learning.
Norman, D. A. (1981). Perspectives on cognitive science. Norwood, New Jersey: Ablex.
Papastergiou, M. (2009a). Digital game-based learning in high school computer science
education: impact on educational effectiveness and student motivation. Computers &
Education, 52(1), 1-12.
Papastergiou, M. (2009b). Exploring the potential of computer and video games for health
and physical education: A literature review. Computers & Education, 53(3), 603-622.
Pavlov, D. and D. Pennock (2002). A Maximum Entropy Approach To Collaborative
Filtering in Dynamic, Sparse, High-Dimensional Domains. In Proceedings of the 16th
Annual Conference on Neural Information Processing Systems (NIPS’02).
Pazzani, M. (1999). A framework for collaborative, content-based and demographic filtering.
Artificial Intelligence Review, pages 393-408.
Pazzani, M. and D. Billsus (1997). Learning and revising user profiles: The identification of
interesting web sites. Machine Learning, 27:313-331.
Pennock, D. M. and E. Horvitz (1999). Collaborative filtering by personality diagnosis: A
hybrid memory- and model-based approach. In IJCAI'99 Workshop: Machine
Learning for Information Filtering.
Popescul, A., L. H. Ungar, D. M. Pennock, and S. Lawrence (2001). Probabilistic Models for
Unified Collaborative and Content-Based Recommendation in Sparse-Data
Environments. In Proc. of the 17th Conf. on Uncertainty in Artificial Intelligence,
Seattle, WA.

55
Powell, M. J. D. (1981). Approximation Theory and Methods, Cambridge University Press.
Prensky M. (2001). Digital Game-based Learning. New York, USA: McGraw-Hill.
Provost, J. A. (1990). Work, play and type: Achieving balance in your life. Palo Alto, CA:
Consulting Psychologist Press.
Rashid, A. M., I. Albert, D. Cosley, S. K. Lam, S. M. McNee, J. A. Konstan, and J. Riedl
(2002). Getting to Know You: Learning New User Preferences in Recommender
Systems. In Proceedings of the International Conference on Intelligent User
Interfaces.
Resnick, P., N. Iakovou, M. Sushak, P. Bergstrom, and J. Riedl (1994). GroupLens: An open
architecture for collaborative filtering of netnews. In Proceedings of the 1994
Computer Supported Cooperative Work Conference.
Rheinberg F. (2006). Motivation, Kohlhammer Verlag, Stuttgart.
Rich, E. (1979). User Modeling via Stereotypes. Cognitive Science, 3(4):329-354.
Robertson S. and S. Walker (2000). Threshold Setting in Adaptive Filtering. Journal of
Documentation, 56:312-331.
Rocchio, J. J. (1971). Relevance Feedback in Information Retrieval. SMART Retrieval System
– Experiments in Automatic Document Processing, G. Salton ed., PrenticeHall, Ch. 14.
Salton, G. (1989). Automatic Text Processing. Addison-Wesley.
Sarwar, B., G. Karypis, J. Konstan, and J. Riedl (2001). Item-based Collaborative Filtering
Recommendation Algorithms. In Proc. of the 10th International WWW Conference.
Schein, A. I., A. Popescul, L. H. Ungar, and D. M. Pennock (2002). Methods and metrics for
cold-start recommendations. In Proc. of the 25th Annual Intl. ACM SIGIR Conference.
Schiefele U. & Rheinberg F. (1997). Motivation and knowledge acquisition: Searching for
mediating processes, In M. L. Maehr & P. P. Pintrich (Eds.), Advances in motivation
and achievement (Vol. 10, pp. 251-301), JAI Press, Greenwich CT.
Seonju, K. (2002). An empirical analysis of children’s thinking and learning in a computer
game context. Educational Psychology, 22(2), 219-233.
Shani, G., R. Brafman, and D. Heckerman (2002). An MDP-based recommender system. In
Proc. of Eighteenth Conference on Uncertainty in Artificial Intelligence.
Shardanand, U. and P. Maes (1995). Social information filtering: Algorithms for automating
‘word of mouth’. In Proc. of the Conf. on Human Factors in Computing Systems.
Sheth, B. and Maes P. (1993). Evolving agents for personalized information filtering. In
Proceedings of the 9th IEEE Conference on Artificial Intelligence for Applications.
Si, L. and R. Jin (2003). Flexible Mixture Model for Collaborative Filtering. In Proceedings

56
of the 20th International Conference on Machine Learning, Washington, D.C.
Soboroff, I. and C. Nicholas (1999). Combining content and collaboration in text filtering. In
IJCAI'99 Workshop: Machine Learning for Information Filtering.
Somlo, G. and A. Howe (2001). Adaptive Lightweight Text Filtering. In Proceedings of the
4th International Symposium on Intelligent Data Analysis, Lisbon, Portugal.
Squire K. (2002). "Video games in education," International Journal of Intelligent
Simulations and Gaming, vol. 2.
Stone P. and Sutton R. (2001). Scaling reinforcement learning toward RoboCup soccer. In
Proceedings of the 18th ICML.
Terrell, S. & Rendulic, P. (1996). Using computer- managed instructional software to
increase motivation and achievement in elementary school children. Journal of
Research on Computing in Education, 26(3), 403-414.
Terveen, L., W. Hill, B. Amento, D. McDonald, and J. Creter (1997). PHOAKS: A system for
sharing recommendations. Communications of the ACM, 40(3):59-62.
Tran, T. and R. Cohen (2000). Hybrid Recommender Systems for Electronic Commerce. In
Knowledge-Based Electronic Markets, Papers from the AAAI Workshop, Technical
Report WS-00-04, AAAI Press.
Tüzün, H., Yılmaz-Soylu, M., Karakuş, T., İnal, Y., & Kızılkaya, G. (2009). The effects of
computer games on primary school students’ achievement and motivation in
geography learning. Computers & Education, 52 (1), 68-77.
Ungar, L. H., and D. P. Foster (1998). Clustering methods for collaborative filtering. In
Recommender Systems. Papers from 1998 Workshop. Technical Report WS-98-08.
AAAI Press.
Van Eck R. (2007). "Building artificially intelligent learning games," in Games and
Simulations in Online Learning: Research and Development Frameworks, D. Gibson,
C. Aldrich, and M. Prensky, Eds. Hershey, PA: Information Science Publishing.
van Lent M., Laird J., Buckman J., Hartford J., Houchard S., Steinkraus K., and Tedrake R.
(1999). Intelligent agents in computer games. In Proc. 16th National Conference on
Artificial Intelligence, pages 929-930.
Warren, S. J., Dondlinger, M. J., & Barab, S. A. (2008). A MUVE towards PBL writing:
effects of a digital learning environment designed to improve elementary student
writing. Journal of Research onTechnology in Education, 41(1), 113-140.
Williamson D., Squire K., Halverson R., and Gee J. P. (2005). "Video games and the future of
learning," WCER Working paper, vol. 2005-4.

57
Winn, W. (1993). Instructional design and situate learning: Paradox or partnership?.
Educational Technology, 33(3), 16-21.
Wu, H. L. & Guo, J. H. (2003). Playgroup: the theory and practice of game development.
Taipei: ALi.
Yang, C. D. (2010). Group Counseling: Theory and Practice (New Edition). Taipei: Wu Nan.
Young, M. F. (1993). Instruction design for situated learning. Educational Technology
Research and Development, 41(1), 43-58.
Yu, K., A. Schwaighofer, V. Tresp, X. Xu, and H.-P. Kriegel (2004). Probabilistic Memory-
Based Collaborative Filtering. IEEE Transactions on Knowledge and Data
Engineering, 16(1):56-69.
Yu, K., X. Xu, J. Tao, M. Ester, and H.-P. Kriegel (2002). Instance Selection Techniques for
Memory-Based Collaborative Filtering. In Proceedings of Second SIAM International
Conference on Data Mining (SDM’02).
Yun, R. W., Jiang, Y. Y., & Li, X. (2010). The summaries of studies of application
effectiveness of computer games in primary and secondary education. Distance
Education Journal, 28(2), 86-92.
Zhang Y. and J. Callan (2001). Maximum Likelihood Estimation for Filtering Thresholds. In
Proc. of the 24th Annual International ACM SIGIR Conference, New Orleans, LA.
Zhang, Y, J. Callan, and T. Minka (2002). Novelty and redundancy detection in adaptive
filtering. In Proceedings of the 25th Annual International ACM SIGIR Conference, pp.
81-88.
Zichermann, G., & Cunningham, C. (2011). Gamification by design: Implementing game
mechanics in web and mobile apps. Sebastopol, CA: O’Reilly Media.

58
APPENDIX

// PHP CODE FOR INDEX PAGE


<?
//// beginning of session
session_start();
$error = "";
//////connection to the database
$dbcon = mysql_connect('localhost','root');
if(!$dbcon) die (mysql_error());
$dbsel = mysql_select_db('victor',$dbcon);
if(!$dbsel) die (mysql_error());

//////posting data variable


$username = $_POST['username'];
$password = $_POST['password'];
$fname = $_POST['fname'];
$oname = $_POST['oname'];
$lname = $_POST['lname'];

$_SESSION['fname'] = $fname;
$_SESSION['oname'] = $oname;
$_SESSION['username'] = $username ;
$_SESSION['password'] = $password;
//$adno = $_POST['adno'];
$day = $_POST['day'];

$month = $_POST['month'];
$year = $_POST['year'];
$date_of_birth = $day." ".$month." , ".$year;
$ha = $_POST['ha'];
$nationality = $_POST['nationality'];
$ca = $_POST['ca'];
$ms= $_POST['ms'];
$sex = $_POST['sex'];
$pn = $_POST['pn'];
$lga = $_POST['lga'];
$so = $_POST['so'];
$ai = $_POST['ai'];
$pn = $_POST['pn'];
$un= $_POST['un'];
$pass = $_POST['pass'];
/////sql statement
$sqlnew = " SELECT * From studentrec WHERE un = '$un'";
$querynew = @mysql_query($sqlnew);
if (!$querynew) die( "query error ". mysql_error());
$rownew = mysql_fetch_array($querynew);
$q_level = $rownew['q_level'];
$qtype = $rownew['q_type'];

59
if(mysql_num_rows($querynew) == ""){

$q_level = "Amateur" ;

if ($_FILES['uploadfile']['name'] != "" && $_FILES['uploadfile']['size'] <= 150000){


if (eregi('^image/p?jpeg(;.*)?$', $_FILES['uploadfile']['type']))
{ //type t

$extension = ".jpg";
$f = $_FILES['uploadfile']['name'];
$f = eregi_replace("\.","",$f);
$f = $f.$extension;
$filename = "images2/".$f;

$imginfo = getimagesize($_FILES['uploadfile']['tmp_name']);
if ($imginfo[0] <= 700 and $imginfo[1] <= 700)
{ //siz t
if (is_uploaded_file($_FILES['uploadfile']['tmp_name']) and
copy($_FILES['uploadfile']['tmp_name'], $filename));
$w = $imginfo[0];
$h = $imginfo[1];

}//siz t
else
{//siz f
$error = "You have entered invalid image size";

}//siz f
} //type t
else
{ //type f
$error = "Make Sure your Opload is .jpeg And Maximum of 150KB";
}//type f
}
else
{ $f = ""; $w = ""; $h = "";}
if($fname != "" && $lname != "" && $date_of_birth != "" && $un != "" && $pass != "" &&
$ms != "" && $sex != "" && $nationality != "" && $ha != "" && $so != "" && $ca != ""
&& $pn != "" && $lga != "" && $ai != "" ){
$sql2 = " INSERT INTO studentrec SET imgname = '$f', width = '$w', high = '$h',fname =
'$fname', oname = '$oname',lname = '$lname',date_of_birth = '$date_of_birth',un ='$un', day
= '$day', month ='$month', year = '$year',pass = '$pass', ms = '$ms',sex= '$sex',nationality =
'$nationality', so = '$so' , ha = '$ha',ca = '$ca' , pn ='$pn', lga = '$lga', ai = '$ai' , q_level =
'$q_level' " ;

if(!$sql2) die (mysql_error());


$result = mysql_query($sql2);
if(!$result) die (mysql_error());
header('location:'.'thanksform.php');

60
//}

}
else if(mysql_num_rows($querynew) != ""){
$error = "Sorry this Username has been registered before" ;
}
$_SESSION['qlevel'] = $q_level ;
$_SESSION['aii'] = $aii ;

if($username != "" || $password != ""){


$sql = "SELECT * FROM studentrec WHERE pass = '$password' AND un = '$username' ";
if(!$sql) die (mysql_error());
$res = mysql_query($sql);
if(!$res) die (mysql_error());
if(mysql_num_rows($res)){
$row = mysql_fetch_array($res);
$_SESSION['ai'] = $row['ai'] ;
$_SESSION['status'] = $row['status'];
$_SESSION['ql'] = $row['q_level'];
$_SESSION['username'] = $username ;
$_SESSION['password'] = $password ;
header('location:'.'studentlogin.php');
}
//if(!mysql_num_rows(res))

else
$sql2 = "SELECT * FROM admin WHERE password = '$password' AND username =
'$username'";
if(!$sql2) die (mysql_error());
$res2 = mysql_query($sql2);
if(!$res) die (mysql_error());
if(mysql_num_rows($res2)){
$row = mysql_fetch_array($res2);
header('location:'.'admin.php');
}
$error = "You Have Enter Invalid Password Or Username , Pls Try Again Later";
}
//}
?>

//HTML CODE FOR INDEX PAGE


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

61
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>
Intelligence is the Key
</title>

<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
font-size: 14px;
font-family: "Times New Roman", Times, serif;
}
-->
</style>
<link href="mycss.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #00CCFF;
}
.style25 {font-family: "Times New Roman", Times, serif}
.style29 {color: #FFFFFF}
.error { color:#FF0000; font:"Times New Roman", Times, serif; font-size:12px;}
.style33 {color: #FF0000}
-->

</style>
</head>
<body>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<table width="802" height="468" border="0" align="center" cellpadding="0" cellspacing="0"
bordercolor="#000000" bgcolor="#000000">
<tr>
<td width="599" height="198" align="left" background="images/Pic2.jpg">&nbsp;</td>
<td width="203" align="left">&nbsp;</td>
</tr>
<tr>
<td height="19" colspan="2" align="left" valign="top" bgcolor="#CCCCCC"><div
align="center"><span class="style25"><marquee>
&nbsp;Intelligence is the key .

</marquee>
</span></div></td>

62
</tr>
<tr>
<td height="226" colspan="2" align="left" valign="top" bgcolor="#AFAA68"><form
id="form1" name="form1" method="post" action="index.php">
<table width="100%" border="0" align="left" cellspacing="0">
<tr align="center" class="contents">

<td height="26" colspan="3" align="left" valign="middle" bgcolor="#999999"><span


class="style25">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;<span class="style29">Existing User sign up Here
</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Username

<input name="username" type="text" id="username" size="20" maxlength="20" />


Password

<input name="password" type="password" id="password" size="20"


maxlength="20" />
<label>
<input name="Logme" type="submit" id="Logme" value="log in" />
&nbsp;</label>
</span></td>
</tr>
<tr align="center" class="contents">
<td height="24" colspan="3" align="right" bgcolor="#CCCCCC" class="error"
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo ($error !=
"")? $error : ""; ?></td>
</tr>
<tr class="contents">
<td width="6%" rowspan="4" bgcolor="#CCCCCC">&nbsp;</td>
<td width="15%" bgcolor="#CCCCCC"><span class="style25">First
Name</span><span class="style25"><br />
</span><span class="style25"><br />
</span></td>

<td width="79%" bgcolor="#CCCCCC"><span class="style25">


<input name="fname" type="text" id="fname" size="25" maxlength="25" />
<span class="style33">*</span></span></td>
</tr>
<tr class="contents">
<td bgcolor="#CCCCCC"><span class="style25">Last Name</span></td>
<td width="79%" bgcolor="#CCCCCC"><input name="lname" type="text"
id="lname" size="25" maxlength="25" />
<span class="style33">*</span></td>
</tr>
<tr class="contents">
<td bgcolor="#CCCCCC"><span class="style25">Other Name </span></td>

63
<td width="79%" bgcolor="#CCCCCC"><span class="style25">
<input name="oname" type="text" id="oname" size="25" maxlength="25" />
</span></td>
</tr>
<tr class="contents">
<td bgcolor="#CCCCCC" class="style25">UserName</td>
<td bgcolor="#CCCCCC"><input name="un" type="text" id="un" size="25"
maxlength="25" />
<span class="style33">*</span><span class="style25"> Password </span>
<input name="pass" type="password" id="pass" size="25" maxlength="25" />
<span class="style33">*</span></td>
</tr>

<tr class="contents">
<td bgcolor="#CCCCCC">&nbsp;</td>
<td bgcolor="#CCCCCC"><p class="style25"><span class="style25">Data of Birth:
</span>Day</p> </td>
<td bgcolor="#CCCCCC"><span class="style25">
<label></label>
<label></label>
<select name="day" size="1" id="day">
<option value="1st" selected="selected">1st</option>
<option value="2nd">2nd</option>
<option value="3rd">3rd</option>
<option value="4th">4th</option>
<option value="5th">5th</option>
<option value="6th">6th</option>
<option value="7th">7th</option>
<option value="8th">8th</option>
<option value="9th">9th</option>
<option value="10th">10th</option>
<option value="11th">11th</option>
<option value="12th">12th</option>
<option value="13th">13th</option>
<option value="14th">14th</option>
<option value="15th">15th</option>
<option value="16th">16th</option>

<option value="17th">17th</option>
<option value="18th">18th</option>
<option value="19th">19th</option>
<option value="20th">20th</option>
<option value="21st">21st</option>
<option value="22nd">22nd</option>
<option value="23rd">23rd</option>
<option value="24th">24th</option>
<option value="25th">25th</option>
<option value="26th">26th</option>

64
<option value="27th">27th</option>
<option value="28th">28th</option>
<option value="29th">29th</option>
<option value="30th">30th</option>
<option value="31st">31st</option>
</select>
</span><span class="style33">*</span><span class="style25"> Month
<select name="month">
<option value="Jan" selected="selected">Jan</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>

<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="Octomber">Octomber</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
</span><span class="style33">* </span><span class="style25">Year
<select name="year" size="1" id="year">
<option value="1980" selected="selected">1980</option>
<option value="1981">1981</option>
<option value="1982">1982</option>
<option value="1983">1983</option>
<option value="1984">1984</option>
<option value="1985">1985</option>
<option value="1986">1986</option>
<option value="1987">1987</option>
<option value="1988">1988</option>
<option value="1989">1989</option>
<option value="1990">1990</option>
<option value="1991">1991</option>
<option value="1992">1992</option>

<option value="1993">1993</option>
<option value="1994">1994</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>

65
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>

<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
<option value="2022">2022</option>
<option value="2023">2023</option>
<option value="2024">2024</option>
<option value="2025">2025</option>
<option value="2026">2026</option>
<option value="2027">2027</option>
<option value="2028">2028</option>
<option value="2029">2029</option>
<option value="2030">2030</option>
<option value="2031">2031</option>
<option value="2032">2032</option>
<option value="2033">2033 </option>
<option value="2034">2034</option>
<option value="2035">2035</option>
<option value="2036">2036 </option>
<option value="2037">2037</option>
<option value="2038">2038</option>
<option value="2039">2039</option>

<option value="2040">2040</option>
<option value="2041">2041</option>
<option value="2042">2042</option>
<option value="2043">2043</option>
<option value="2044">2044</option>
<option value="2045">2045</option>
<option value="2046">2046</option>
<option value="2047">2047</option>

66
<option value="2048">2048</option>
<option value="2049">2049</option>
<option value="2050">2050</option>
</select>
</span><span class="style33">*</span></td>
</tr>
<tr class="contents">
<td bgcolor="#CCCCCC" class="style25">&nbsp;</td>
<td bgcolor="#CCCCCC"><label><span class="style25">Marital
Status</span></label></td>
<td bgcolor="#CCCCCC"><select name="ms" id="ms">
<option value="Single" selected="ms">Single</option>
<option value="Married">Married</option>
</select>
<span class="style33">*</span> <span class="style25">Sex</span>
<select name="sex" id="sex">

<option value="Male" selected="selected">Male</option>


<option value="Female">Female</option>
</select>
<span class="style33">*</span></td>
</tr>
<tr class="contents">
<td bgcolor="#CCCCCC" class="style25">&nbsp;</td>
<td bgcolor="#CCCCCC"><label><span
class="style25">Nationality</span></label></td>
<td bgcolor="#CCCCCC"><select name="nationality">
<option value="Nigeria" selected="selected">Nigeria</option>
<option value="Niger">Niger</option>
<option value="Cameroon">Cameroon</option>
<option value="Gambia">Gambia</option>
<option value="Egypt">Egypt</option>
<option value="Italy">Italy</option>
<option value="Zambia">Zambia</option>
</select>
<span class="style33">*</span><span class="style25"> State of Origin </span>
<select name="so" id="so">
<option value="Abia">Abia</option>
<option value="Adamawa">Adamawa</option>
<option value="Akwa-Ibom">Akwa-Ibom</option>
<option value="Bauchi">Bauchi</option>

<option value="Benue">Benue</option>
<option value="Borno">Borno</option>
<option value="Benue">Benue</option>
<option value="Cross-River">Cross-River</option>
<option value="Delta">Delta</option>
<option value="Edo">Edo</option>

67
<option value="Enugu">Enugu</option>
<option value="Imo">Imo</option>
<option value="Kaduna">Kaduna</option>
<option value="Kastina">Kastina</option>
<option value="Kano">Kano</option>
<option value="Lagos">Lagos</option>
<option value="Oyo">Oyo</option>
<option value="Osun">Osun</option>
<option value="Ogun">Ogun</option>
</select>
<span class="style33">* </span>
<label></label></td>
</tr>
<tr class="contents">
<td rowspan="4" bgcolor="#CCCCCC" class="style25">&nbsp;</td>
<td bgcolor="#CCCCCC" class="style25">Home Address</td>
<td bgcolor="#CCCCCC">

<input name="ha" type="text" size="30" />


<span class="style33">*</span><span class="style25"> Contact Address
<input name="ca" type="text" size="30" maxlength="30" />
</span><span class="style33">*</span> </td>
</tr>
<tr class="contents">
<td bgcolor="#CCCCCC" class="style25">L.G.A</td>
<td bgcolor="#CCCCCC"><input name="lga" type="text" id="lga" size="25"
maxlength="25" /> <span class="style33">*</span><span class="style25">
Passport</span>
<input name="uploadfile" type="file" id="uploadfile" size="30" maxlength="30" />
<span class="style33">*</span></td>
</tr>
<tr class="contents">
<td bgcolor="#CCCCCC" class="style25"> Area of Interest </td>
<td bgcolor="#CCCCCC"><span class="style33">
<select name="ai" id="ai">
<option value="Current Affair">Current Affair</option>
<option value="Sport">Sport</option>
<option value="Politics">Politics</option>
<option value="Academic">Academic</option>
</select>
*</span><span class="style25"> Phone Number
<input name="pn" type="text" size="25" maxlength="25" />
<span class="style33">*</span></span></td>

</tr>
<tr class="contents">
<td bgcolor="#CCCCCC">&nbsp;</td>
<td bgcolor="#CCCCCC"><label>

68
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" name="Submit" value="Create User Account" />
</label></td>
</tr>
<tr class="contents">
<td bgcolor="#CCCCCC" class="style25">&nbsp;</td>
<td colspan="2" bgcolor="#CCCCCC">&nbsp;</td>
</tr>
<tr class="contents">
<td height="20"
colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;</td>
</tr>
</table>
</form> </td>
</tr>
<tr>

<td height="24" colspan="2" align="left" valign="top"><span class="style1">copyright


2013 , Allrights Reserved Software Powered By Computer Science Dept. U.I..08037437877
</span></td>
</tr>
</table>
</body>
</html>

/////// PHP CODE FOR question page

<?
session_start();

$dbcon = mysql_connect('localhost','root');
if(!$dbcon) die (mysql_error());
$dbsel = mysql_select_db('victor',$dbcon);
if(!$dbsel) die (mysql_error());

$t = $_SESSION['g'];
$qlevel = $_SESSION['qlevel'];
$aii = $_SESSION['aii'];
//for($i = 0; $i <9 ; $i++)
//$rand = rand(1,10);

//$d = $_SESSION['order_id'];
//$rand1 = $rand ;

69
$_SESSION['g2'] = date ('s');
$username = $_SESSION['username'];
$password = $_SESSION['password'] ;
//if(!isset($_SESSION['name']))
// {

//if($option1 == "" ){
$rand = rand(0,3);

$ai = $_SESSION['ai'];
$status = $_SESSION['status'];
$ql = $_SESSION['ql'] ;

$sql = "SELECT * FROM beginer WHERE q_level = '$ql' AND q_type = '$ai' AND no =
'$rand'";
if(!$sql) die (mysql_error());
$res = mysql_query($sql);
if(!$res) die (mysql_error());
if(mysql_num_rows($res)){
$row = mysql_fetch_array($res);
//$des = $_POST['de'] ;
$w = $row['no'] ;

// SESSION_destroy();
//header('location:'.'index.php');
//}
//echo $d;

$option1 = $_POST['option1'];

//$_SESSION['option1'] = $option1 ;

if($option1 != "" ){

$sql1 = "Update beginer SET chosen = '$option1' WHERE no = '$rand' ";


if (!$sql1) die( "query Insert error ". mysql_error());

$query = @mysql_query($sql1);
if (!$query) die( "query Insert error ". mysql_error());
header('location:'.'news2.php');

}
//$_SESSION['answer1'] = $row['answer

70
$sql3 = "select * from studentrec where un = '$username' && pass = '$password' ";
$cquery = @mysql_query($sql3);
if (!$cquery) die(mysql_error());
if(mysql_num_rows($cquery)){
$rownew = mysql_fetch_array($cquery);

}
?>

/////HTML CODE FOR QUESTION PAGE


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Love of God Group of Schools</title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #FFFFFF;
}
-->
</style>

<link href="mcss.css" rel="stylesheet" type="text/css" />


<style type="text/css">
<!--
.style11 {
font-family: "Times New Roman", Times, serif;
font-size: 18px;
}
.style13 {font-size: 16px}
body {
background-color: #FFFFFF;
}
.style27 {color: #000000}
.style33 {color: #FF0000}
-->
</style>
</head>

<body>
<table width="1200" height="592" align="center" cellspacing="0">
<tr>
<td height="221" colspan="2" valign="top"><table width="855" height="217" border="0"
align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#000000">
<tr>

71
<td width="592" height="198" align="left"
background="images/Pic2.jpg">&nbsp;</td>

<td width="202" align="right" valign="top"><span class="style33"><span


class="style10">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></td>
<td width="61" align="right" valign="top" bgcolor="#FFFFFF"><span
class="style33"><span class="style10">
<?
echo "</form>";
echo "<form method = post action = \"index.php\">";
echo "<table>";

//echo "<br><br>";
echo "<input type = Submit class= close value= \"Close Window\">";
echo "</table>";

echo "</form>";
?>
</span></span></td>
</tr>
<tr>
<td height="19" colspan="3" align="left" valign="top"
bgcolor="#CCCCCC">&nbsp;<span class="style11">Intelligence is the Key </span></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="268" align="left" valign="top" bgcolor="#990000"><span
class="name"><br />

<form name="redirect">
<input type="text" size="2" name="redirect2" disabled="disabled">
</form>
<script>

var targetURL="news2.php"
var countdownfrom=30
var currentsecond=document.redirect.redirect2.value=countdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
document.redirect.redirect2.value=currentsecond
}
else{
window.location=targetURL

72
return
}
setTimeout("countredirect()",1000)
}
countredirect()
//-->
</script>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Welcome
&nbsp;<?=$rownew['fname'] ;
?> <?=$rownew['lname'];?><br />
</span> <form action="news.php" method="post" enctype="multipart/form-data"
name="form2" >
<table width="1176" height="244" cellpadding="0" cellspacing="0">
<tr>
<td width="1174" height="200" bordercolor="#000000" bgcolor="#FFFFFF"><span
class="style13"> &nbsp;</span>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?
//if($rownew=mysql_fetch_array($cquery))
//{
//$cps = $cps +1;

?>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;<br />

<br />
</label>
<table width="1042" height="110" border="0">
<tr>
<td height="20" colspan="3" >&nbsp;<span class="style27">&nbsp;<span
class="style13"><strong>1.

73
<?=$row['question'] ;?>
</strong></span>
<label> &nbsp;</label>
</span></td>
</tr>
<tr>
<td width="355" height="23"><span class="style27">A
<input name="option1" type="radio" value="<?=$row['optiona'] ;?>" />
<strong>
<?=$row['optiona'] ;?>
</strong></span></td>
<td width="351"><span class="style27">B
<input name="option1" type="radio" value="<?=$row['optionb'] ;?>" />
<strong>
<?=$row['optionb'] ;?>
</strong></span></td>
<td width="322"><span class="style27">C

<input name="option1" type="radio" value="<?=$row['optionc'] ;?>" />


<strong>
<?=$row['optionc'] ;?>
</strong>
<input name="de" type="hidden" id="de" value="<?=$row['no'] ?>" />
<label></label>
<label></label>
</span></td>
</tr>
<tr>
<td height="42">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
class="style27">D
<input name="option1" type="radio" value="<?=$row['optiond'] ;?>" />
<strong>
<?=$row['optiond'] ;?>
</strong> </span>
<label></label>
&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>&nbsp;</td>
<td bgcolor="#FFFFFF"><? echo $rand1 .$_SESSION['no2'].
$rand3.$rand4.$rand5 ;?></td>
</tr>
</table>
<label><br />

<br />
</label>
<label><? $_SESSION['dimg'] = $dimg ;
?>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs

74
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
<input type="submit" name="Submit" value="Next" />
</label></td>
</tr>
<? // } ?>
<tr>
<td height="42" valign="bottom"
bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<label></label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</lab
el>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;</label>

<label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;</label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<
/td>
</tr>
</table>
</form></td>
<td width="8" align="center" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
</tr>

<tr> </tr>
</table>
</body>
</html>

75

You might also like