Introduction
Artificial Intelligence (AI) is a branch of computer science concerned with developing systems that can perform tasks that normally require human intelligence, such as problem-solving, reasoning, learning, decision-making, perception, and language understanding.
AI uses algorithms, knowledge representation, search techniques, inference methods, and learning approaches to solve complex problems.
Key Components of Artificial Intelligence
The major areas of AI include:
Problem-Solving
Search Strategies
Knowledge Representation
Inference and Reasoning
Planning
Machine Learning
Expert Systems
Natural Language Processing
Computer Vision
Robotics
1. Problem-Solving in AI
Problem-solving in AI involves finding a sequence of actions that transforms an initial state into a goal state.
Components of an AI Problem
Initial State: Starting condition of the problem.
Goal State: Desired final condition.
Operators/Actions: Possible actions that can change the state.
State Space: Collection of all possible states.
Path: Sequence of actions from the initial state to a goal state.
Cost: Numerical value associated with a path or action.
Example
In a route-finding problem:
Initial State: Delhi
Goal State: Patna
Actions: Travel through available cities
Solution: A sequence of cities connecting Delhi to Patna
2. Search Strategies
Search is an important technique used by AI systems to explore possible solutions in a problem's state space.
Major search strategies include:
Depth First Search (DFS)
Breadth First Search (BFS)
Hill Climbing
2.1 Depth First Search (DFS)
Depth First Search explores a branch as deeply as possible before backtracking.
It generally uses a Stack (LIFO – Last In, First Out).
Characteristics
Goes deep into a search tree.
Uses backtracking.
Requires relatively less memory than BFS in many cases.
Does not always find the shortest path.
Can get stuck in an infinite/deep path without suitable controls.
Example
If the search tree is:
A
/ \
B C
/ \
D E
DFS may visit:
A → B → D → E → C
Important Point
DFS uses Stack.
2.2 Breadth First Search (BFS)
Breadth First Search explores all nodes at one level before moving to the next level.
It generally uses a Queue (FIFO – First In, First Out).
Characteristics
Searches level by level.
Uses more memory than DFS in many cases.
Complete when the branching factor is finite.
Finds the shortest path when all step costs are equal.
Example
For the same tree:
A
/ \
B C
/ \
D E
BFS may visit:
A → B → C → D → E
Important Point
BFS uses Queue.
2.3 Hill Climbing
Hill Climbing is a heuristic search technique that continuously moves toward a neighboring state that appears better according to an evaluation function.
It is also called a local search algorithm.
Basic Process
Start with an initial state.
Evaluate neighboring states.
Select a better neighboring state.
Move to that state.
Continue until no better state is available.
Problems in Hill Climbing
Hill climbing may get stuck at:
Local Maximum: Better than nearby states but not the best overall solution.
Plateau: Neighboring states have similar values.
Ridge: The best direction is difficult to reach through simple local moves.
Important Point
Hill climbing uses heuristic information to guide the search.
DFS vs BFS vs Hill Climbing
| Feature | DFS | BFS | Hill Climbing |
|---|---|---|---|
| Basic approach | Depth first | Level first | Local improvement |
| Data structure | Stack | Queue | Evaluation function |
| Uses heuristic | No | No | Yes |
| Memory | Generally lower | Generally higher | Usually low |
| Shortest path | Not guaranteed | Yes, for equal step costs | Not guaranteed |
| Main issue | Can go too deep | High memory usage | Local maximum/plateau |
3. Knowledge Representation
Knowledge Representation (KR) is the process of representing information about the real world in a form that an AI system can understand and use for reasoning.
Common techniques include:
Predicate Logic
Frames
Rules
3.1 Predicate Logic
Predicate Logic represents objects, properties, and relationships using predicates and logical expressions.
It is more expressive than simple propositional logic.
Example
Statement:
All humans are mortal.
It can be represented as:
∀x (Human(x) → Mortal(x))
Another example:
Human(Ram)
From these statements, an AI system can infer:
Mortal(Ram)
Important Elements
Predicate: Represents a property or relationship.
Variable: Symbol representing an object.
Constant: Specific object.
Quantifier: ∀ (for all), ∃ (there exists).
Logical operators: AND, OR, NOT, implication.
3.2 Frames
A Frame is a structured representation used to describe an object, concept, or situation using attributes called slots.
Example
Frame: Student
Name: Rahul
Age: 20
Course: Computer Science
College: ABC College
Characteristics
Represents structured knowledge.
Uses slots and values.
Supports inheritance.
Useful for representing stereotypical situations and objects.
3.3 Rules
Rules represent knowledge using IF–THEN statements.
Example
IF temperature is high
THEN patient may have fever.
Another example:
IF student scores >= 40
THEN student passes.
Rules are commonly used in expert systems.
4. Inference in AI
Inference is the process of deriving new knowledge or conclusions from existing knowledge and facts.
Major inference techniques include:
Forward Chaining
Backward Chaining
Bayesian Networks
4.1 Forward Chaining
Forward Chaining is a data-driven reasoning technique.
It starts with known facts and applies rules to derive new facts until a conclusion is reached.
Example
Facts:
It is raining.
Rule:
IF it is raining
THEN road may be wet.
Conclusion:
Road may be wet.
Important Point
Forward Chaining = Data-driven reasoning
4.2 Backward Chaining
Backward Chaining is a goal-driven reasoning technique.
It starts with a goal or conclusion and works backward to determine whether supporting facts exist.
Example
Goal:
Road is wet.
Rule:
IF it is raining
THEN road is wet.
The system checks whether:
It is raining.
is true.
Important Point
Backward Chaining = Goal-driven reasoning
Forward vs Backward Chaining
| Feature | Forward Chaining | Backward Chaining |
|---|---|---|
| Approach | Data-driven | Goal-driven |
| Starts with | Facts | Goal |
| Direction | Facts → Conclusion | Goal → Facts |
| Common use | Monitoring/diagnosis | Query/goal verification |
4.3 Bayesian Networks
A Bayesian Network is a probabilistic graphical model that represents relationships among variables using a directed acyclic graph (DAG).
It uses conditional probabilities to represent uncertainty.
Example
Rain → Wet Road
Rain → Traffic
The probability of a wet road can depend on whether it is raining.
Components
Nodes → Variables
Directed edges → Dependencies
Conditional Probability Tables (CPTs) → Probabilistic relationships
Applications
Medical diagnosis
Risk analysis
Prediction
Fault diagnosis
Decision support
5. Planning in AI
Planning is the process of determining a sequence of actions required to achieve a particular goal.
Components
Initial state
Goal state
Actions
Preconditions
Effects
Example
Goal:
Prepare a cup of tea
Possible plan:
Boil water
↓
Add tea
↓
Add milk
↓
Add sugar
↓
Serve tea
AI planning is used in:
Robotics
Automated scheduling
Logistics
Game AI
Autonomous systems
6. Machine Learning
Machine Learning (ML) is a branch of AI in which computers learn patterns from data and improve their performance without being explicitly programmed for every task.
Major Types of Machine Learning
1. Supervised Learning
The model learns from labeled data.
Examples:
Classification
Regression
Applications:
Spam detection
Image classification
Price prediction
2. Unsupervised Learning
The model learns from unlabeled data.
Examples:
Clustering
Association
Applications:
Customer segmentation
Pattern discovery
3. Reinforcement Learning
An agent learns by interacting with an environment using rewards and penalties.
Applications:
Robotics
Games
Autonomous systems
7. Expert Systems
An Expert System is an AI system designed to solve problems in a specific domain using knowledge and reasoning similar to a human expert.
Main Components
Knowledge Base
Inference Engine
User Interface
Explanation Facility
Knowledge Acquisition
Structure
User
↓
User Interface
↓
Inference Engine
↙ ↘
Knowledge Rules
Base
↓
Result
Knowledge Base
Contains facts and rules related to a particular domain.
Inference Engine
Applies rules to available knowledge to derive conclusions.
Applications
Medical diagnosis
Financial analysis
Fault detection
Customer support
Technical troubleshooting
8. AI Applications
Artificial Intelligence is used in many areas:
Healthcare
Education
Banking
Robotics
Transportation
E-commerce
Cybersecurity
Natural Language Processing
Computer Vision
Recommendation systems
Expert systems
Autonomous vehicles
Games
9. Advantages of Artificial Intelligence
Automates repetitive tasks.
Can process large amounts of data.
Supports decision-making.
Provides fast responses.
Can operate continuously.
Helps identify patterns in complex data.
Supports intelligent automation.
10. Limitations of Artificial Intelligence
Requires large amounts of data for many applications.
Development and maintenance can be expensive.
AI systems can make incorrect predictions or decisions.
Some systems are difficult to interpret.
Search algorithms can suffer from large state spaces.
AI systems may require significant computing resources.
11. Important AI Terms for Bihar STET & BPSC
| Term | Meaning |
|---|---|
| AI | Artificial Intelligence |
| State Space | Set of possible states |
| DFS | Depth First Search |
| BFS | Breadth First Search |
| Heuristic | Rule/estimate used to guide search |
| Hill Climbing | Local heuristic search |
| Predicate Logic | Logic for representing objects and relationships |
| Frame | Structured knowledge representation |
| Rule | IF–THEN representation of knowledge |
| Inference | Deriving conclusions from knowledge |
| Forward Chaining | Data-driven reasoning |
| Backward Chaining | Goal-driven reasoning |
| Bayesian Network | Probabilistic graphical model |
| Planning | Finding actions to achieve a goal |
| ML | Machine Learning |
| Expert System | Knowledge-based AI system |
| Knowledge Base | Collection of domain knowledge |
| Inference Engine | Performs reasoning using knowledge and rules |
12. Quick Revision
Artificial Intelligence
↓
Problem Solving
↓
Search Strategies
├── DFS → Stack
├── BFS → Queue
└── Hill Climbing → Heuristic / Local Search
↓
Knowledge Representation
├── Predicate Logic
├── Frames
└── Rules
↓
Inference
├── Forward Chaining → Data-driven
├── Backward Chaining → Goal-driven
└── Bayesian Networks → Probability
↓
Planning
↓
Machine Learning
├── Supervised
├── Unsupervised
└── Reinforcement
↓
Expert Systems
Short Summary
Artificial Intelligence enables computers to perform intelligent tasks such as problem-solving, reasoning, learning, planning, and decision-making. Search strategies such as DFS, BFS, and Hill Climbing help AI systems explore possible solutions. Predicate logic, frames, and rules are used for knowledge representation, while forward chaining, backward chaining, and Bayesian networks support inference. Planning, machine learning, and expert systems are important applications and components of modern AI.