0% found this document useful (0 votes)
2 views

AI UNIT 1

The document provides an overview of Artificial Intelligence (AI) techniques, including search algorithms, knowledge representation, pattern recognition, and machine learning. It outlines the problem-solving process in AI, detailing methods such as search-based and knowledge-based problem solving, as well as various AI models like rule-based systems and neural networks. Additionally, it discusses data acquisition, learning types in AI (supervised, unsupervised, and reinforcement learning), and real-world applications like route optimization and fraud detection.

Uploaded by

mainak1331sen
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

AI UNIT 1

The document provides an overview of Artificial Intelligence (AI) techniques, including search algorithms, knowledge representation, pattern recognition, and machine learning. It outlines the problem-solving process in AI, detailing methods such as search-based and knowledge-based problem solving, as well as various AI models like rule-based systems and neural networks. Additionally, it discusses data acquisition, learning types in AI (supervised, unsupervised, and reinforcement learning), and real-world applications like route optimization and fraud detection.

Uploaded by

mainak1331sen
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Unit 1

Introduction to
AI
KAVIYARAJ R
AI Techniques
Artificial Intelligence (AI) is a broad field of study focused on creating systems that
can simulate human intelligence. AI techniques are the foundational tools and methods
that enable machines to mimic human cognitive abilities like learning, reasoning, and
problem-solving. These techniques include:

Search Algorithms: AI uses search algorithms to explore possible solutions


systematically.
1. Uninformed Search: Does not use additional information about the problem
(e.g., Breadth-First Search and Depth-First Search).
2. Informed Search: Uses heuristics to guide the search more efficiently (e.g., A*
algorithm).
3. Example: Google Maps uses A* to find the shortest route between two
points.

Knowledge Representation and Reasoning: AI represents facts and logic in a


structured way to make decisions.
1. Techniques: Semantic networks, rules-based systems, and ontologies.
2. Example: Virtual assistants like Siri use knowledge graphs to retrieve
context-specific answers.
AI Techniques
Pattern Recognition: Identifying patterns in data is crucial for tasks like image recognition, fraud detection, and natural
language processing.
Example: AI in credit card fraud detection spots patterns of unusual activity.

Optimization: AI selects the best solution among many alternatives using optimization techniques.

Example: Delivery companies (e.g., Amazon) use AI to optimize warehouse inventory and delivery routes.

Machine Learning (ML): A subset of AI that allows machines to learn from data without explicit programming.

Example: Predicting weather conditions using historical climate data.


Problem Solving with AI
AI problem-solving involves defining a problem clearly, analyzing possible
solutions, and using AI tools to implement the best solution. This process is
structured and goal-oriented.

Defining the Problem


1. State the initial condition (current situation).
2. Identify the goal state (desired outcome).
3. Define operators (actions to reach the goal).
4. Consider constraints (rules or limitations).

Example: Diagnosing a disease based on symptoms

(problem definition includes symptoms, possible diagnoses, and medical


guidelines as constraints).
Problem Solving with AI
Analyzing Problem-Solving Techniques

1. Search-Based Problem Solving: Uses algorithms to explore potential solutions.

This technique involves systematically exploring a problem space (all possible states and transitions) to find a path from th e
initial state to the goal state. Algorithms are used to navigate through the states efficiently.

How It Works:

Define the problem space with:


1. Initial State: The starting point of the problem.
2. Goal State: The desired outcome.
3. Operators: Actions that move between states.

Use a search algorithm to explore the states:


1. Uninformed Search: Explores blindly without additional information (e.g., BFS, DFS).
2. Informed Search: Uses heuristics to guide exploration (e.g., A*).
Problem Solving with AI
Examples:

Puzzle Solving (e.g., Sudoku):


• Initial State: A partially filled Sudoku grid.
• Goal State: A fully completed grid adhering to Sudoku rules.
• Operators: Filling cells with valid numbers.

Pathfinding (e.g., Robot Navigation):


