BCA AI Chapter-1 Complete
BCA AI Chapter-1 Complete
CA-C21T
Syllabus
• Unit-1: Introduction to AI
• Unit-2: Knowledge-based Agents
• Unit-3: Introduction to Planning
• Unit-4: Natural Language Processing(NLP)
• The Greek philosopher Aristotle was one of the first to attempt to codify
“right thinking,” that is, irrefutable(impossible to disprove) reasoning
processes.
• His syllogisms provided patterns for argument structures that always
yielded correct conclusions when given correct premises—for example,
“Socrates is a man; all men are mortal; therefore, Socrates is mortal.”
• These laws of thought were supposed to govern the operation of the mind;
their study initiated the field called logic.
There are two main obstacles to this approach.
• First, it is not easy to state informal knowledge in the formal terms
required by logical notation, particularly when the knowledge is less than
100% certain.
• Second, there is a big difference between solving a problem “in principle”
and solving it in practice.
4. Acting rationally: The rational agent approach
History_of_artificial_intelligence
Artificial Intelligence
Disciplines/Foundations of AI
What can AI do Today?
A concise answer is difficult because there are so many activities in so
many subfields. Here we sample a few disciplines used with AI.
1. Philosophy
2. Mathematics
3. Economics
4. Neuroscience
5. Psychology
6. Computer Engineering.
7. Linguistics
• Philosophy:
• Foundational issues (can a machine think?), issues of knowledge and belief,
mutual knowledge, answering important questions, etc.,
• Mathematics:
• Mathematics is used to write the logic and algorithm for Machine Learning.
• Good knowledge of mathematics is a must skill to be able to develop an AI
Model.
• Economics:
• AI is used in the domain of Economics to solve a lot of organizational and
Financial areas, like Decision Situations, Projecting Areas, and Operation
Research, etc.,
• Neuroscience:
• Neuroscience is the study of the nervous system, particularly the brain. However,
the exact way in which the brain enables thought is one of the great mysteries of
science.
• This enables AI Scientists to develop programming models like the Human Brain.
• Psychology:
• How do humans and animals think and act?
• How computer models could address the psychology of memory, language,
and logical thinking, respectively.
• It is now a common (although far from universal) view among
psychologists that “a cognitive theory should be like a computer program”
• That is, it should describe a detailed information processing mechanism
whereby some cognitive function might be implemented.
• Computer Engineering:
• The programmers write the codes to make the neural network for artificial
intelligence. Based on the data provided the system is updated
automatically.
Eg: complexity theory, algorithms, logic and inference, programming
languages, and system building.
• Linguistics:
• The Modern Linguistics is called “Computational Linguistics or
Natural Language Processing.
• The Natural Language processing experience is also a must for
developing AI Systems for machines.
• Control Theory and Cybernetics:
• It describes how things operate under their own control.
• It is the Scientific study of the workings of humans, animals, and
machines to control and communicate with each other.
• Sub areas of AI
• Game playing, speech recognition, computer vision, machine learning,
etc.
Advantages and Disadvantages of AI
Advantages of AI:
• Reduction in Human Errors
• Zero Risks
• Digital Assistance
• New Inventions
• Unbiased Decisions
• Risky Situations
• Pattern Identification.
Advantages and Disadvantages of AI
Disadvantages of AI:
• High Costs
• No Creativity
• Unemployment
• No Ethics
• Make Humans Lazy
• Emotionless
Topic- 2: Intelligent Agents
Agents and Environments:
• What is an Agent?
• An agent is anything that can be viewed as perceiving its environment
through sensors and acting upon that environment through actuators.
• In AI, an Agent is a computer program or system that is
designed to perceive its environment, make decisions, and take
actions to achieve a specific goal or set of goals.
• An Agent operates autonomously, takes input from the
environment based on abilities, preferences, prior knowledge,
and past experiences, and finally formulates the actions.
• An Agent can be
• Human- Agent
• Software Agent
• Robotic Agent
• Gaming Agent
• Human- Agent: A human agent has eyes, ears, and other organs for
sensors and hands, legs, mouth, and other body parts for actuators.
• Robotic agents might have cameras and infrared range finders for sensors
and various motors for actuators.
• Software agent receives keystrokes, file contents, and network packets as
sensory inputs and acts on the environment by displaying on the screen,
writing files, and sending network packets.
m with
rogra
gent P
The A Functions
Goal Formulation:
Naturally, we want all the dirt cleaned up, formally the goal is
either state 7 or state 8
State Space Graph:
3Q) The Concept of Rationality( Good Behavior)
• Rationality is nothing but the status of being reasonable, sensible and
having a good sense of judgment.
• Rationality is concerned with expected actions and results depending upon
what the agent has perceived.
• “Performing actions with the aim of obtaining useful information is
an important part of rationality.”
• A Rational Agent always performs the right action, where the right action
means the action that causes the agent to be most successful in the
perception sequence.
• The Problem the agent solves is characterized by Performance
Measure, Environment, Actuators, and Sensors(PEAS).
• Rationality of an agent depends on the following:
• The Performance Measures, which determine the degree of success.
• Agent’s Percept Sequence till now.
• The Agent’s Prior knowledge about the environment.
• The actions that the agent can carry out.
A Rational agent should select an action that is expected to
maximize its performance measure, given the evidence provided by
the percept sequence.
• Example: Rational Agent (Vacuum Cleaner):
• Role: The agent cleans a square if it is dirty, and moves to the other square if
not;
• Now we can examine the Rationality of the agent, First we need to examine the
performance measure, what is known about the environment, and what
sensors and actuators the agent has.
• The Performance measure awards one point for each clean square at each
time step.
• The Complete awareness of the environment is called “Priori”, clean
squares stay clean, and sucking cleans the current square, the agent
position after the completion of actions.
• Agent actions are Left, Right and Suck.
• The agent correctly perceives its location and whether that location
contains dirt.
We claim that under these circumstances the agent is Surely Rational or not,
and its performance is high or least compared to others.
• Eventually the same agent would be irrational
under different circumstances.
• If the agent sensory device can have access to the complete state of the environment, then the
environment is accessible to that agent.
• The Next state of the environment is completely determined by the current state and the actions
of the agent, then the environment is deterministic otherwise it is non-deterministic.
• In an episodic task environment, the agent’s experience is divided into atomic episodes. In each
episode, the agent receives a percept and then performs a single action.
• Crucially, the next episode does not depend on the actions taken in previous episodes.
• Many classification tasks are episodic. For example, an agent that has to spot defective parts on an
assembly line bases each decision on the current part, regardless of previous decisions;
5Q) The Structure of Agent
• The job of AI is to design an agent program that implements the agent
function the mapping from percepts to actions.
• We assume this program will run on some sort of computing device
with physical sensors and actuators, we call this the architecture.
• Eg:
To build a rational agent in this way, we as designers must construct a
table that contains the appropriate action for every possible percept
sequence.
• Four basic kinds of agent programs(types of agents) that embody
the principles underlying almost all intelligent systems:
• Simple reflex agents;
• Model-based reflex agents;
• Goal-based agents; and
• Utility-based agents.
Each kind of agent program combines particular components in particular ways to
generate actions.
Simple Reflex Agent:
• The simplest kind of agent is the simple reflex agent.
• These agents select actions on the basis of the current percept, ignoring the rest of the
percept history.
Eg: Vacuum Cleaner Agent Program
• Model Based Agents:
• The most effective way to handle partial observability is for the agent to keep track of the
part of the world it can’t see now.
• That is, the agent should maintain some sort of internal state that depends on the percept
history and thereby reflects at least some of the unobserved aspects of the current state.
• Eg: In Self Taxi Driver agent, For overtake action, other driving tasks such as changing lanes,
the agent needs to keep track of where the other cars are if it can’t see them all at once. And
for any driving to be possible at all, the agent needs to keep track of where its keys are.