Robotics and artificial intelligence

IGCSE Computer Science · Automated and Emerging Technologies

What makes something a robot

Robots appear in industry (welding, painting, assembly), domestic settings (vacuum cleaners, lawn mowers), medicine (surgical assistance), agriculture (harvesting, spraying) and exploration (space, deep sea, bomb disposal).

Advantages of robots

Disadvantages of robots

The third point is the one worth arguing carefully. A human worker who meets a strange situation improvises. A robot has no judgement outside its programming — which is exactly why robots suit repetitive, predictable tasks and struggle with variable ones.

Artificial intelligence

AI is software that simulates the way humans think, and it is characterised by:

Expert systems

An expert system reproduces the decision-making of a human specialist — in medical diagnosis, mineral prospecting, fault-finding, tax advice or chess.

knowledge basethe store of facts collected from human experts
rule basethe set of if-then rules linking those facts
inference enginethe reasoning part — it matches the facts given against the rules to reach a conclusion
user interfacehow the user answers questions and reads the result
explanation systemtells the user why the system reached its conclusion, and how confident it is

Note carefully the difference between the knowledge base and the inference engine. The knowledge base stores; the inference engine reasons. Swapping these is a common and heavily marked error.

The explanation system matters more than it looks: a doctor will not act on a diagnosis the system cannot justify.

Machine learning

Machine learning is a branch of AI where the system improves its own performance from data without being explicitly reprogrammed.

The distinction from a normal program: a normal program does exactly what it was written to do, forever. A machine-learning system is shown examples, finds patterns in them, and gets better as it sees more.

That is why it suits problems too complex to write rules for — recognising faces, understanding speech, spotting fraud.

Expert system — the knowledge base STORES, the inference engine REASONS INTERFACE asks the user, receives answers INFERENCE ENGINE matches facts against rules → conclusion KNOWLEDGE BASE KNOWLEDGE RULE BASE FACTS from experts IF–THEN rules EXPLANATION SYSTEM WHY it reached that conclusion, how sure A heavily penalised error: saying the knowledge base "draws conclusions". The knowledge base only STORES. Reasoning is the job of the INFERENCE ENGINE.
The explanation system matters more than it looks: a doctor will not act on a diagnosis the system cannot explain.

Worked example: whether to replace workers with robots

A factory is considering replacing a manual assembly line with robots. State three benefits and three drawbacks, then give a conditional conclusion.

Solution

Three benefits.

Benefit one — continuous operation. Robots can run day and night, with no breaks, no holidays and no need for sleep. Output per production line therefore rises considerably.

Benefit two — consistent quality. Robots make every product to the same standard. Workers tire towards the end of a shift and quality drifts; robots do not.

This also reduces the number of faulty goods that must be scrapped, so it saves raw materials.

Benefit three — can do dangerous work. Welding, spray painting and lifting heavy objects are all harmful to human health. Giving them to robots means no one is injured in those operations.

Three drawbacks.

Drawback one — very high initial cost. The factory must pay for buying the equipment, installing it, and programming it for each operation. This money has to be spent before any benefit is obtained.

Drawback two — workers lose their jobs. The people doing those operations are replaced, and not everyone can be retrained to do other work in the factory.

This is a real social cost, not just a figure in the accounts.

Drawback three — cannot handle unexpected situations. A robot does exactly what its program says. Faced with a misplaced component or a situation the programmer did not foresee, it stops or causes a fault.

A worker who meets an unfamiliar situation can improvise; a robot has no judgement beyond its program.

In addition, the factory still has to pay skilled maintenance technicians.

Conditional conclusion.

Replacement is worthwhile when the operation is repetitive, predictable and high-volume — because that is exactly where robots are strongest and humans weakest.

Conversely, if the product changes often, needs judgement or is low-volume, then the cost of reprogramming will swallow all the savings, and keeping the workers is the right choice.

The factory should also have a plan to retrain the affected workers for roles such as maintenance or quality inspection.

Worked example: an expert system for diagnosing disease

Describe the components of an expert system for medical diagnosis, state the job of each, and explain why the explanation system is essential.

Solution

The knowledge base. This is the store of facts gathered from many specialist doctors: diseases, the symptoms of each disease, typical test results, and risk factors.

It only stores. By itself it decides nothing at all.

The rule base. This is the set of if–then rules that connect the facts together. For example: if the patient has a fever and a cough and difficulty breathing, then the likelihood of pneumonia increases.

The inference engine. This is the part that reasons — and the component most often misunderstood.

It takes the facts the user provides, matches them against the rules, and draws conclusions. It also decides what the next question should be to narrow down the possibilities step by step.

In short: the knowledge base stores, the inference engine reasons. Swapping these two jobs is an error that loses marks heavily.

The user interface. Where the doctor answers the questions about symptoms and reads the result. It must be clear, because the user may not be good with computers.

The explanation system. It shows why the system reached that conclusion — which rules were triggered, which facts were the basis — and how certain it is.

Why the explanation system is essential.

Reason one — professional responsibility. The doctor is the one responsible to the patient, not the software. They cannot prescribe medication based on a conclusion that cannot be explained.

Reason two — spotting mistakes. If the system states its basis clearly, the doctor can tell when it relied on wrongly entered information or a rule that is unsuitable for this case.

Reason three — an expert system gives possibilities, not facts. It usually returns a result with a level of certainty. Knowing whether the system is “fairly sure” or “very sure” changes completely how the doctor acts.

That is why an expert system is a tool to support the doctor's decision, and does not replace the doctor.

Common mistake

Saying the knowledge base makes the diagnosis. It sounds very reasonable — “knowledge” should know how to answer. But in an expert system, these two jobs sit in two different components. The knowledge base only STORES the facts gathered from human experts: which disease has which symptoms, what results which tests give. It is a store, and by itself it decides nothing at all. The job of reasoning belongs to the inference engine: it takes the facts the user provides, matches them against the rule base, then draws conclusions and decides what the next question should be. A memory line: the knowledge base stores, the inference engine reasons. The accompanying trap: leaving out the explanation system when listing the components. It is not decoration — the doctor is responsible to the patient so cannot act on a conclusion for which the system cannot state its basis.

Key takeaway

A robot = a mechanical structure + sensors + programmable. Strong at repetitive, predictable, dangerous work; weak in unexpected situations because it has no judgement beyond its program. The cost is a high initial cost and job losses. Artificial intelligence has four characteristics: data, rules, the ability to reason, the ability to learn and adapt. An expert system has five parts; remember that the knowledge base stores while the inference engine reasons, and the explanation system is what makes the conclusions usable. Machine learning differs from an ordinary program in that it gets better from data without being reprogrammed.

← Sensors, monitoring and control · All IGCSE Computer Science lessons · Practice IGCSE Computer Science questions (free, instant scoring) · Decomposition and design tools →