• Initial State: Robot’s starting position.
• Goal State: Target location.
• Operators: Movements in the environment (up, down, left, right).

Real-World Applications:

Navigation Systems: Finding the shortest route (e.g., Google Maps).

Game AI: Choosing optimal moves in games like chess


Problem Solving with AI
2. Knowledge-Based Problem Solving: This approach relies on predefined rules, facts, and a knowledge
database to infer solutions. It uses logical reasoning to solve problems without extensive exploration.

How It Works:

Represent knowledge in a structured format:


1. Rules: "If-Then" statements (e.g., If temperature > 100°F, then activate cooling system).
2. Facts: Specific pieces of information (e.g., Patient’s temperature = 102°F).

Use reasoning methods to infer conclusions:


1. Forward Chaining: Start with known facts and apply rules to reach conclusions.
2. Backward Chaining: Start with a goal and work backward to verify supporting facts.
AI Models
AI models are frameworks or systems designed to mimic human intelligence. They
are trained using data and algorithms and categorized based on their structure
and learning methods.

Types of AI Models

1. Rule-Based Systems: These models rely on predefined rules and logic to


perform tasks.

How They Work: A knowledge base of "if-then" rules guides the system. The
system reasons by applying these rules to given inputs to derive conclusions.

Examples:
• Spam filters: "If an email contains specific keywords, mark it as spam."
• Expert systems: Medical diagnosis systems like MYCIN use a knowledge
base of medical rules.
AI Models
2. Machine Learning Models: These models learn patterns and make decisions based on data rather than explicit
rules.

How They Work:


• Models are trained using labeled or unlabeled data.
• They learn to generalize from the training data to make predictions on new, unseen data.

Types of Machine Learning:


• Supervised Learning: Trained on labeled data (input-output pairs).
Example: Predicting house prices based on features like size and location.
• Unsupervised Learning: Discovers patterns in unlabeled data.
Example: Customer segmentation in marketing.
• Reinforcement Learning: Learns by trial and error, receiving rewards for desired actions.
Example: Training a robot to navigate a maze.
AI Models
3. Neural Networks: Neural networks are inspired by the structure of the human brain, with interconnected layers of
nodes (neurons) processing data.
How They Work:
• Data passes through layers of interconnected nodes, each performing computations.
• The output of one layer is the input for the next layer.
• Weights are adjusted during training to minimize errors and improve accuracy.

Types of Neural Networks:


• Feedforward Neural Networks: Data flows in one direction. Used for tasks like classification.
• Convolutional Neural Networks (CNNs): Specialized for image and video analysis.
• Recurrent Neural Networks (RNNs): Handle sequential data like time series or text.

Examples:
• Image recognition in self-driving cars. Speech-to-text systems like Google Assistant.
Data Acquisition and Learning
Aspects in AI
AI systems rely heavily on data for learning. The quality, volume, and
type of data determine the model's success.

Data Acquisition
Data is collected from various sources like:
1. Sensors (IoT devices, cameras)
2. APIs (weather data, stock prices)
3. Manual collection (customer feedback forms)

Data Preparation
1. Cleaning: Removing irrelevant or duplicate data.
2. Transformation: Converting raw data into a usable format.
3. Splitting: Dividing data into training, validation, and test sets.
Learning Types in AI
1. Supervised learning involves training an AI model on a dataset containing labeled data, where the input data
(features) is paired with the correct output (labels). The goal is to learn the mapping between inputs and outputs to
predict outcomes for new, unseen data.

Training Data: Includes both input (e.g., emails) and their corresponding labels (e.g., spam or not spam).

Model Training: The algorithm learns patterns in the data that relate the inputs to the outputs.

Prediction: Once trained, the model predicts the output for new inputs.

Example – Email Spam Detection:


