Updated June 22, 2023
Introduction to Agents in Artificial Intelligence
Agents in Artificial Intelligence are the associated concepts that AI technologies work upon. The AI software or AI-enabled devices with sensors generally captures the information from the environment setup and process the data for further actions. There are mainly two ways agents interact with the environment: perception and action. The person is only passive in capturing the information without changing the actual environment, whereas action is the active form of interaction by changing the actual environment. AI technologies such as virtual assistance catboats and AI-enabled devices work based on the previous persecution data processing and learning for the actions.
What is an Agent?
An Agent is anything that takes actions according to the information it gains from the environment. A human agent has sensory organs to sense the environment and the body parts to act, while a robot agent has sensors to perceive the environment.
How does the Agent Interact with the Environment?
The agents interact with the environment in two ways:
Perception is a passive interaction where the agent gains information about the environment without changing the environment. The robot’s sensors help it gain information about the surroundings without affecting the surrounding. Hence, gaining knowledge through sensors is called perception.
Action is an active interaction where the environment is changed. When the robot moves an obstacle using its arm, it is called an action as the environment is changed. The arm of the robot is called an “Effector” as it acts.
Explanation of the above image:
- The interaction of the Agent with the Environment is through Sensors and Effectors.
- Consider the example of a chatbot which is a virtual assistant. It is called perception when it reads and understands the meaning of a user’s messages. And when it replies to the user after analyzing the user’s message, it is called the action.
How should the Agents Act in Artificial Intelligence?
Below are the points that explain how an agent should act:
- A rational agent does the right thing. The right action is the one that causes the agent to be the most successful.
- An omniscient agent knows what impact the action will have and can act accordingly, but it is impossible.
- The degree of success, which is defined by the performance measure.
- The percept sequence is the entire sequence of perceptions by the agent until the present moment.
- The knowledge of agents about the environment.
- What actions can the agent perform?
Mapping of Percept Sequences to Actions
When it is known that the agent’s action depends entirely on the perceptual history – the percept sequence, then the agent can be described using a mapping. Mapping is a list that maps the percept sequence to the action. When we specify which action an agent should take corresponding to the given percept sequence, we specify the design for an ideal agent.
The behavior of an agent depends on its own experience as well as the built-in knowledge of the agent instilled by the agent designer. A system is autonomous if it takes actions according to its expertise. So for the initial phase, as it does not have any experience, it is good to provide built-in knowledge. The agent learns then through evolution. A genuinely autonomous intelligent agent should be able to operate successfully in various environments if given sufficient time to adapt.
Types of Agents in Artificial Intelligence
Following are the 4 types of agents:
1. Reflex Agent
Reflex Agent works similarly to our body’s reflex action (e.g., when we immediately lift our finger when it touches the tip of the flame). Just as the prompt response of our body is based on the current situation, the agent also responds based on the current environment, irrespective of the past state of the environment. The reflex agent can work properly only if the decisions are based on the current percept.
2. Agents that keep Track of the World
These are the agents with memory. It stores information about the previous and current states and acts accordingly. Just as while driving, if the driver wants to change the lane, he looks into the mirror to know the present position of the vehicles behind him. While looking in front, he can only see the vehicles in front, and as he already has the information on the position of vehicles behind him (from the mirror a moment ago), he can safely change the lane. The decision-maker quickly updates the previous and current state to decide the action.
3. Goal-based Agents
In some circumstances, just the information of the current state may not help in making the right decision. The agent considers the goal information besides the current state information to make the right decision. E.g., if the agent is a self-driving car and the goal is the destination, then the route information helps the car decide when to turn left or right.
‘Search’ and ‘planning’ are the two subfields of AI that help the agent achieve its goals. Though the goal-based agent may appear less efficient, it is flexible. Considering the same example mentioned above, if the destination changes, then the agent will manipulate its actions accordingly. This will not be the case with the reflex agent, as all the rules need to be rewritten with the change in goal.
4. Utility Agents
There can be many possible sequences to achieve the goal, but some will be better than others. Considering the same example mentioned above, the destination is known, but there are multiple routes. Choosing an appropriate route also matters to the overall success of the agent. There are many factors in deciding the route, like the shortest, most comfortable, etc. The success depends on the utility of the agent based on user preferences.
The utility is a function that maps a state to a real number that describes the degree of happiness. The utility function specifies the appropriate trade-off in case the goals are conflicting.
Conclusion – Agents in Artificial Intelligence
An agent is anything that takes actions according to the information it gains from the environment. The agents interact with the environment in two ways: Perception and Action. Agents can be rational or omniscient.
Following are the 4 types of agents:
- Reflex (reactive) agent – an agent without
- Agents that keep track of the world
- Goal-based agents
- Utility agents
We hope that this EDUCBA information on “Agents in Artificial Intelligence” was beneficial to you. You can view EDUCBA’s recommended articles for more information.