Artificial Intelligence — Complete Course Notes (BCA 7th Sem)
Comprehensive master lecture notes covering state space search, A* heuristic algorithms, Minimax, First Order Logic, Neural Networks, and NLP.
Artificial Intelligence · CACS401 · Semester 7
Course Code: CACS401 | Tribhuvan University BCA 7th Semester Curriculum
1. What is Artificial Intelligence?
Artificial Intelligence is the branch of computer science focused on building intelligent systems capable of performing tasks that typically require human intelligence, such as visual perception, natural language understanding, reasoning, and game playing.
Four Approaches to AI:
- Thinking Humanly: The cognitive modeling approach (replicating human mind processes).
- Acting Humanly: The Turing Test approach (indistinguishable human imitation).
- Thinking Rationally: The "laws of thought" approach (Aristotelian syllogistic logic).
- Acting Rationally: The rational agent approach (maximizing expected utility in an environment).
2. Heuristic Search: The A* Search Algorithm
A* is an informed search algorithm that evaluates nodes by combining g(n), the cost to reach node n, and h(n), the estimated cost to get from node n to the goal:
Properties of A*:
- Completeness: A* is complete on finite graphs with positive step costs.
- Admissibility Condition: A heuristic h(n) is admissible if it never overestimates the actual cost to reach the goal, i.e., h(n) ≤ h*(n) for all n.
- Optimality: If h(n) is admissible (for tree search) or consistent/monotonic (for graph search), A* is guaranteed to return an optimal solution path!
3. Game Playing: Minimax and Alpha-Beta Pruning
In a two-player zero-sum game (e.g., Chess, Tic-Tac-Toe), MAX aims for the highest score while MIN aims to minimize MAX's score.
Alpha-Beta Pruning Parameters:
- α (Alpha): The best (highest) value that MAX can guarantee at or above the current level.
- β (Beta): The best (lowest) value that MIN can guarantee at or above the current level.
- Pruning Condition: Prune remaining children of the node whenever α ≥ β. Alpha-Beta pruning achieves an optimal branching factor reduction from O(bm) to O(bm/2).
Data Structures and Algorithms Complete Course (freeCodeCamp)
Open lesson pageLesson videos
- Which of the following is an invalid variable name in C? (a) _salary (b) 1st_rank (c) total_sum (d) age2objective · 1 marks
- What is the return type of the `malloc()` function in C? (a) `int*` (b) `char*` (c) `void*` (d) `float*`objective · 1 marks
- Explain the difference between call by value and call by reference in C with suitable code snippets.short · 5 marks
- What is recursion? Write a recursive function in C to calculate the factorial of a positive integer.short · 5 marks
- Explain dynamic memory allocation in C. Differentiate between `malloc()` and `calloc()`. Write a C program to dynamically allocate memory for N integers, sort them in ascending order, and free the memory.long · 10 marks
- What is the worst-case time complexity of Quick Sort algorithm? (a) O(n) (b) O(n log n) (c) O(n^2) (d) O(log n)objective · 1 marks
Artificial Intelligence
Overview
Artificial Intelligence (CACS401) is a core credit course structured under the official university academic syllabus for Bachelor of Computer Application.
Objectives
- Equip students with deep theoretical foundations in Artificial Intelligence.
- Develop practical problem-solving, laboratory, and implementation skills.
- Prepare graduates for industry careers, research, and national university examinations.
Unit structure
- Unit 1: Introduction to Artificial Intelligence6 hrs
By the end of Unit 1, students will be able to explain, implement, and solve problems related to Introduction to Artificial Intelligence.
Unit 1:Comprehensive study notes, key principles, and examples for Introduction to Artificial Intelligence. - Unit 2: Intelligent Agents and Environments6 hrs
By the end of Unit 2, students will be able to explain, implement, and solve problems related to Intelligent Agents and Environments.
Unit 2:Comprehensive study notes, key principles, and examples for Intelligent Agents and Environments. - Unit 3: Problem Solving and State Space Search9 hrs
By the end of Unit 3, students will be able to explain, implement, and solve problems related to Problem Solving and State Space Search.
Unit 3:Comprehensive study notes, key principles, and examples for Problem Solving and State Space Search. - Unit 4: Adversarial Search and Game Playing6 hrs
By the end of Unit 4, students will be able to explain, implement, and solve problems related to Adversarial Search and Game Playing.
Unit 4:Comprehensive study notes, key principles, and examples for Adversarial Search and Game Playing. - Unit 5: Knowledge Representation and Logic8 hrs
By the end of Unit 5, students will be able to explain, implement, and solve problems related to Knowledge Representation and Logic.
Unit 5:Comprehensive study notes, key principles, and examples for Knowledge Representation and Logic. - Unit 6: Machine Learning and Artificial Neural Networks8 hrs
By the end of Unit 6, students will be able to explain, implement, and solve problems related to Machine Learning and Artificial Neural Networks.
Unit 6:Comprehensive study notes, key principles, and examples for Machine Learning and Artificial Neural Networks. - Unit 7: Expert Systems, NLP, and Computer Vision7 hrs
By the end of Unit 7, students will be able to explain, implement, and solve problems related to Expert Systems, NLP, and Computer Vision.
Unit 7:Comprehensive study notes, key principles, and examples for Expert Systems, NLP, and Computer Vision.
Learning outcomes
- Demonstrate rigorous technical knowledge and conceptual mastery of Artificial Intelligence.
- Design, implement, and analyze efficient algorithms and practical frameworks.
- Solve representative theoretical proofs and complex applied problems independently.
Teaching & evaluation
Classroom lectures (3 hours/week), practical laboratory assignments (3 hours/week), and project work.
Internal Assessment (40 Marks: Theory Exam, Practical Exam, Attendance, Assignments) and Final University Board Examination (60 Marks).
Reference books
- Artificial Intelligence: A Modern Approach by Stuart Russell & Peter Norvig (4th Edition, Pearson)
- Artificial Intelligence by Elaine Rich, Kevin Knight & Shivashankar B. Nair (McGraw Hill)
Related notes
- Data Structures and Algorithms — Complete Course Notes (BCA 3rd Sem)Notes
- C Programming — Complete Course Notes (BCA 1st Sem)Notes
- Unit 1: Introduction to Programming Concepts and C Language NotesNotes
- Unit 2: Operators and Expressions NotesNotes
- Unit 3: Input and Output Operations NotesNotes
- Unit 4: Control Statements and Decision Making NotesNotes
Related video lessons
Practice questions
- Which of the following is an invalid variable name in C? (a) _salary (b) 1st_rank (c) total_sum (d) age2objective · 1 marks
- What is the return type of the `malloc()` function in C? (a) `int*` (b) `char*` (c) `void*` (d) `float*`objective · 1 marks
- Explain the difference between call by value and call by reference in C with suitable code snippets.short · 5 marks
- What is recursion? Write a recursive function in C to calculate the factorial of a positive integer.short · 5 marks
- Explain dynamic memory allocation in C. Differentiate between `malloc()` and `calloc()`. Write a C program to dynamically allocate memory for N integers, sort them in ascending order, and free the memory.long · 10 marks
- What is the worst-case time complexity of Quick Sort algorithm? (a) O(n) (b) O(n log n) (c) O(n^2) (d) O(log n)objective · 1 marks