Unit-1 - Artificial Intelligence
Unit-1 - Artificial Intelligence
Unit-1 - Artificial Intelligence
UNIT – I
Introduction To AI
Artificial Intelligence is composed of two words Artificial and Intelligence, where Artificial
defines "man-made," and intelligence defines "thinking power", hence AI means "a man-
made thinking power."
"It is a branch of computer science by which we can create intelligent machines which can
behave like a human, think like humans, and able to make decisions."
Artificial Intelligence exists when a machine can have human based skills such as learning,
reasoning, and solving problems
With Artificial Intelligence you do not need to preprogram a machine to do some work,
despite that you can create a machine with programmed algorithms which can work with
own intelligence, and that is the awesomeness of AI.
It is believed that AI is not a new technology, and some people says that as per Greek myth,
there were Mechanical men in early days which can work and behave like humans.
o With the help of AI, you can create such software or devices which can solve real-
world problems very easily and with accuracy such as health issues, marketing,
traffic issues, etc.
o With the help of AI, you can create your personal virtual Assistant, such as Cortana,
Google Assistant, Siri, etc.
o With the help of AI, you can build such Robots which can work in an environment
where survival of humans can be at risk.
o AI opens a path for other new technologies, new devices, and new Opportunities.
History of AI
o Throughout history, people have been intrigued by the idea of making non-living
things smart. In ancient times, Greek stories mentioned gods creating clever
machines, and in Egypt, engineers made statues move. Thinkers like Aristotle and
Ramon Llull laid the groundwork for AI by describing how human thinking works
using symbols.
o In the late 1800s and early 1900s, modern computing started to take shape. Charles
Babbage and Ada Lovelace designed machines that could be programmed in the
1830s. In the 1940s, John Von Neumann came up with the idea of storing computer
programs. At the same time, Warren McCulloch and Walter Pitts started building the
basics of neural networks.
o The 1950s brought us modern computers, letting scientists dig into machine
intelligence. Alan Turing's Turing test became a big deal in computer smarts. The
term "artificial intelligence" was first used in a 1956 Dartmouth College
meeting, where they introduced the first AI program, the Logic Theorist.
o The following years had good times and bad times for AI, called "AI Winters." In the
1970s and 1980s, we hit limits with computer power and complexity. But in the late
1990s, things got exciting again. Computers were faster, and there was more
data. IBM's Deep Blue beating chess champion Garry Kasparov in 1997 was a big
moment.
o The 2000s started a new era with machine learning, language processing, and
computer vision. This led to cool new products and services. The 2010s saw AI take
off with things like voice assistants and self-driving cars. Generative AI, which makes
creative stuff, also started getting big.
o In the 2020s, generative AI like ChatGPT-3 and Google's Bard grabbed everyone's
attention. These models can create all sorts of new things when you give them a
prompt, like essays or art. But remember, this tech is still new, and there are things
to fix, like making sure it doesn't make things up.
To achieve the above factors for a machine or software Artificial Intelligence requires the
following discipline:
o Mathematics
o Biology
o Psychology
o Sociology
o Computer Science
o Neurons Study
o Statistics
Types of Artificial Intelligence
Artificial Intelligence can be categorized in several ways, primarily based on two main
criteria: capabilities and functionality.
o High Cost: The hardware and software requirement of AI is very costly as it requires
lots of maintenance to meet current world requirements.
o Can't think out of the box: Even we are making smarter machines with AI, but still
they cannot work out of the box, as the robot will only do that work for which they
are trained, or programmed.
o No feelings and emotions: AI machines can be an outstanding performer, but still
it does not have the feeling so it cannot make any kind of emotional attachment with
human, and may sometime be harmful for users if the proper care is not taken.
o Increase dependency on machines: With the increment of technology, people are
getting more dependent on devices and hence they are losing their mental
capabilities.
o No Original Creativity: As humans are so creative and can imagine some new
ideas but still AI machines cannot beat this power of human intelligence and cannot
be creative and imaginative.
o Complexity: Making and keeping AI systems can be very complicated and
need a lot of knowledge. This can make it hard for some groups or people to
use them.
o Job Concerns: As AI gets better, it might take away not just basic jobs but
also some skilled ones. This worries people about losing jobs in different fields.
Challenges of AI
Artificial Intelligence offers incredible advantages, but it also presents some
challenges that need to be addressed:
o Doing the Right Thing: AI should make the right choices, but sometimes it
doesn't. It can make mistakes or do things that aren't fair. We need to teach
AI to be better at making good choices.
o Government and AI: Sometimes, governments use AI to keep an eye on
people. This can be a problem for our freedom. We need to make sure they
use AI in a good way.
o Bias in AI: AI can sometimes be a bit unfair, especially when it comes to
recognizing people's faces. This can cause problems, especially for people
who aren't like the majority.
o AI and Social Media: What you see on social media is often decided by AI.
But sometimes, AI shows things that aren't true or are kind of mean. We need
to make sure AI shows the right stuff.
o Legal and Regulatory Challenges: The rapid evolution of AI has outpaced
the development of comprehensive laws and regulations, leading to
uncertainty about issues like liability and responsibility.
What is an Agent?
An agent can be anything that perceiveits environment through sensors and act upon that
environment through actuators. An Agent runs in the cycle of perceiving, thinking,
and acting. An agent can be:
o Human-Agent: A human agent has eyes, ears, and other organs which work for
sensors and hand, legs, vocal tract work for actuators.
o Robotic Agent: A robotic agent can have cameras, infrared range finder, NLP for
sensors and various motors for actuators.
o Software Agent: Software agent can have keystrokes, file contents as sensory
input and act on those inputs and display output on the screen.
Hence the world around us is full of agents such as thermostat, cellphone, camera, and even
we are also agents.
Before moving forward, we should first know about sensors, effectors, and actuators.
Sensor: Sensor is a device which detects the change in the environment and sends the
information to other electronic devices. An agent observes its environment through sensors.
Actuators: Actuators are the component of machines that converts energy into motion. The
actuators are only responsible for moving and controlling a system. An actuator can be an
electric motor, gears, rails, etc.
Effectors: Effectors are the devices which affect the environment. Effectors can be legs,
wheels, arms, fingers, wings, fins, and display screen.
Intelligent Agents:
An intelligent agent is an autonomous entity which act upon an environment using sensors
and actuators for achieving goals. An intelligent agent may learn from the environment to
achieve their goals. A thermostat is an example of an intelligent agent.
Rational Agent:
A rational agent is an agent which has clear preference, models uncertainty, and acts in a
way to maximize its performance measure with all possible actions.
A rational agent is said to perform the right things. AI is about creating rational agents to
use for game theory and decision theory for various real-world scenarios.
For an AI agent, the rational action is most important because in AI reinforcement learning
algorithm, for each best possible action, agent gets the positive reward and for each wrong
action, an agent gets a negative reward.
Rationality:
Note: Rationality differs from Omniscience because an Omniscient agent knows the actual outcome of its
action and act accordingly, which is not possible in reality.
Structure of an AI Agent
The task of AI is to design an agent program which implements the agent function. The
structure of an intelligent agent is a combination of architecture and agent program. It can
be viewed as:
Following are the main three terms involved in the structure of an AI agent:
1. f:P* → A
PEAS Representation
PEAS is a type of model on which an AI agent works upon. When we define an AI agent or
rational agent, then we can group its properties under PEAS representation model. It is
made up of four words:
o P: Performance measure
o E: Environment
o A: Actuators
o S: Sensors
Here performance measure is the objective for the success of an agent's behavior.
Problem-solving
Time Complexity: Time complexity is a measure of time for an algorithm to complete its
task.
Space Complexity: It is the maximum storage space required at any point during the
search, as the complexity of the problem.
Types of search algorithms
Based on the search problems we can classify the search algorithms into
uninformed (Blind search) search and informed search (Heuristic search)
algorithms.
Uninformed/Blind Search:
The uninformed search does not contain any domain knowledge such as closeness, the
location of the goal. It operates in a brute-force way as it only includes information about
how to traverse the tree and how to identify leaf and goal nodes. Uninformed search applies
a way in which search tree is searched without any information about the search space like
initial state operators and test for the goal, so it is also called blind search. It examines each
node of the tree until it achieves the goal node.
o Breadth-first search
o Uniform cost search
o Depth-first search
o Iterative deepening depth-first search
o Bidirectional Search
Informed Search
A heuristic is a way which might not always be guaranteed for best solutions but guaranteed
to find a good solution in reasonable time.
Informed search can solve much complex problem which could not be solved in another
way.
1. Greedy Search
2. A* Search