Section II (Short Answer)
Q.2- Write short answers of the following.
i. Differentiate between strong AI and weak AI.
- Strong AI (General AI): Refers to hypothetical machines that possess human-level intelligence, consciousness, and the ability to understand, learn, and apply knowledge across any domain, just like a human.
- Weak AI (Narrow AI): Refers to AI systems built and trained for one specific, limited task. They do not possess true understanding or consciousness. (Example: Voice assistants like Siri or self-driving car algorithms).
ii. Define heuristic search.
Heuristic search is an "informed" problem-solving technique that uses domain-specific knowledge (a heuristic) to guide the search process. Instead of checking every possibility blindly, it uses an estimation function to "guess" which path will lead to the goal fastest, significantly improving efficiency.
- Example: Using straight-line distance to estimate the shortest driving route between two cities.
iii. What is a production system in AI?
A production system is a type of cognitive architecture or rule-based AI system used to implement expert knowledge. It consists of three main parts:
- A set of rules: Formatted as "IF (condition) THEN (action)".
- Working Memory: Contains the current state of facts.
- Rule Interpreter (Inference Engine): Matches the facts in working memory against the rules to decide which rule to execute (fire).
iv. Define fuzzy logic and give an example.
Fuzzy logic is an approach to computing based on "degrees of truth" rather than the usual strict Boolean "True or False" (1 or 0). It handles partial truths and uncertainty, outputting continuous values between 0 and 1.
- Example: A smart air conditioner using fuzzy logic doesn't just turn "ON" or "OFF." It assesses if the room is "slightly warm" or "very hot" and adjusts the compressor speed accordingly.
v. What is semantic network?
A semantic network is a graphical representation of knowledge used in AI. It represents concepts, objects, or events as nodes (circles) and the relationships between them as directed edges (arrows).
- Example: A node "Bird" might have an arrow pointing to "Wings" labeled with the relationship "has-a".
vi. Define knowledge representation in AI.
Knowledge representation is the field of AI focused on how information about the real world can be structured and stored in a computer system. The goal is to represent knowledge in a way that an AI system (like an expert system) can easily access, understand, and use to reason and solve complex problems.
vii. Define K-means clustering in machine learning.
K-means is an unsupervised machine learning algorithm used to group unlabelled data into a specific number (K) of distinct clusters. It works by assigning each data point to the cluster with the nearest mean (centroid), continuously updating the centroids until the clusters become stable. It is widely used for customer segmentation and pattern recognition.
viii. Define Markov Chain in Artificial intelligence.
A Markov Chain is a mathematical system that undergoes transitions from one state to another based on probabilistic rules. Its defining characteristic is the Markov Property (Memorylessness), which states that the probability of moving to the next state depends only on the current state, and not on the sequence of events that preceded it.
ix. Define the role natural language processing (NLP) in Artificial Intelligence.
The role of Natural Language Processing (NLP) is to give machines the ability to read, understand, interpret, and generate human language. It acts as the bridge between human communication and computer understanding, enabling applications like language translation, sentiment analysis, and intelligent chatbots.
x. Differentiate supervised and unsupervised learning.
- Supervised Learning: The model is trained on labeled data, meaning the input data is paired with the correct output. The algorithm learns to map inputs to outputs (e.g., predicting house prices based on historical data).
- Unsupervised Learning: The model is given unlabeled data and must find hidden patterns or underlying structures on its own without predefined correct answers (e.g., grouping news articles by topic).
xi. Define A* search algorithm.
A* (A-Star) is a highly efficient informed search algorithm used for pathfinding. It calculates the optimal route by combining two metrics: the actual exact cost from the starting node to the current node, denoted as g(n), and the estimated heuristic cost from the current node to the goal, denoted as h(n). The algorithm always expands the node with the lowest total cost: f(n)=g(n)+h(n).
Section III (Essay Type)
Q. #3 Explain the different types of uninformed search strategies. Discuss the working mechanism, advantages, and limitations of each strategy. Also, compare their performance...
Uninformed search (blind search) strategies operate without any specific knowledge about the problem space other than the initial state, goal state, and available actions.
1. Breadth-First Search (BFS)
- Mechanism: Expands all nodes at the current depth level before moving deeper. It uses a Queue (FIFO) data structure.
- Advantages: It is complete (always finds a solution if one exists) and optimal (always finds the shallowest/shortest path).
- Limitations: Highly memory-intensive because it must keep all nodes of the current level in memory.
2. Depth-First Search (DFS)
- Mechanism: Explores as far as possible along a single branch before backtracking. It uses a Stack (LIFO) data structure.
- Advantages: Very memory efficient, as it only needs to store the single path currently being explored.
- Limitations: It is not optimal (may find a long path when a short one exists) and not complete (can get trapped in infinite loops in deep trees).
3. Uniform Cost Search (UCS)
- Mechanism: Similar to BFS, but instead of expanding the shallowest node, it expands the node with the lowest path cost g(n).
- Advantages: Complete and optimal, particularly useful when steps have different associated costs (e.g., distance between cities).
- Limitations: Can be slow and memory-intensive if many paths have similar costs.
Performance Comparison Table
(Where b = branching factor, d = depth of optimal solution, m = maximum depth of the search tree)
| Strategy |
Time Complexity |
Space Complexity |
Complete? |
Optimal? |
| BFS |
O(bd) |
O(bd) |
Yes |
Yes (if costs are equal) |
| DFS |
O(bm) |
O(b×m) |
No |
No |
| UCS |
O(b1+⌊C∗/ϵ⌋) |
O(b1+⌊C∗/ϵ⌋) |
Yes |
Yes |
Q. #4 Describe in detail the structure and types of intelligent agents. Explain how agents interact with environments and the significance of sensors, actuators, and agent functions...
Structure of Intelligent Agents
An intelligent agent is anything that perceives its environment and takes actions to achieve a goal. Mathematically, it is structured as:
Agent=Architecture+AgentProgram
- Architecture: The physical or virtual computing device (hardware, sensors, actuators).
- Agent Program: The software/algorithm that maps percepts (inputs) to actions.
Interaction with the Environment
Agents interact through a continuous cycle:
- Sensors: These are the input mechanisms. They perceive the current state of the environment (e.g., a self-driving car's cameras and radar).
- Agent Function (Decision Making): The internal logic processes the sensory input, consults its programming/knowledge, and decides on the best action.
- Actuators (Effectors): These are the output mechanisms. They execute the chosen action, which physically alters the environment (e.g., the car's steering wheel or brakes).
Types of Intelligent Agents
- Simple Reflex Agents: Act only on the current perception, ignoring history. They use simple "Condition-Action" rules.
- Model-Based Reflex Agents: Maintain an internal state (a model) of the world to keep track of parts of the environment they cannot currently see.
- Goal-Based Agents: Expand on model-based agents by having a specific "goal." They consider future scenarios to choose actions that lead to the goal.
- Utility-Based Agents: Don't just want to reach a goal; they want to reach it efficiently. They use a utility function to measure how "happy" or successful a state is (e.g., choosing the fastest route, not just any route).
- Learning Agents: Can improve their performance over time by learning from their experiences and past mistakes.
Q. #5 Explain the structure of a basic Artificial Neural Network (ANN) including different layers. Describe the role and working of the backpropagation algorithm...
Structure of a Basic ANN
An Artificial Neural Network is modeled after the human brain, consisting of interconnected nodes (neurons) organized into layers.
- Input Layer: Receives raw data from the outside world. No computation occurs here; it just passes data forward.
- Hidden Layer(s): One or more layers sitting between input and output. This is where the actual computation and feature extraction happen. Neurons here apply weights, biases, and an activation function to the data.
- Output Layer: The final layer that produces the network's prediction or classification result.
Role and Working of Backpropagation
Backpropagation (Backward Propagation of Errors) is the fundamental learning algorithm for ANNs. Its role is to train the network by adjusting the weights to minimize the difference between the network's prediction and the actual truth.
How it works (The Cycle):
- Forward Pass: Input data is fed through the network. The network makes a prediction.
- Loss Calculation: The algorithm calculates the "Loss" or "Error" (the gap between the prediction and the actual correct target).
- Backward Pass (Backpropagation): The algorithm calculates the gradient of the error function using calculus (chain rule). It sends this error signal backward through the network, from the output layer down to the input layer.
- Weight Update: As the error flows backward, the algorithm adjusts the weights and biases of every neuron slightly (using an optimization technique like Gradient Descent) so that the next time the same input is provided, the error will be smaller.
Q. #6 Explain the architecture and functionality of expert systems in detail, and provide a real-world example...
Architecture of Expert Systems
An Expert System is an AI application that emulates the decision-making ability of a human expert in a highly specific domain. Its architecture consists of three primary components:
- Knowledge Base: The core of the system. It contains all the domain-specific facts, rules, and problem-solving strategies inputted by human experts.
- Inference Engine: The "brain" of the system. It processes the user's query by searching through the Knowledge Base, applying logical rules (often using Forward Chaining or Backward Chaining) to deduce new information and arrive at a conclusion.
- User Interface: The mechanism through which the non-expert user interacts with the system, inputting queries and receiving answers and explanations.
Functionality
Expert systems do not "learn" on their own like machine learning models. Instead, they function by rigorously applying pre-programmed logic. They are designed to provide high-level, reliable, and understandable advice. If a user asks why a decision was made, the expert system can trace its steps back through the rules to explain its reasoning.
Real-World Example: Medical Diagnosis (MYCIN)
A classic example is an expert system used in healthcare for diagnosing bacterial infections (like MYCIN).
- Practice: A doctor inputs a patient's symptoms (fever, chills, blood test results) into the User Interface.
- The Inference Engine takes these symptoms and checks them against thousands of "IF-THEN" rules in the Knowledge Base (e.g., IF symptom is high fever AND blood test shows high white blood cells, THEN possible infection is X).
- The system outputs a diagnosis and recommends a specific antibiotic dosage, acting as a consultative expert for the physician.