Professional Documents
Culture Documents
2. Intelligent Agent
Thien Huynh-The
HCM City Univ. Technology and Education
Jan, 2023
Announcement
Student should bring notebook in the next week for in-class coding with python
Requirement
Install python and jupyter notebook
Ref: https://www.youtube.com/watch?v=1w-Bm4zpFgs
Install several common packages: numpy, pandas, and scikit-learn, and tensorflow
Recommend students setup to run tensorflow on GPU if available.
Agent
?
Sensors Actuators
Percepts Actions
Environment
• Definition
• An agent is an entity that perceives its environment through sensors and take actions through
actuators.
• The agent behavior is described by the agent function, or policy, that maps percept histories to
actions:
• A human agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to the
sensors, and other organs such as hands, legs, mouth, for effectors.
• A robotic agent replaces cameras and infrared range finders for the sensors, and various
motors and actuators for effectors.
• A software agent has encoded bit strings as its programs and actions.
• Agent Terminology
• Performance Measure of Agent − It is the criteria, which determines how successful an agent
is.
• Behavior of Agent − It is the action that agent performs after any given sequence of percepts.
• Percept − It is agent’s perceptual inputs at a given instance.
• Percept Sequence − It is the history of all that an agent has perceived till date.
• Agent Function − It is a map from the percept sequence to an action.
• If an agent is able to take good decisions considering all the past as well as the
current percept then the agent is said to be a rational agent.
• In other words, we can say that a rational agent is an agent which has the
capability of doing the right thing at the right time.
• Autonomous driving (autopilot system)
• right time but wrong action
• right action but incorrect time
• Before going into details about rational agents let us first see what rationality
actually means.
Performance
Environment Actuators Sensors
measure
• An agent which can take various actions that would maximize the performance
measure based on the perceptual history and the inbuilt knowledge of the agent.
• Functionality
• Before an agent is actually put in the environment, the percept sequence and actions for
corresponding percepts need to be fed into the agent → start functioning with basic inputs
(initially setting up)
• Based on these inputs, the agent does its basic functions and keeps on learning about the
environment. This increases the complexity of the agent’s learning.
• An agent constantly learns from the environment and it upgrades and changes its perceptual
experience. This is usually done with the help of learning techniques such as reinforcement
learning.
• Performing required actions so that future percept can be modified is one of the main and
important parts of rationality → purely depends on the amount of exploration the agent does.
• Advantages:
Easy to design and implement, requiring minimal computational resources
Real-time responses to environmental changes
Highly reliable in situations where the sensors providing input are accurate, and the rules are well designed
No need for extensive training or sophisticated hardware
• Limitations:
Prone to errors if the input sensors are faulty or the rules are poorly designed
Have no memory or state, which limits their range of applicability
Unable to handle partial observability or changes in the environment they have not been explicitly
programmed for
Limited to a specific set of actions and cannot adapt to new situations
• Advantages Quick and efficient decision-making based on their understanding of the world
• Better equipped to make accurate decisions by constructing an internal model of the world
• Adaptability to changes in the environment by updating their internal models
• More informed and strategic choices by using its internal state and rules to determine the condition
• Goal-based agents are AI agents that use information from their environment to
achieve specific goals. They employ search algorithms to find the most efficient
path towards their objectives within a given environment.
• These agents are also known as rule-based agents, as they follow predefined rules
to accomplish their goals and take specific actions based on certain conditions.
• Goal-based agents are easy to design and can handle complex tasks in various
applications like robotics, computer vision, and natural language processing.
• Unlike basic models, a goal-based agent can determine the optimal course of
decision-making and action-taking processes depending on its desired outcome or
goal
• Advantages
• Simple to implement and understand
• Efficient for achieving a specific goal
• Easy to evaluate performance based on goal completion
• It can be combined with other AI techniques to create more advanced agents
• Well-suited for well-defined, structured environments
• It can be used for various applications, such as robotics, game AI, and autonomous vehicles.
• Disadvantages
• Limited to a specific goal
• Unable to adapt to changing environments
• Ineffective for complex tasks that have too many variables
• Requires significant domain knowledge to define goals
• Advantages
• Handles a wide range of decision-making problems
• Learns from experience and adjusts their decision-making strategies
• Offers a consistent and objective framework for decision-making
• Disadvantages
• Requires an accurate model of the environment, failing to do so results in decision-making errors
• Computationally expensive and requires extensive calculations
• Does not consider moral or ethical considerations
• Difficult for humans to understand and validate
• An AI learning agent is a software agent that can learn from past experiences and
improve its performance.
• It initially acts with basic knowledge and adapts automatically through machine
learning.
• The learning agent comprises four main components:
• Learning Element: It is responsible for learning and making improvements based on the experiences it gains
from its environment.
• Citric: It provides feedback to the learning element by the agent’s performance for a predefined standard.
• Performance Element: It selects and executes external actions based on the information from the learning
element and the critic.
• Problem Generator: It suggests actions to create new and informative experiences for the learning
element to improve its performance.
• Disadvantages
• Prone to biased or incorrect decision-making
• High development and maintenance costs
• Requires significant computing resources
• Dependence on large amounts of data
• Lack of human-like intuition and creativity
• Performance element:
• The current system for selecting actions and driving.
• The critic observes the world and passes information to the learning element.
• E.g., the car makes a quick left turn across three lanes of traffic. The critic observes shocking
language from the other drivers and informs bad action.
• The learning element tries to modify the performance element to avoid reproducing this
situation in the future.
• The problem generator identify certain areas of behavior in need of improvement
and suggest experiments.
• E.g., trying out the brakes on different surfaces in different weather conditions.
• Definition
• How it work
• Advantages and disadvantages
• Real-life examples of AI agents
• In-class assignment
• Describe the mathematical representation of processing steps of the Reinforcement Learning
algorithm
• Reading
• Supervised learning vs. Unsupervised learning vs Semi-supervised learning
• Regression vs. Classification
• Reading
• What is deep Q learning?