▪ Input: Features like email subject, sender address, word frequency, etc.
▪ Labels: "Spam" or "Not Spam".
▪ Process: The model learns which features (e.g., specific words or patterns) are associated with spam emails.
▪ Outcome: For a new email, the model predicts whether it is spam based on learned patterns.
Learning Types in AI
2. Unsupervised Learning: Unsupervised learning works with data that has no labels. The algorithm identifies
patterns, clusters, or relationships in the data without explicit guidance. It is exploratory and often used for data
organization or feature extraction.

Input Data: Contains features but no associated labels (e.g., customer demographics).

Pattern Detection: The algorithm groups similar data points based on their characteristics.

Output: Clusters or patterns that reveal insights about the data.

Example – Customer Segmentation for Marketing:


▪ Input: Customer data such as age, purchase history, and income level.
▪ Process: The algorithm groups customers into segments based on shared characteristics (e.g., "frequent buyers"
or "price-sensitive shoppers").
▪ Outcome: Businesses can target specific marketing campaigns to each customer group.
Learning Types in AI
3. Reinforcement Learning: RL is a type of machine learning where an agent learns to make decisions by interacting with an
environment. It receives feedback in the form of rewards or penalties based on its actions and aims to maximize cumulative rewards.

Agent and Environment: The agent interacts with the environment by taking actions.

Rewards: Positive rewards for desirable actions and penalties for undesirable ones.

Policy Learning: The agent learns a strategy (policy) to maximize its total rewards over time.

Example – Training a Robot to Navigate a Maze:


▪ Environment: A maze with a starting point and a goal.
▪ Agent: The robot navigating the maze.
▪ Actions: Moving left, right, up, or down.
▪ Rewards: Positive reward for reaching the goal and negative reward for hitting walls.
▪ Outcome: The robot learns the optimal path through trial and error to complete the maze efficiently.
Problem-Solving Process
The AI problem-solving process involves structured steps to
approach and resolve problems efficiently.
Understand the Problem: Define what the system must achieve.
Formulate the Problem: Represent it mathematically or logically.
Devise a Plan: Identify tools, models, or algorithms to use.
Implement the Solution: Program the system to solve the problem.
Evaluate the Solution: Test its accuracy and efficiency.
Example: Route planning for delivery services involves
understanding customer locations, formulating the shortest path
problem, and implementing algorithms like Dijkstra’s.
Formulating Problems and Problem
Types
Formulation: Problems are defined as a combination of states, actions, and goals.
Characteristics include:

Initial State: Starting condition.

Goal State: Desired outcome.

Operators: Actions to transition between states.

Constraints: Rules to follow.

Types of Problems:
▪ Structured Problems: Clear goals and data (e.g., solving a puzzle).
▪ Semi-Structured Problems: Some uncertainty in data (e.g., predicting sales trends).
▪ Unstructured Problems: No clear goal or data (e.g., social media sentiment analysis).
Problem Space and Search
AI systems explore a problem space, which includes all
possible states and transitions.
Uninformed Search: Blind search through the space.
Example: Depth-First Search.
Informed Search: Uses heuristics to reduce search space.
Example: A* algorithm.
Example:
In robotics, a robot explores its environment (problem
space) to find an optimal path to its goal.
Toy Problems
Toy problems are simplified models used to test AI concepts.

Tic-Tac-Toe:
1. AI uses the Minimax algorithm to determine the best move.
2. Problem space includes all possible board states.

Missionaries and Cannibals Problem:


1. State: Number of missionaries, cannibals, and boat position.
2. Goal: Safely transport all to the other side.

Purpose: Simplify problem-solving concepts for easy


understanding.
Real-World Problem: Travelling
Salesman Problem (TSP)
TSP involves finding the shortest route to visit all cities and return to the start. It
models complex real-world problems like logistics and delivery.
Solution Approaches:
1. Brute Force: Check all routes (inefficient for many cities).
2. Heuristics: Use approximate solutions like Nearest Neighbor.
3. Optimization Algorithms: Genetic Algorithms, Simulated Annealing.

Real-World Application:
1. Delivery companies (e.g., UPS) optimize routes using TSP algorithms.

You might also like