UNIHIVE

Study Hub UNIPORT CSC 494

CSC 494 · Introduction to Artificial Intelligence

Intelligent agents and problem formulation

Agents and environments, PEAS, kinds of agents and environments, and turning a problem into a state space for search.

Our notes

2 min read

Agents

An agent perceives its environment through sensors and acts on it through actuators. A rational agent chooses the action expected to maximise its performance measure, given its percepts and knowledge.
Examples: a robot vacuum (sensors: bump, dirt; actuators: wheels, brush), a chess program, a spam filter.

PEAS description

Self-driving taxiMedical diagnosis system
Performancesafe, fast, legal, comfortablecorrect diagnosis, low cost
Environmentroads, traffic, pedestrianspatient, hospital
Actuatorssteering, brakes, hornquestions, test orders, reports
Sensorscameras, radar, GPSsymptoms entered, test results

Environment types

Fully or partially observable; deterministic or stochastic; episodic or sequential; static or dynamic; discrete or continuous; single or multi-agent. Chess is fully observable, deterministic, sequential, static (without a clock), discrete, multi-agent. Driving is partially observable, stochastic, dynamic, continuous.

Kinds of agents

  1. Simple reflex: condition-action rules on the current percept.
  2. Model-based reflex: keeps an internal state of the world.
  3. Goal-based: plans actions to reach a goal (search).
  4. Utility-based: chooses the best among many outcomes.
  5. Learning agents: improve with experience.

Problem formulation

To solve a problem by search, define:

  1. Initial state.
  2. Actions available in each state.
  3. Transition model: the result of each action.
  4. Goal test.
  5. Path cost (sum of step costs).

The state space is all states reachable from the initial state; a solution is a path to a goal; an optimal solution has the least cost.

Worked example: the 8-puzzle

  • State: positions of eight tiles and the blank on a 3 × 3 board.
  • Actions: move the blank up, down, left, right.
  • Goal: tiles in order.
  • Path cost: 1 per move.
  • Reachable states: 9!/2 = 181,440.

Worked example: water jugs

Jugs of 4 L and 3 L, no marks; get exactly 2 L in the 4 L jug.

  • State (x, y) litres in each; start (0, 0).
  • One solution: (0,0) → (0,3) → (3,0) → (3,3) → (4,2) → (0,2) → (2,0). Six steps.

Exams usually ask

  • Define an agent and give PEAS for a given task.
  • Classify environments.
  • Formulate a problem (8-puzzle, route finding, water jugs) as a search problem.

Common mistake

Leaving out the path cost or goal test when formulating a problem. All five parts are needed.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 494 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.