Skip to content
IGCSE·Tuition
Computer Science · Lessons

Explain a simple decision model

A system that decides can sound mysterious until you list its inputs, its rules and its output.

On this page
  1. How do you build the model?
  2. Worked example
  3. The mistake to watch for
  4. Check yourself
  5. Where this leads next

A simple decision model has three parts: inputs, rules and an output. To explain a decision, you say which inputs were read, which rule applied, and what the system did as a result.

This lesson follows feedback and fixed sequences and is part of automation and emerging systems. It matters because explanation questions give marks for linking the rule to the specific values in the scenario.

How do you build the model?

  1. List the inputs and the units or states they can take.
  2. Write each rule as a condition and an output.
  3. Check the rules cover every case, including the boundary values.
  4. Show it as a table or as IF statements, whichever the question asks for.

Worked example

An irrigation controller has two inputs: soil moisture (a number from 0 to 100) and whether rain is expected (yes or no). It waters only when the soil is dry, meaning moisture below 40, and no rain is expected.

IF moisture < 40 AND rainExpected = "no"
   THEN
      pump ← "ON"
   ELSE
      pump ← "OFF"
ENDIF
moisturerain expectedmoisture < 40pump
35notrueON
35yestrueOFF
55nofalseOFF
40nofalseOFF

Explaining row 2 in an answer: “The moisture is 35, which is below 40, so the soil is dry. But rain is expected, so the second condition is false. Both conditions must be true for the pump to run, so the pump stays OFF.”

Explaining row 4: a reading of exactly 40 is not below 40, so the soil counts as not dry and the pump stays OFF.

The mistake to watch for

A common slip is to read AND as OR.

Mistaken answer: for moisture 35 with rain expected, the pump is ON, “because the soil is dry”.

The student applied only one condition.

With AND, both conditions must be true. With OR, the pump would run whenever either condition held, which would also water in the rain-expected case and defeat the purpose. Check each condition separately, then combine the results with the operator.

Check yourself

1. Using the same rule, give the pump state for moisture 12, rain expected “no”.

Show answer

12 < 40 is true and rain is “no”, so both conditions hold. The pump is ON.

2. Using the same rule, give the pump state for moisture 39, rain expected “yes”, and explain.

Show answer

39 < 40 is true, but rain expected is “yes”, so the second condition is false. With AND, the whole condition is false. The pump is OFF.

3. A gate controller opens when a card is valid AND the gate sensor reports it is closed. The card is valid and the gate is already open. What does it do, and why?

Show answer

The gate does nothing. The card is valid (true), but “gate is closed” is false because it is already open. With AND, the whole condition is false.

Where this leads next

A model is only as good as the data it reads, which is the subject of assessing data quality in an automated system. To try your explanations on new cases, run rules through the pseudocode trace trainer.

If you want a teacher to read your written explanations and tighten them, see one-to-one Computer Science tuition.

Questions people ask

What is a decision model in this topic?

It is a clear description of how a system turns inputs into an action: the inputs it reads, the rules it applies and the output it gives. A decision table or a set of IF statements can show it. It is simple enough to trace by hand.

How do I explain a decision in an exam answer?

Name the inputs, state the rule with its values, say which condition is true for the given case, then give the resulting output. Using the actual numbers from the question shows you have applied the rule rather than just recited it.

Can a decision model be wrong?

Yes. It only follows its rules and the data it receives. If a rule is badly chosen or the input is poor, the output can be wrong even though the system ran perfectly. The next lesson looks at the data side.

Updated:

Your next step

If you can read a rule but struggle to explain a decision in full sentences, a one-to-one teacher can mark your explanations line by line and show what a complete answer contains.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service