1.4 Designing Agents

The third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including full text).

1.4.2 Tasks

One way that AI representations differ from computer programs in traditional languages is that an AI representation typically specifies what needs to be computed, not how it is to be computed. We might specify that the agent should find the most likely disease a patient has, or specify that a robot should get coffee, but not give detailed instructions on how to do these things. Much AI reasoning involves searching through the space of possibilities to determine how to complete a task.

Typically, a task is only given informally, such as “deliver parcels promptly when they arrive” or “fix whatever is wrong with the electrical system of the house.”

Figure 1.4: The role of representations in solving tasks

The general framework for solving tasks by computer is given in Figure 1.4. To solve a task, the designer of a system must:

  • determine what constitutes a solution

  • represent the task in a way a computer can reason about

  • use the computer to compute an output, which is answers presented to a user or actions to be carried out in the environment, and

  • interpret the output as a solution to the task.

Knowledge is the information about a domain that can be used to solve tasks in that domain. To solve many tasks requires much knowledge, and this knowledge must be represented in the computer. As part of designing a program to solve tasks, we must define how the knowledge will be represented. A representation language is used to express the knowledge that is used in an agent. A representation of some piece of knowledge is the particular data structures used to encode the knowledge so it can be reasoned with. A knowledge base is the representation of all of the knowledge that is stored by an agent.

A good representation language is a compromise among many competing objectives. A representation should be:

  • rich enough to express the knowledge needed to solve the task.

  • as close to a natural specification of the task as possible; it should be compact, natural, and maintainable. It should be easy to see the relationship between the representation and the domain being represented, so that it is easy to determine whether the knowledge represented is correct. A small change in the task should result in a small change in the representation of the task.

  • amenable to efficient computation, or tractable, which means that the agent can act quickly enough. To ensure this, representations exploit features of the task for computational gain and trade off accuracy and computation time.

  • able to be acquired from people, data and past experiences.

Many different representation languages have been designed. Many of these start with some of these objectives and are then expanded to include the other objectives. For example, some are designed for learning, perhaps inspired by neurons, and then expanded to allow richer task solving and inference abilities. Some representation languages are designed with expressiveness in mind, and then inference and learning are added on. Some language designers focus on tractability and enhance richness, naturalness and the ability to be acquired.