CCS348 - Game Theory Lab Manual Record
CCS348 - Game Theory Lab Manual Record
PETER'S
COLLEGE OF ENGINEERING & TECHNOLOGY
(An Autonomous
Institution)
DEPARTMENT OF INFORMATION
TECHNOLOGY
RECORD NOTEBOOK
NAME :
REG.NO :
BRANCH :
YEAR/SEM :
2024-2025
St. PETER'S
COLLEGE OF ENGINEERING & TECHNOLOGY
(An Autonomous
Institution)
Bonafide Certificate
NAME………………………………………………………………………..………………….
YEAR………………………………………..SEMESTER…………..……………………......
BRANCH……………………………………………………...………..………….....................
Certified that this bonafide record work done by the above student of the
during the year 2024 – 2025.
INSTITUTION VISION
To emerge as an Institution of Excellence by providing High Quality Education in Engineering,
Technology and Management to contribute for the economic as well as societal growth of our
Nation.
INSTITUTION MISSION
To impart strong fundamental and Value-Based Academic knowledge in various
Engineering, Technology and Management disciplines to nurture creativity.
To promote innovative Research and Development activities by collaborating with Industries,
R&D organizations and other statutory bodies.
To provide conducive learning environment and training so as to empower the students with
dynamic skill development for employability.
To foster Entrepreneurial spirit amongst the students for making a positive impact on remark
able community development.
DEPARTMENT OF INFORMATION TECHNOLOGY
VISION
To emerge as a center of academic excellence to meet the industrial needs of the competitive
world with IT technocrats and researchers for the social and economic growth of the country in the
area of Information Technology
MISSION
To provide quality education to the students to attain new heights in IT industry and research
To create employable students at national/international level by training them with adequate
skills
To produce good citizens with high personal and professional ethics to serve both the IT
industry and society.
Demonstrate technical competence with analytical and critical thinking to understand and meet the
diversified requirements of industry, academia and research.
Exhibit technical leadership, team skills and entrepreneurship skills to provide business solutionsto
real world problems.
Work in multi-disciplinary industries with social and environmental responsibility, work ethics and
adaptability to address complex engineering and social problems
Pursue lifelong learning, use cutting edge technologies and involve in applied research to design
Optimal solutions.
2. Problem analysis: Identify, formulate, review research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and design
system components or processes that meet the specified needs with appropriate consideration for
the public health and safety, and the cultural, societal, and environmental considerations
4. Conduct investigations of complex problems: Use research-based knowledge and research methods
including design of experiments, analysis and interpretation of data, and synthesis of the information
to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities withan
understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal,
health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering solutions in
societal and environmental contexts, and demonstrate the knowledge of, and need B.TECH.
INFORMATION TECHNOLOGY 2 for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of
theengineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader in diverse
teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the engineering
community and with society at large, such as, being able to comprehend and write effective reports
and design documentation, make effective presentations, and give and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the engineering and
management principles and apply these to one’s own work, as a member and leader in a team, to
manage projects and in multidisciplinary environments
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change
Have proficiency in programming skills to design, develop and apply appropriate techniques, to
solve complex engineering problems.
Have knowledge to build, automate and manage business solutions using cutting edge technologies.
COURSE OUTCOMES:
CO1: Explain existing and emerging deep learning architectures for text and speech processing
CO2: Apply deep learning techniques for NLP tasks, language modelling and machine translation
CO5: Apply deep learning models for building speech recognition and text-to-speech systems
PO’s PSO’s
COs PO PO PO PO- PO- PO- PO- PO- PO- PO- PO- PO- PSO PSO PSO
-1 -2 -3 4 5 6 7 8 9 10 11 12 -1 -2 -3
CO- 1 3 2 3 1 3 - - - 1 2 1 2 1 1 1
CO-2 3 1 2 1 3 - - 2 2 1 3 3 2 1
-
CO-3 2 2 1 3 1 - - 3 3 1 2 3 3 1
-
CO-4 2 1 1 1 2 - - - 2 1 2 2 3 1 1
CO-5 1 3 2 2 1 - - - 3 2 1 1 2 3 1
COURSE OBJECTIVES:
● Understand natural language processing basics
LIST OF EXPERIMENTS:
1. Create Regular expressions in Python for detecting word patterns and tokenizing text
2. Getting started with Python and NLTK - Searching Text, Counting Vocabulary, Frequency
Distribution, Collocations, Bigrams
4. Write a function that finds the 50 most frequently occurring words of a text that are not stop
words.
Aim:
To create regular expressions in python for detecting word patterns and tokenizing
text.
Algorithm:
import re
text = "Python is amazing! It's used in AI, ML, and web development. Running,
swimming, coding - all are fun!"
Result:
Thus the regular expressions in python for detecting word patterns and tokenizing
text had been successfully implemented and the output is also verified.
EX.NO:2
Aim:
To perform searching text, counting vocabulary, frequency distribution,
collocations, biagrams with python and NLTK.
Algorithm:
# 3. Frequency distribution
fdist = FreqDist(text1)
print("\nTop 10 most frequent words:")
print(fdist.most_common(10))
Aim:
To access text corpora using NLTK in python.
Algorithm:
import nltk
nltk.download('punkt')
nltk.download('popular') # Download all popular packages including punkt_tab
import nltk
nltk.download('gutenberg')
Result:
Thus the Text Corpora using NLTK in Python had been successfully
accessed and the output is also verified.
EX.NO:4
Aim:
To write a function that finds the 50 most frequently occurring words of a text are
not stop words.
Algorithm:
import nltk
nltk.download('gutenberg')
nltk.download('stopwords')
# Remove stopwords
stop_words = set(stopwords.words('english'))
filtered_tokens = [word for word in tokens if word not in stop_words]
# Frequency distribution
fdist = FreqDist(filtered_tokens)
Result:
Thus the function that finds the 50 most frequently occurring words of a
text are not stop words using python had been successfully implemented and the
output is also verified.
EX.NO:5
Aim:
To Implement the word2vec model using python.
Algorithm:
12. Use spacy's built-in sentence segmenter to split the text into sentences.
13. Choose target words for similarity
14. Select two words (e.g., "emma" and "harriet") and extract their vector
representations.
16. Use spaCy’s .similarity() method to find the cosine similarity between them.
# Extract sentences
sentences = list(doc.sents)
Result:
Thus the implementation of word2vec model using python had been
successfully implemented and the output is also verified.
EX.NO:6
Aim:
To implement classification by using transformer in python.
Algorithm:
3. Load the pre-trained transformer model for the task you want to perform (e.g.,
5. Define or load the text that needs to be classified. This can be a sentence or
6. Pass the input text to the model via the pipeline. The model will process the input
8. The result will include the predicted label (e.g., POSITIVE or NEGATIVE) and
Result:
Thus the implementation of classification using transformers in python had
been successfully implemented and the output is also verified.
EX.NO:7
Aim:
Algorithm:
corresponding responses. These will guide the chatbot's replies based on user
input.
6. Stop the Conversation: If the user inputs “bye”, exit the chat loop and end the
conversation.
7. Handle Unmatched Inputs: If the user input doesn’t match any predefined pattern,
import nltk
from nltk.chat.util import Chat,
reflections
# Create chatbot
chatbot = Chat(pairs, reflections)
response=chatbot.respond(user_input)
print("Chatbot:", response)
start_chat()
Output:
Result:
Thus the implementation of a chatbot with a simple dialog system using python had
been successfully implemented and the output is also verified.
EX.NO:8
Aim:
To Convert text to speech and find accuracy using python.
Algorithm:
1. A text string that you want to convert into speech (e.g., "Hello, this is a simple
7. Use the gTTS() function to convert the given text into speech.
8. Save Audio
9. Save the speech output to an audio file (e.g., output.mp3) using the .save() method.
10.Play Audio
11.Use IPython.display.Audio() to play the saved audio file in the Colab environment.
Result:
Thus the conversion of text to speech and its accuracy using python had
been successfully implemented and the output is also verified.
EX.NO:9
Aim:
To design a speech recognition system and find the error rate using Python.
Algorithm:
2. Prompt the user to upload a .wav audio file containing the spoken input.
4. Load the uploaded audio file using AudioFile() and extract audio data using
record().
9. Print both the recognized text and the calculated error rate.
recognizer = sr.Recognizer()
file_name = list(uploaded.keys())[0]
Result:
Thus the implementation of a speech recognition system and its error
rate using python had been successfully implemented and the output is also
verified.