Objection detection doc
Objection detection doc
Submitted by
DHINAHARI R - 810020104023
DHIVYA A S- 810020104024
MADHUMITHA A- 810020104308
MAY 2023
i
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
BONAFIDE CERTIFICATE
This is to certify that this Mini Project report (CS8611) titled ‘Memory Mix Game” is
the bonafide work of “Dhinahari R (810020104023), Dhivya A S (81020104024),
Madhumitha A (810020104308)” Third Year, Sixth Semester, B.E COMPUTER SCIENCE
AND ENGINEERING during the year February 2023 to May 2023
ii
ABSTRACT:
A memory game in which many of the parents will allow their children
for playing ecofriendly. The graphics of the gameplay system is good and
smooth for improving children’s attraction. Memory Mix Game (MMG) - game
for children to gain their knowledge and memory power. This single player
mode game in java script is an easy game for all. In this project, a webpage
consists of five different Memory development games. The games are Letter
Puzzle (LP)-guessing the right letter within the word. Match Match (MM)-to
find the corresponding match. Number Guessing (NG)-to guess a number in a
given range. Zeros and Crosses-row (XOX), column and diagonal are
completely filled by mark `X’ or `O’. Ching Chong Cha (CCC) - fun game for
entertainment purpose. Now a day most of the children’s are addicted for video
games, online games and cash reward games.
KEYWORDS:
iii
TABLE OF CONTENTS
ABSTRACT iii
`I INTRODUCTION 1-3
1.1 Objective 1
1.2 Motivation 1
1.3 Overview 2
2.6 Limitations 5
iv
3.1.3 Data flow diagram level 2 7
IV IMPLEMENTATION 14-24
4.3 Implementation 18
v
V CONCLUSION AND FUTURE WORKS 25-26
5.1 Conclusion 25
APPENDICES 27-46
REFERENCES 47-51
vi
LIST OF FIGURES
vii
CHAPTER I
INTRODUCTION
1.1 OBJECTIVE
Entertainment: Memory games are fun and engaging, and people of all
ages enjoy playing them. Developing a memory game using web
development can provide a fun and entertaining experience for users.
Memory games are known to improve cognitive abilities such as
memory, attention, and concentration. Developing a memory game using
1
web development can provide a platform for users to exercise their brain
while having fun.
Education: Memory games can be used as an educational tool to teach
different concepts such as language, mathematics, or history. Developing
a memory game using web development can provide an interactive and
engaging way to learn.
Memory games can be used as a marketing tool to promote a brand or
product. Developing a memory game using web development can provide
an engaging way to increase brand awareness and customer engagement.
1.3 OVERVIEW
2
Figure 1.1 Overview
3
CHAPTER II
LITERATURE SURVEY
"A Simple Method for Solving the Number Guessing Game" by Tom
Ziemke and David O'Connell (2007)
This paper presents a simple algorithm for playing the number guessing
game based on the binary search method.
4
2.5 ALGORITHM OF FINDING MISSING LETTERS
Game mechanics: Many existing memory games for the web use the
same basic game mechanics, such as flipping over cards to match
pairs. While this can be engaging initially, players may quickly
become bored with repetitive gameplay.
Limited customization: Many existing memory games for the web
offer limited options for customization, such as the ability to change
the theme or difficulty level. This can make the game feel generic and
less engaging.
Limited social features: Many existing memory games for the web do
not include social features, such as the ability to compete with friends
or share scores on social media. This can limit the game's appeal and
reduce its potential for viral growth.
Memory capacity: The existing system may have limited memory
capacity, which can affect the number of game elements or levels that
can be stored and displayed.
User interface limitations: The existing system may have constraints
on the user interface, such as screen size, input methods, or available
interaction options. These limitations can affect the design and
presentation of the memory game.
5
CHAPTER III
SYSTEM ARCHITECTURE
The Figure 3.1 Data Flow Diagram Level 0 below shows a context
Data Flow Diagram or Level 0 Data Flow Diagram drawn for the system.
It is an overview of the whole system.
In Level 0 DFD, the game and gamers relationship is shown, and the
gamer interacts with application using gamer inputs.
6
Figure 3.2 Data Flow Diagram Level 1
The Level 2 Data Flow Diagram explains the working of the quiz.
It explains the process of generation of the questions and the options,
saving the option selected by the user, checking the users answer with the
correct answer and giving feedback to the user about that particular
question
7
3.1.4 SYSTEM ARCHITECTURE
Model: This component represents the data and business logic of the
memory game. It includes classes and functions that interact with the
database and process the game's rules and logic.
Controller: This component handles the user's input and manages the
communication between the model and view components. It includes
server-side code written in a programming language like PHP, Python, or
Node.js.
8
In addition to the MVC architecture, you may need to consider other
components for a memory game website, such as:
Database: You'll need a database to store the game's data, such as player
information, game progress, and scores.
Server: You'll need a server to host your website, manage user sessions,
and handle requests and responses.
APIs: You may want to integrate your website with third-party APIs,
such as social media or payment gateways, to enhance the user
experience.
Frontend:
• HTML
• CSS
• JavaScript
Backend:
• MySQL
• PHP
• XAMPP
9
3.2.3 INPUT REQUIREMENTS
Game Content: You will need to decide on the type of memory games
that you want to offer on your website. This can include games that test
short-term memory, working memory, visual memory, auditory memory,
and more.
User Registration: To track user progress and scores, you will need to
have a user registration system where users can create accounts and log in
to play games.
Game Levels: You should offer different levels of difficulty for each
game to cater to different skill levels of users.
10
3.2.5 MODEL ARCHITECTURE REQUIREMENTS
Game Scores: The website should output game scores for each user for
the games they play on the website.
Fast Loading Speeds: Your website should load quickly, with minimal
delays and waiting times.
11
level of expertise. Eliminating or flagging actions that may result in errors
are two possible means of achieving error prevention.
Match between system and the real world. Designers should endeavor to
mirror the language and concepts users would find in the real world based
on who their target users are.
12
TEAM MEMBER 1
NAME: DHINAHARI R
CONTRIBUTION:
• Algorithm
• Backend Development
• Testing
TEAM MEMBER 2
NAME: DHIVYA A S
CONTRIBUTION:
• Front-end Development
• Documentation
• Web designing
TEAM MEMBER 3
NAME: MADHUMITHA A
CONTRIBUTION:
• Database
• PowerPoint Presentation
• Project maintenance
13
CHAPTER IV
IMPLEMENTATION
14
MINIMAX ALGORITHM
15
DIVIDE AND CONQUER ALGORITHM
The basic steps of the Divide and Conquer algorithm are as follows:
17
game logic. Your system should be optimized for performance, ensuring
that it runs smoothly on a variety of devices and platforms.
Overall, an enhanced system architecture for a memory game
should prioritize user experience, game logic, and performance
optimization, while also providing support for features like randomization
and multiplayer functionality.
4.3 IMPLEMENTATION
18
Figure 4.4 Website Design diagram
19
The objective of the game is to match pairs of cards with the same
image by flipping them over one by one until all pairs are found.
Step 3: Gameplay
The user starts the game by clicking the "Start Game" button. The
game board is generated with a random layout of cards, with each card
containing a unique image.
20
Figure 4.8 Gameplay 2
21
Step 4: Creating Quiz
22
Figure 4.11 Performance measures
23
Figure 4.13 Memory Performance over time
Average time to complete a game: This metric can provide insight into
how long it takes for users to complete a game. It can help identify if the
game is too easy or too difficult, and whether users are engaged enough
to complete it.
Error rate: This metric measures the number of errors or mistakes made
by users during the game. It can provide insight into the level of difficulty
of the game and how well users are able to remember and match patterns.
User engagement: Metrics such as time spent on the site, number of
page views, and return visits can indicate how engaged users are with the
game.
24
CHAPTER V
5.1 CONCLUSION
There are several future work needs for memory gaming websites.
Memory gaming websites can benefit from incorporating new technologies,
such as virtual reality or augmented reality, to enhance the user experience and
provide a more immersive and interactive environment. There is a need to
25
conduct further research to determine the effectiveness of memory gaming
websites in improving cognitive function and memory skills in different
populations, such as older adults or individuals with cognitive impairments.
Memory gaming websites can benefit from integrating social networking
features to enable users to compete and collaborate with friends and family,
share their progress, and receive feedback and support.
26
APPENDICES
let winningPattern = [
[0, 1, 2],
[0, 3, 6],
[2, 5, 8],
[6, 7, 8],
[3, 4, 5],
[1, 4, 7],
[0, 4, 8],
[2, 4, 6],
];
let count = 0;
27
//enable popup
popupRef.classList.remove("hide");
};
btnRef.forEach((element) => {
element.innerText = "";
element.disabled = false;
});
popupRef.classList.add("hide");
};
disableButtons();
if (letter == "X") {
} else {
};
disableButtons();
newgameBtn.addEventListener("click", () => {
28
count = 0;
enableButtons();
});
restartBtn.addEventListener("click", () => {
count = 0;
enableButtons();
});
btnRef[i[0]].innerText,
btnRef[i[1]].innerText,
btnRef[i[2]].innerText
];
winFunction(element1);
};
btnRef.forEach((element) => {
29
element.addEventListener("click", () => {
if (xTurn) {
xTurn = false;
//Display X
element.innerText = "X";
element.disabled = true;
} else {
xTurn = true;
//Display Y
element.innerText = "O";
element.disabled = true;
count += 1;
if (count == 9) {
drawFunction();
winChecker();
});
});
window.onload = enableButtons;
WORD PUZZLE
const options = {
30
aroma: "Pleasing smell",
labyrinth: "Maze",
};
31
randomHint = "";
let winCount = 0,
lossCount = 0;
stopGame();
};
startBtn.addEventListener("click", () => {
controls.classList.add("hide");
init();
});
controls.classList.remove("hide");
};
letterContainer.classList.remove("hide");
userInpSection.innerText = "";
randomWord = words[generateRandomValue(words)];
randomHint = options[randomWord];
32
hintRef.innerHTML = `<div id="wordHint">
<span>Hint: </span>${randomHint}</div>`;
randomWord.split("").forEach((value) => {
});
userInpSection.innerHTML = displayItem;
};
winCount = 0;
lossCount = 5;
randomWord = "";
word.innerText = "";
randomHint = "";
message.innerText = "";
userInpSection.innerHTML = "";
letterContainer.classList.add("hide");
letterContainer.innerHTML = "";
generateWord();
33
let button = document.createElement("button");
button.classList.add("letters");
button.innerText = String.fromCharCode(i);
button.addEventListener("click", () => {
message.style.color = "#008000";
if (charArray.includes(button.innerText)) {
button.classList.add("correct");
inputSpace[index].innerText = char;
winCount += 1
if (winCount == charArray.length) {
startBtn.innerText = "Restart";
blocker();
});
} else {
34
button.classList.add("incorrect");
lossCount -= 1;
document.getElementById(
"chanceCount"
message.style.color = "#ff0000";
if (lossCount == 0) {
blocker();
button.disabled = true;
});
letterContainer.appendChild(button);
};
window.onload = () => {
init();
};
35
NUMBER GUESSING
var no_of_guesses = 0;
function play(){
else{
guessed_nums.push(user_guess);
no_of_guesses+= 1;
guessed_nums;
36
else if(user_guess > answer){
guessed_nums;
document.getElementById("my_btn").disabled = true;
MATCH MATCH
37
const controls = document.querySelector(".controls-container");
let cards;
let interval;
Const items = [
];
let seconds = 0,
minutes = 0;
38
let movesCount = 0,
winCount = 0;
seconds += 1;
minutes += 1;
seconds = 0;
timeValue.innerHTML =
`<span>Time:</span>${minutesValue}:${secondsValue}`;
};
movesCount += 1;
moves.innerHTML = `<span>Moves:</span>${movesCount}`;
};
39
const randomIndex = Math.floor(Math.random() * tempArray.length);
cardValues.push(tempArray[randomIndex]);
tempArray.splice(randomIndex, 1);
return cardValues;
};
gameContainer.innerHTML = "";
/*
Create Cards
*/
gameContainer.innerHTML += `
<div class="card-before">?</div>
40
<div class="card-after">
</div>
`;
gameContainer.style.gridTemplateColumns = `repeat(${size},auto)`;
cards = document.querySelectorAll(".card-container");
cards.forEach((card) => {
card.addEventListener("click", () => {
if (!card.classList.contains("matched")) {
card.classList.add("flipped");
if (!firstCard) {
firstCard = card;
firstCardValue = card.getAttribute("data-card-value");
} else {
movesCounter();
secondCard = card;
if (firstCardValue == secondCardValue) {
firstCard.classList.add("matched");
secondCard.classList.add("matched");
firstCard = false;
41
winCount += 1;
<h4>Moves: ${movesCount}</h4>`;
stopGame();
} else {
firstCard = false;
secondCard = false;
tempFirst.classList.remove("flipped");
tempSecond.classList.remove("flipped");
}, 900);
});
});
};
startButton.addEventListener("click", () => {
movesCount = 0;
42
seconds = 0;
minutes = 0;
controls.classList.add("hide");
stopButton.classList.remove("hide");
startButton.classList.add("hide");
initializer();
});
StopButton.addEventListener(
"click",
(stopGame = () => {
controls.classList.remove("hide");
stopButton.classList.add("hide");
startButton.classList.remove("hide");
clearInterval(interval);
})
);
result.innerText = "";
winCount = 0;
43
console.log(cardValues);
matrixGenerator(cardValues);
};
let [computer_score,user_score]=[0,0];
let choices_object = {
'rock' : {
'rock' : 'draw',
'scissor' : 'win',
'paper' : 'lose'
},
'scissor' : {
'rock' : 'lose',
'scissor' : 'draw',
'paper' : 'win'
},
'paper' : {
'rock' : 'win',
'scissor' : 'lose',
'paper' : 'draw'
}
44
}
function checker(input){
document.getElementById("comp_choice").innerHTML =
document.getElementById("user_choice").innerHTML =
switch(choices_object[input][computer_choice]){
case 'win':
user_score++;
break;
case 'lose':
computer_score++;
45
break;
default:
result_ref.innerHTML = "DRAW";
break;
document.getElementById("computer_score").innerHTML =
computer_score;
document.getElementById("user_score").innerHTML = user_score;
46
REFERENCES
2. Nouchi, R., Taki, Y., Takeuchi, H., Sekiguchi, A., Hashizume, H.,
Nozawa, T., & Kawashima, R. (2013). Brain training game
improves executive functions and processing speed in the elderly:
A randomized controlled trial. PLoS ONE, 8(3), e59276.
4. Belleville, S., Gilbert, B., Fontaine, F., Gagnon, L., Ménard, É., &
Gauthier, S. (2006). Improvement of episodic memory in persons
with mild cognitive impairment and healthy older adults: Evidence
from a cognitive intervention program. Dementia and Geriatric
Cognitive Disorders, 22(5-6), 486-499.
5. Basak, C., Boot, W. R., Voss, M. W., & Kramer, A. F. (2008). Can
training in a real-time strategy video game attenuate cognitive
decline in older adults? Psychology and Aging, 23(4), 765-777.
6. Heinzel, S., Schulte, S., Onken, J., Duong, Q. L., Riemer, T. G.,
Heinz, A., ... & Kathmann, N. (2018). Working memory training
improvements and gains in non-trained cognitive tasks in young
47
and older adults. Aging, Neuropsychology, and Cognition, 25(6),
816-849.
7. Lee, J. H., Han, K. S., Park, Y. H., & Hong, J. W. (2020). Effect of
virtual reality-based cognitive training on balance, cognition, and
brain activity in older adults with mild cognitive impairment: A
randomized controlled trial. International Journal of Environmental
Research and Public Health, 17(9), 3240.
48
13.Klingberg, T., Fernell, E., Olesen, P. J., Johnson, M., Gustafsson,
P., Dahlström, K., Gillberg, C. G., Forssberg, H., & Westerberg, H.
(2005). Computerized training of working memory in children with
ADHD—A randomized, controlled trial. Journal of the American
Academy of Child & Adolescent Psychiatry, 44(2), 177-186.
15.Soveri, A., Antfolk, J., Karlsson, L., Salo, B., & Laine, M. (2017).
Working memory training revisited: A multi-level meta-analysis of
n-back training studies. Psychonomic Bulletin & Review, 24(4),
1077-1096.
49
19.Richmond, L. L., Morrison, A. B., Chein, J. M., & Olson, I. R.
(2011). Working memory training and transfer in older adults.
Psychology and Aging, 26(4), 813-822.
50
by training working memory. Psychonomic Bulletin & Review,
18(1), 46-60.
29.Au, J., Sheehan, E., Tsai, N., Duncan, G. J., Buschkuehl, M., &
Jaeggi, S. M. (2015). Improving fluid intelligence with training on
a working memory task. Proceedings of the National Academy of
Sciences, 112(19), 14888-14893.
30.Li, S. C., Schmiedek, F., Huxhold, O., Röcke, C., Smith, J., &
Lindenberger, U. (2008). Working memory plasticity in old age:
Practice gain, transfer, and maintenance. Psychology and Aging,
23(4), 731-742.
51