PEAS for Agent AI

A classic AI framework to define an agent’s task environment is PEAS. It stands for:

  • Performance
  • Environment
  • Actuators
  • Sensors

Performance

Performance defines success for our agent (the objective and measurable criteria for evaluating the agent’s behavior). A good performance measure will evaluate the state of the environment, not the agent’s internal state.

Designing for performance is typically the hardest part of designing an agent. Thinking deeply about what you want to accomplish, before you start coding, is the key to creating a successful agent.

For example, a naïve performance measure for an automated vehicle might be “Get me to my destination.” A more robust performance measure might include:

  • Speed
  • Comfort
  • Fuel consumption
  • Following traffic laws
  • Safety

Some of these conflict (e.g., speed v safety)

To ensure that performance matches your goals, you will need to tradeoff values. You might end up with something like this:

  • Value safety over speed
  • Value speed over comfort
  • Value fuel consumption over speed
  • Value comfort over fuel consumption
  • Value traffic laws over comfort or fuel consumption

Even this is a bit simplistic. Another approach is to give weights to the various factors and see how they balance out. As you can see, deep thinking is required to get this right.

Environment

This refers to the “world” the agent lives in—that is, everything external to the agent. In the case above the roads, streets, traffic lights, pedestrians, etc., constitute the environment.

Actuators

These are the things that change the environment. In our self-driving car these are the steering wheel, the brakes, and the accelerator. In a robot these might be legs, arms, and fingers. And, most relevant to most of us, in code these are methods that call APIs, functions that change values, etc.

Sensors

Sensors are how the agent perceives its environment. Like humans, the only way the agent can know about the world it moves in is through its sensors. For our self-driving car this might include

  • GPS
  • LiDAR
  • Cameras
  • Tire pressure sensors

Unknown's avatar

About Jesse Liberty

** Note ** Jesse is currently looking for a new position. You can learn more about him at https://jesseliberty.bio Thank you. Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen online courses. His latest book, Building APIs with .NET, is now available wherever you buy your books. Liberty was a Team Lead and Senior Software Engineer for various corporations, a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a 13 year Microsoft MVP.
This entry was posted in Agents, AI, Programming and tagged , , . Bookmark the permalink.