Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

3.1 Modeling the Wash Station: What Is the Robot Deciding?

Source

Chapter 2 gave the robot a toolkit: probability, sensor models, Bayes’ rule, and expected cost. This chapter puts the whole toolkit to work on one robot, the vessel-washing robot we first met in Section 2.1.

The robot stands beside the kitchen sink of a family of five. On a typical day about 60 vessels pass through it after breakfast, lunch, and dinner: steel plates, tumblers, bowls, the cooking vessels (kadai, pressure cooker, pots), and a few odd items such as a non-stick tawa, a sieve, or a glass jar. For each vessel, the robot has one job: choose the right wash programme.

States: what kind of vessel is this?

The robot’s state is the type of the vessel in front of it. We use the same five types and the same probabilities as in Section 2.1:

Vessel type xxPlateTumblerBowlCooking vesselOther
P(x)P(x)0.400.250.200.100.05

In this chapter this PMF plays the role of the prior from Section 2.3: what the robot believes about a vessel before any sensor has looked at it.

Actions: four wash programmes

The robot can run one of four programmes:

ProgrammeWhat it doesGood for
Quick rinseshort, cool spraylightly used tumblers
Standarddetergent, warm water, medium scrubeveryday plates and bowls
Heavy degreasehot water, strong detergent, long hard scruboily kadais and pots with stuck-on food
Gentlesoft brush, mild detergent, low pressurenon-stick tawas, glass jars, sieves

Costs: three kinds of mistakes

Choosing the wrong programme can go wrong in three different ways, and they are not equally bad:

  • Under-cleaning. A greasy kadai given a quick rinse comes out oily. Someone must wash it again by hand, which costs time, water, and patience.

  • Over-cleaning. A lightly used tumbler given a heavy degrease comes out clean, but the robot wasted hot water, detergent, electricity, and time.

  • Damage. A non-stick tawa given a heavy degrease loses its coating. That is the most expensive mistake, because the vessel must be replaced.

We capture all of this in a cost matrix C(a,x)C(a, x), the cost of running programme aa on a vessel of type xx, exactly as in Section 2.4. The robot reads it one column at a time: if the vessel is a cooking vessel, how bad is each programme?

<Figure size 825x330 with 2 Axes>

Reading down each column, the best programme for each vessel type is:

VesselPlateTumblerBowlCooking vesselOther
Best programmestandardquick rinsestandardheavy degreasegentle
Cost21232

Even the right programme costs something, since washing always uses water and energy. A robot that always knew the vessel type would pay these costs and no more.

Deciding without any sensors

Now suppose the robot has no sensors at all. It cannot tell a plate from a kadai, so it must pick one programme and run it on every vessel. Which one?

This is exactly the expected-cost decision from Section 2.4:

E[C(a)]=∑xP(x) C(a,x)\mathbb{E}[C(a)] = \sum_{x} P(x)\, C(a, x)

For standard, for example: 0.40(2)+0.25(2)+0.20(2)+0.10(8)+0.05(5)=2.750.40(2) + 0.25(2) + 0.20(2) + 0.10(8) + 0.05(5) = 2.75.

    quick rinse: expected cost 3.45 per vessel
       standard: expected cost 2.75 per vessel
 heavy degrease: expected cost 4.15 per vessel
         gentle: expected cost 5.10 per vessel

Best programme without sensing: standard

Without sensors, the robot should run standard on everything, at an average of 2.75 cost units per vessel. Standard is a compromise: it is the best choice for plates and bowls (60% of vessels) and not disastrous for anything else.

The best possible: perfect sensing

At the other extreme, imagine a perfect sensor that always reports the true type. Then the robot would pick the best programme for every vessel, and its average cost would be

E[C⋆]=∑xP(x) min⁡aC(a,x)=0.40(2)+0.25(1)+0.20(2)+0.10(3)+0.05(2)=1.85\mathbb{E}[C^{\star}] = \sum_x P(x)\, \min_a C(a, x) = 0.40(2) + 0.25(1) + 0.20(2) + 0.10(3) + 0.05(2) = 1.85

A robot with perfect knowledge is called an oracle, and its cost is a floor that no real robot can beat.

The difference, 2.75−1.85=0.902.75 - 1.85 = 0.90 cost units per vessel, is the value of perfect information for this task. It is the most that any sensor, however expensive, could ever save. At 60 vessels a day that is up to 54 cost units a day, which gives the engineer a budget: a sensor that costs more than it could possibly save is not worth installing.

week total — no sensors: 1167, oracle: 786, gap: 381
<Figure size 770x396 with 1 Axes>

Figure 1:Cumulative cost over one week (420 vessels) for a robot with no sensors (always standard) and for an oracle that knows every vessel’s type. The gap between the two lines is the most any sensor could save.

Most of the gap comes from the cooking vessels. They are only 10% of the stream, but every one that gets standard instead of heavy degrease costs 5 extra units. Tumblers add a little too: each gets standard (2) instead of a quick rinse (1). The next section asks which sensors can close this gap, and by how much.