AI UNIT 1
AI 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:
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.
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:
Real-World Applications:
How It Works:
Types of AI Models
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.
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.
Input Data: Contains features but no associated labels (e.g., customer demographics).
Pattern Detection: The algorithm groups similar data points based on their characteristics.
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.
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.
Real-World Application:
1. Delivery companies (e.g., UPS) optimize routes using TSP algorithms.