Chapter 09AI
Chapter 09AI
Chapter
Artificial Intelligence
We can define AI as:
"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.
Why Artificial Intelligence?
Before Learning about Artificial Intelligence, we should know that what is the
importance of AI and why should we learn it. Following are some main reasons
to learn about AI:
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.
With the help of AI, you can create your personal virtual Assistant, such as Cortana,
Google Assistant, Siri, etc.
With the help of AI, you can build such Robots which can work in an environment
where survival of humans can be at risk.
AI opens a path for other new technologies, new devices, and new Opportunities.
Goals of Artificial Intelligence
Following are the main goals of Artificial Intelligence:
Replicate human intelligence
Solve Knowledge-intensive tasks
An intelligent connection of perception and action
Building a machine which can perform tasks that requires human intelligence such
as:
Proving a theorem
Playing chess
Plan some surgical operation
Driving a car in traffic
Creating some system which can exhibit intelligent behavior, learn new things by
itself, demonstrate, explain, and can advise to its user.
What Comprises to Artificial Intelligence?
Artificial Intelligence is not just a part of computer science even it's so vast
and requires lots of other factors which can contribute to it. To create the
AI first we should know that how intelligence is composed, so the
Intelligence is an intangible part of our brain which is a combination of
Reasoning, learning, problem-solving perception, language
understanding, etc.
What Comprises to Artificial Intelligence?
To achieve the above factors for a
machine or software Artificial
Intelligence requires the following
discipline:
Mathematics
Biology
Psychology
Sociology
Computer Science
Neurons Study
Statistics
Advantages of Artificial Intelligence
Following are some main advantages of Artificial Intelligence:
High Accuracy with less errors: AI machines or systems are prone to less errors and high
accuracy as it takes decisions as per pre-experience or information.
High-Speed: AI systems can be of very high-speed and fast-decision making, because of that
AI systems can beat a chess champion in the Chess game.
High reliability: AI machines are highly reliable and can perform the same action multiple
times with high accuracy.
Useful for risky areas: AI machines can be helpful in situations such as defusing a bomb,
exploring the ocean floor, where to employ a human can be risky.
Digital Assistant: AI can be very useful to provide digital assistant to the users such as AI
technology is currently used by various E-commerce websites to show the products as per
customer requirement.
Useful as a public utility: AI can be very useful for public utilities such as a self-driving car
which can make our journey safer and hassle-free, facial recognition for security purpose,
Natural language processing to communicate with the human in human-language, etc.
Disadvantages of Artificial Intelligence
Every technology has some disadvantages, and the same goes for Artificial intelligence.
Being so advantageous technology still, it has some disadvantages which we need to
keep in our mind while creating an AI system. Following are the disadvantages of AI:
High Cost: The hardware and software requirement of AI is very costly as it requires lots of
maintenance to meet current world requirements.
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.
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.
Increase dependency on machines: With the increment of technology, people are getting
more dependent on devices and hence they are losing their mental capabilities.
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.
Application of AI
Artificial Intelligence has various
applications in today's society. It is
becoming essential for today's time
because it can solve complex
problems with an efficient way in
multiple industries, such as
Healthcare, entertainment, finance,
education, etc. AI is making our daily
life more comfortable and fast.
Problem-solving agents:
In Artificial Intelligence, Search techniques are universal problem-solving
methods. Rational agents or Problem-solving agents in AI mostly used these
search strategies or algorithms to solve a specific problem and provide the
best result. Problem-solving agents are the goal-based agents and use atomic
representation. In this topic, we will learn various problem-solving search
algorithms.
Search Algorithm Terminologies:
Search: Searching is a step by step procedure to solve a search-problem in a given search
space. A search problem can have three main factors:
Search Space: Search space represents a set of possible solutions, which a system may have.
Start State: It is a state from where agent begins the search.
Goal test: It is a function which observe the current state and returns whether the goal state is
achieved or not.
Search tree: A tree representation of search problem is called Search tree. The root of
the search tree is the root node which is corresponding to the initial state.
Actions: It gives the description of all the available actions to the agent.
Transition model: A description of what each action do, can be represented as a
transition model.
Path Cost: It is a function which assigns a numeric cost to each path.
Solution: It is an action sequence which leads from the start node to the goal node.
Optimal Solution: If a solution has the lowest cost among all solutions.
Properties of Search Algorithms:
Following are the four essential properties of search algorithms to
compare the efficiency of these algorithms:
Completeness: A search algorithm is said to be complete if it guarantees to
return a solution if at least any solution exists for any random input.
Optimality: If a solution found for an algorithm is guaranteed to be the best
solution (lowest path cost) among all other solutions, then such a solution for
is said to be an optimal solution.
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.
It can be divided into five main types:
Breadth-first search
Uniform cost search
Depth-first search
Iterative deepening depth-first search
Bidirectional Search
Informed Search
Informed search algorithms use domain knowledge. In an informed
search, problem information is available which can guide the search.
Informed search strategies can find a solution more efficiently than an
uninformed search strategy. Informed search is also called a Heuristic
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.
Knowledge-Based Agent in Artificial
intelligence
An intelligent agent needs knowledge about the real world for taking
decisions and reasoning to act efficiently.
Knowledge-based agents are those agents who have the capability of
maintaining an internal state of knowledge, reason over that knowledge,
update their knowledge after observations and take actions. These agents
can represent the world with some formal representation and act
intelligently.
Knowledge-based agents are composed of two main parts:
Knowledge-base and
Inference system.
Knowledge-Based Agent in Artificial
intelligence
A knowledge-based agent must able to do the following:
An agent should be able to represent states, actions, etc.
An agent Should be able to incorporate new percepts
An agent can update the internal representation of the world
An agent can deduce the internal representation of the world
An agent can deduce appropriate actions.
Knowledge base: Knowledge-base is a central component of a knowledge-based
agent, it is also known as KB. It is a collection of sentences (here 'sentence' is a
technical term and it is not identical to sentence in English). These sentences
are expressed in a language which is called a knowledge representation
language. The Knowledge-base of KBA stores fact about the world.
Why use a knowledge base?
Knowledge-base is required for updating knowledge for an agent to learn
with experiences and take action as per the knowledge.
Inference system
Inference means deriving new sentences from old. Inference system allows us
to add a new sentence to the knowledge base. A sentence is a proposition
about the world. Inference system applies logical rules to the KB to deduce
new information.
Inference system generates new facts so that an agent can update the KB. An
inference system works mainly in two rules which are given as:
Forward chaining
Backward chaining
Approaches to designing a knowledge-based
agent:
There are mainly two approaches to build a knowledge-based agent:
1. Declarative approach: We can create a knowledge-based agent by
initializing with an empty knowledge base and telling the agent all the
sentences with which we want to start with. This approach is called
Declarative approach.
2. Procedural approach: In the procedural approach, we directly encode
desired behavior as a program code. Which means we just need to write a
program that already encodes the desired behavior or agent.