BCSE306L – Artificial Intelligence
RA K SARAVANAGURU, VIT
About the course (BCSE306L) and syllabus
Module Contents
1 (6 hrs) INTRODUCTION: Evolution of AI, State of Art -Different Types of Artificial Intelligence- Applications of AI-
Subfields of AI-Intelligent Agents- Structure of Intelligent Agents- Environments
2 (6 hrs) PROBLEM SOLVING BASED ON SEARCHING: Introduction to Problem Solving by searching Methods-State
Space search, Uninformed Search Methods – Uniform Cost Search, Breadth First Search- Depth First Search-Depth-
limited search, Iterative deepening depth-first, Informed Search Methods- Best First Search, A* Search
3 (5 hrs) LOCAL SEARCH AND ADVERSARIAL SEARCH: Local Search algorithms – Hill-climbing search, Simulated
annealing, Genetic Algorithm, Adversarial Search: Game Trees and Minimax Evaluation, Elementary two-players
games: tic-tac-toe, Minimax with Alpha-Beta Pruning
4 (8 hrs) LOGIC AND REASONING: Introduction to Logic and Reasoning -Propositional Logic-First Order Logic-Inference
in First Order Logic- Unification, Forward Chaining, Backward Chaining, Resolution.
5 (5 hrs) UNCERTAIN KNOWLEDGE AND REASONING: Quantifying Uncertainty- Bayes Rule -Bayesian Belief Network-
Approximate Inference in Bayesian networks
6 (7 hrs) PLANNING: Classical planning, Planning as State-space search, Forward search, backward search, Planning
graphs, Hierarchical Planning, Planning and acting in Nondeterministic domains – Sensor-less Planning, Multiagent
planning
7 (6 hrs) COMMUNICATING, PERCEIVING AND ACTING: Communication-Fundamentals of Language -Probabilistic
Language Processing –Information Retrieval- Information Extraction-Perception-Image Formation- Object
Recognition.
RA K SARAVANAGURU, VIT
8 (2 hrs) CONTEMPORARY ISSUES
▪ Text Book(s)
▪ Russell, S. and Norvig, P. 2015. Artificial Intelligence - A
Modern Approach, 3rd Edition, Prentice Hall.
▪ Reference books:
1. K.R. Chowdary, Fundamentals of Artificial Intelligence,
Springer 2020.
2. Alpaydin, E. 2010. Introduction to Machine Learning. 2nd
Edition, MIT Press.
▪ Mode of Evaluation: CAT / Assignment / Quiz / FAT
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 Communication
Fundamentals of Language
Probabilistic Language Processing
7.2 Information Retrieval
7.3 Information Extraction
Perception
Image Formation
Object Recognition
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 N-Grams:
Shannon Game: (Entropy and how language models work?)
Example_1: What is next character is going to b? (e)
Entropy: (the lower entropy, easy to predict the next character)
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 N-Grams:
Shannon Game: (Entropy and how language models work?)
Example_2: This is the last _____ for this ____
How to find the word? N – gram approach (Probabilistic approach)
Predict the next word from the n-1 words…
Formula: Ng(s) = Ws – (n-1)
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 N-Grams:
Formula: Ng(s) = Ws – (n-1)
Example: This is the last class of this semester
1-gram: ~ word count (n=1) ➔ Ng(s) = 8 – (1-1) = 8
This, is , the , last, class, of, this , semester
2-gram : ~ Bi-gram (n = 2) ➔ Ng(s) = 8-(2-1)=7
This is, is the , the last, last class, class of, of this, this semester
3-gram: ~ Tri-gram (n=3) ➔ Ng(s) = 8 – (3-1) = 6
This is the, is the last, the last class, last class of, class of this, of this semester
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 N-Grams:
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 Application of N-Grams:
1. Automatic Speech recognition (https://huggingface.co/blog/wav2vec2-with-ngram)
2. Handwritten and Character recognition (https://arxiv.org/pdf/2012.14459)
3. Spelling correction (https://github.com/rejinjosek/funspell)
4. Machine Translation (https://github.com/ictnlp/GS4NMT)
5. IDP – Intrinsically disordered proteins (https://dl.acm.org/doi/10.1145/3107411.3107480)
…
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 Smoothing in N-grams:
Why ? Need better estimators for rare events / little bit of probability for unseen
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 Smoothing in N-grams:
Laplace smoothing: want to add count of 1 of all our ngrams
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.1 Text Classification
Document Contents Class
1 I LIKE AI COURSE +
2 I HATE AI COURSE -
3 VAST COURSE +
4 POOR EXERCISES -
5 GOOD EXERCISES +
Unique words: 9
<I, LIKE,AI,COURSE,HATE,VAST,POOR,EXERCISES,GOOD>
Convert into feature vector representation…
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents Doc Contents Class
7.1 Text Classification 1 I LIKE AI COURSE +
Convert into feature vector representation… 2 I HATE AI COURSE -
Doc I LIKE AI COURSE HATE VAST POOR EXERCI GOOD CLASS 3 VAST COURSE +
SES
4 POOR EXERCISES -
1 1 1 1 1 +
5 GOOD EXERCISES +
2 1 1 1 1 -
3 1 1 +
4 1 1 -
5 1 1 +
Formula: P(wk | +) = nk+1 / n+Vocabulary P( I | + ) = 1+1 / 8 + 9 = 2/17 = 0.117
P(LIKE | +) = 1+1/8+9 = 2/17 = 0.117
Vocabulary: 9 (total words) P (AI | + ) = 0.117
P (+) = 3/5 = 0.6 P(COURSE | + ) = 2+1/8+9 = 3/17 = 0.176
…
n = number of words + = 8 …
nk = number of times work k occurs in +
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.2 Information Retrieval
“ is a field concerned with the structure,
analysis, organization, storage, searching
and retrieval of information”
“Task of finding documents that are
relevant to the user’s need”
How it works?
Example : Search Engines 1. C: A Corpus of documents.
2. Q: Queries posed in a query language
3. RS: Result Set contains documents
Issue: Relevance, Precision and Recall. relevant to the Query.
(Topical relevance, User relevance, 4. P : Presentation of results as ranked list
of titles, rotating color map,…
…)
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.2 Information Retrieval
Retrieval and Ranking within
Search Engine:
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.2 Information Retrieval
Ranking functions used by search engines in the book: (TF-IDF and BM25)
Other ranking functions: DPR, E5, ACNE, DeepCT, COIL, SPLADE,…
Retrieval and Ranking within Search Engine:
1. Term Frequency (TF) : word count (more is better)
2. Inverse Document Frequency (IDF) : considering TF and DF (how commonly
a word is used; common words are less important)
3. Best Matching 25 (BM25) : is a Bag of Words (BoW) retrieval function, that
ranks set of documents based on the query terms in each document,
regardless of their proximity within the document.
Root of BM25 : Probability ranking principle
“If retrieved documents are ordered by decreasing probability of relevance
on the data available, then the system’s effectiveness is the best that can be
obtained for the data”.
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.2 Information Retrieval
Hyperlink Induced Topic search Algorithm (HITS) “Hubs and Authorities”
Observation: Node 3 is more authoritative, since it is the
only one with incoming edges, and that nodes 1 and 2 are
equally important hubs.
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.3 Information Extraction
“The task of automatically extracting the structured information from
unstructured data is known as Information Extraction”.
Example:
Unstructured text: “Mahatma Gandhi was born in Porbandar”
Structured information:
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.3 General Pipeline for Information Extraction Process:
1. Sentence Segmentation
2. Tokenization
3. POS Tagging
4. Entity detection
5. Relation detection
6. Anaphora resolution
7. Results generation
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
Contents
7.3 General Pipeline for Information Extraction Process:
Example:
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
7.3 Information Extraction Models:
RA K SARAVANAGURU, VIT
MODULE-7 COMMUNICATING PERCEIVING AND ACTING
7.3 Information Extraction Models:
RA K SARAVANAGURU, VIT