AI & PYTHON IMPORTANT NOTES
[Link] of AI and any 5 application of AI
Definition: - It is branch of Computer Science by which we can create
intelligent machine which can behave like a human, think like humans
and able to make decisions.
Applications of AI: -
• Virtual Assistants: AI powers virtual helpers like Siri or Alexa. They can
answer questions, set reminders, and control smart devices.
• Customer Service: Chatbots are AI that can talk to customers, answer
common questions, and help solve problems.
• Healthcare: AI can help doctors by analyzing medical images,
predicting diseases, or even suggesting treatments.
• Self-Driving Cars: AI helps cars drive themselves by understanding the
road, traffic, and making decisions.
• Recommendations: When we watch movies on Netflix or shop online,
AI suggests things that might like based on our past choices.
• Language Translation: AI can translate text or speech from one
language to another quickly.
2. Prove how intelligent machine act like human. (acting
humanly vala)
Intelligent machines act like humans by using Artificial Intelligence (AI)
to imitate human thinking, behavior, and decision-making.
1. Artificial Intelligence Definition
AI is a branch of Computer Science that creates machines capable
of thinking, behaving, and making decisions like humans.
2. Acting Humanly (Turing Test)
The Turing Test checks whether a machine can behave like a
human. If a human cannot distinguish between machine and
human responses, the machine is considered human-like.
3. Thinking Humanly (Cognitive Modeling)
AI systems are designed by studying human thinking processes
such as learning, memory, and problem-solving, allowing
machines to think like humans.
4. Acting Rationally (Rational Agent)
Intelligent machines act as rational agents by sensing their
environment and choosing the best action to achieve goals, similar
to human decision-making.
5. Real-Life Applications
Virtual assistants, chatbots, robots, self-driving cars, and game-
playing AI show human-like actions, communication, and
reasoning.
3. Acting Rationally
Definition: Acting rationally means designing AI systems that choose
the best possible action to achieve a given goal. Such a system is known
as a rational agent.
A rational agent is an entity that perceives its environment using
sensors.
It acts on the environment using actuators or effectors.
The agent selects actions that maximize performance or success.
Decisions are made based on available information, rules, and past
experience.
Example: A self-driving car selecting the safest and shortest route.
Acting rationally focuses on performing the right actions to
achieve goals in the most efficient way.
4. Foundations of AI
Artificial Intelligence (AI) is an interdisciplinary field that combines
knowledge from different subjects.
Computer Science provides algorithms, programming, and
computing power to build AI systems.
Mathematics supports AI with logic, probability, statistics, and
optimization techniques.
Psychology helps in understanding human behavior, learning, and
decision-making.
Neuroscience and Biology inspire AI models based on the human
brain and nervous system.
Philosophy and Sociology contribute ideas about reasoning, ethics,
intelligence, and social interaction.
5. State of the Art in Artificial Intelligence: What AI Can
Do Today
1. Speech Recognition: AI can understand and process human
speech, allowing machines to respond or perform tasks based on
voice commands.
2. Autonomous Planning and Scheduling: NASA’s Remote Agent
program became the first AI to plan and schedule spacecraft
operations automatically, millions of miles from Earth.
3. Game Playing: AI can play games better than humans. For
example, Deep Blue defeated chess champion Garry Kasparov in
1997, and Proverb solves crossword puzzles very efficiently.
4. Spam Fighting: AI helps delete spam messages, saving time and
improving efficiency for humans.
5. Logistics Planning: Tools like DART (Dynamic Analysis and
Replanning Tool) help automate planning and scheduling for
transportation and delivery systems.
6. Define: rational, irrational, human, robotic
• Rational Agent: A rational agent is one that always tries to do the
right thing. “Doing the right thing” means choosing the action that will
maximize its success, based on what it can perceive and the actions it
can take.
• Performance Measure: This is a standard to judge how well an agent
is doing
• Example: For a vacuum-cleaner agent, the performance measure
could include: Amount of dirt cleaned, Time taken, Electricity used,
Noise produced.
• Irrational Agent: An irrational agent does not act optimally and may
perform unnecessary actions.
• Example: After cleaning all the dirt, an agent might keep moving back
and forth between squares. If the performance measure penalizes
unnecessary moves, this agent will perform poorly.
• A better agent would stop moving once all squares are clean.
• If clean squares can get dirty again, the agent should occasionally
check and re-clean.
• If the environment is unknown, the agent must explore new areas
instead of sticking to only known squares.
• Human Agent: Humans are natural agents. They use sensors like eyes,
ears, nose, tongue, and skin to sense the environment. They use
effectors like hands, legs, and mouth to act.
• Example: Picking up a cup of water using your hand after seeing it.
• Robotic Agent: Robots are artificial agents. They use cameras,
infrared sensors, or other devices as sensors, and motors or actuators
to act.
•Example: A robot vacuum cleaner detects obstacles with sensors and
moves around them using motors.
7. Nature of environment (PEAS)
Specifying the Task Environment
• Before designing an agent, the first step is to clearly define the task
environment.
• A task environment specification includes:
1. Performance measure – How the agent’s success will be judged.
2. Environment – The external world where the agent operates.
3. Actuators – The tools or parts the agent uses to act.
4. Sensors – The tools the agent uses to perceive the environment.
Task environments can be described using:
• PAGE: Percept, Action, Goal, Environment
• PEAS: Performance, Environment, Actuators, Sensors (Both mean the
same.)
Example 1 – Automated Taxi Driver (using PEAS):
• Performance: Safe and fast rides, passenger satisfaction
• Environment: Roads, traffic, pedestrians, weather conditions
• Actuators: Steering wheel, brakes, accelerator, horn
• Sensors: Cameras, GPS, speedometer, radar
8. The structure of intelligent agents
• Agent’s structure can be viewed as –
• Agent = Architecture + Agent Program
• Architecture = the machinery that an agent executes on.
• Agent Program = an implementation of an agent function.
Model reflex agent
• Simple reflex agents cannot work well in partially observable
environments because they don’t remember
past states.
• Model-based agents use both the current
input and previous input to decide actions.
• They keep track of how the world changes
over time – this knowledge is called the model of the world.
• Based on the model and condition-action rules, the agent decides
what action to take.
• This helps the agent handle partially observable environments
effectively.
Goal-based agents: -
• Goal-based agents are built on model-based agents and also use goal
information to decide actions.
• Goal information tells the agent what
situation or state it wants to achieve.
• The agent can differentiate between goal
states and nongoal states.
• Performance can be 100% if the goal is reached or 0% if the goal is
not reached, because it only focuses on achieving the goal.
• Example: A vacuum-cleaning robot whose goal is to keep the house
clean will keep searching and cleaning dirt continuously.
Learning agents: -
• A learning agent improves its knowledge and skills while working in
an initially unknown environment.
• Critic: Tells the agent how well it is
performing according to a standard.
• Learning element: Uses feedback from the
critic to improve the agent’s future actions.
• Performance element: Chooses actions
based on what the agent perceives, like a normal agent.
• Problem generator: Suggests new actions to help the agent gain
useful experience.
9. Explain what an agent is in Artificial Intelligence.
Describe the three types of agents—Human agent,
Robotic agent, and Software agent—with examples.
An agent is anything that can perceive its environment using sensors
and act on it using actuators or effectors.
a) Human Agent: Humans are natural agents. They use sensors like
eyes, ears, nose, tongue, and skin to sense the environment. They use
effectors like hands, legs, and mouth to act.
Example: Picking up a cup of water using your hand after seeing it.
b) Robotic Agent: Robots are artificial agents. They use cameras,
infrared sensors, or other devices as sensors, and motors or actuators
to act.
Example: A robot vacuum cleaner detects obstacles with sensors and
moves around them using motors.
c) Software Agent: A software agent is a program that works
automatically for a user or another program. It can learn from
experience and work continuously in its environment.
Example: Email spam filters automatically detect and delete spam
messages over time.
10. Common AI tools
AI tools are software applications that use Artificial Intelligence to
perform tasks that normally need human intelligence, such as writing,
thinking, analyzing, and decision-making.
Common AI Tools:
1. ChatGPT – Generates text, answers questions, helps in content
writing and coding.
2. Google Gemini – Used for smart search, reasoning, and
understanding text and images.
3. Microsoft Copilot – Assists users in Word, Excel, PowerPoint, and
coding tasks.
4. DALL·E / Midjourney – Creates images from text descriptions.
5. Grammarly – Checks grammar, spelling, and improves writing quality.
6. GitHub Copilot – Suggests code automatically for programmers.
Key Benefits of AI Tools:
• Saves time
• Improves productivity
• Reduces human effort
• Improves accuracy
Example: A student uses ChatGPT to understand a topic quickly and
Grammarly to correct grammar in assignments, saving time and
improving quality.
11. Overview of AI technology
AI technologies are the methods and systems that allow machines to
think, learn, and perform tasks like humans.
Major AI Technologies:
1. Machine Learning (ML): In Machine Learning, systems learn from
data without being explicitly programmed.
Example: Email spam detection system that learns which emails are
spam.
2. Deep Learning (DL): Deep Learning uses neural networks with many
layers to process complex data.
Example: Face recognition used in mobile phone unlocking.
3. Natural Language Processing (NLP): NLP helps machines understand
and respond to human language.
Example: ChatGPT and customer support chatbots.
4. Computer Vision: Computer Vision enables machines to see, identify,
and analyze images and videos.
Example: CCTV cameras used for face detection.
5. Generative AI: Generative AI creates new content such as text,
images, audio, and code.
Example: ChatGPT generating essays or answers.
Conclusion: These AI technologies work together to make smart
systems used in education, business, and daily life.
12. Use of AI tools and technologies in business
Business Applications of AI:
1. Marketing AI is used to analyze customer behavior and show
personalized advertisements.
Example: Online shopping sites recommending products based on user
interest.
2. Customer Support AI chatbots provide 24/7 customer support
without human help.
Example: Chatbots answering customer queries on banking websites.
3. Human Resources (HR) AI helps in resume screening and analyzing
employee performance.
Example: Shortlisting resumes automatically based on job
requirements.
4. Finance AI is used for fraud detection and risk assessment.
Example: Banks detecting suspicious transactions instantly.
5. Operations AI improves business operations through demand
forecasting and supply chain optimization.
Example: Predicting product demand to manage inventory efficiently.
Conclusion: AI helps businesses work faster, smarter, and more
accurately.