A problem in AI is a task or situation where a computer or machine needs to think, decide, or learn in order to solve something intelligently
A problem in AI is defined by: Inputs, a goal, and a way to reach that goal using logic, rules, or learning.
Example:
AI problem components:
Real-life examples:
| Problem Type | Description | Example |
|---|---|---|
| Search problem | Find the best solution from many options . | GPS finding the shortest route |
| Planning problems | Decide steps to reach a goal. | Robot making tea |
| Classification | Group data into categories. | Spam or Not Spam emails |
| Prediction | Guess future results from past data. | Weather forecasting |
| Decision making | Pick the best option from choices. | Chess AI choosing next move |
| Perception | Understand inputs like images, sounds. | Face recognition, self-driving |
| Learning problems | Learn from past experience to improve. | Machine learning model training |
In Artificial Intelligence, before solving a problem, we need to clearly define it — just like we need to understand the rules before playing a game
We define:
Example-1: Taxi Booking App (AI finding the best route)
Example-2: Cooking Assistant AI
Example-3: Washing Clothes with AI Washing Machine
| Informed | Uninformed |
|---|---|
| Search with extra information | Search without an information |
| Uses knowledge to guide steps | No prior knowledge |
| Finds solution quickly | Slower & time-consuming |
| Less complex (Time + Space) | More complex (Time + Space) |
| Uses: DFS and BFS | Uses A*, Heuristic DFS, |
Given a list of cities and the distances between each pair, what is the shortest possible route that:
Example: A salesman needs to visit 5 cities: Surat → Mumbai → Pune → Nashik → Ahmedabad
Goal:
Uninformed Search (Brute Force):
(n − 1)!(5 − 1)! = 24 possible pathsInformed Search (Heuristics):
| Aspect | BFS (Breadth First Search) | DFS (Depth First Search) |
|---|---|---|
| Traversal Order | Explores level by level (siblings before children). | Explores depth first (children before siblings). |
| Data Structure Used | Queue (FIFO). | Stack (LIFO) or recursion. |
| Path Finding | Finds the shortest path if it exists. | Does not guarantee shortest path. |
| Suitability | Best when the solution is closer to the source. | Best when the solution is far from the source. |
| Memory Usage | Requires more memory (stores all nodes at current level). | Requires less memory compared to BFS. |
| Node Visits | Each node is traversed only once. | Each node may be traversed twice due to backtracking. |
| Guarantee of Solution | Always finds a solution if one exists. | May get stuck in infinite loop and fail to find a solution. |
| Concept | FIFO – First In First Out. | LIFO – Last In First Out. |
| Real-life Examples | - Social media friend suggestion- Web crawlers- Google Maps shortest path | - File system traversal- Puzzle solving (Sudoku, 8-puzzle)- Game trees |
| Use Cases | - Shortest path in graphs- Web crawling- Social networks | - Topological sorting- Cycle detection- Maze/puzzle solving |
Hill Climbing is an informed search algorithm (a type of greedy algorithm) used in Artificial Intelligence for optimization problems.
The main goal is to reach the best possible solution by iteratively moving to better neighboring states until no further improvement is possible.
Type: Informed Search (Greedy)
Goal: Reach the peak (best solution) by always moving to a better state
Strategy: Move in the direction where the heuristic/value function improves
Imagine climbing a hill in thick fog where you cannot see the entire landscape. You can only look at the immediate neighbors and decide the next step:
Important: Hill Climbing does not backtrack or remember past paths. It only moves forward toward better states.
Hill Climbing is like climbing a mountain with a flashlight in fog:
Reference: https://www.scaler.com/topics/hill-climbing-in-ai/
Treasure Hunt Analogy
Candy Search at Home
Navigation Apps (Google Maps)
Advantages:
Disadvantages:
Heuristic Search is like searching with a guide: instead of blindly exploring every possibility, you follow hints (heuristics) that lead you towards the goal faster.
Reference: https://www.scaler.com/topics/artificial-intelligence-tutorial/informed-search/#heuristics-function
Made By SOU Student for SOU Students