Rules or learning?
Artificial intelligence, or AI, is a computer system that imitates human intelligence, for example by recognising pictures, understanding speech or choosing a move. Some AI systems follow preprogrammed rules. A programmer writes the rules, and the computer follows them exactly. It does not learn anything new, so it can only answer what its rules cover. Other systems use machine learning. They are shown a very large number of examples and they find patterns in them. They then change their own rules as they learn, and they improve with more examples. So machine learning is one kind of AI, and an AI system that only follows fixed rules does not learn.
| Preprogrammed rules | Machine learning | |
|---|---|---|
| Who makes the rules? | the programmer | the system, from examples |
| Do the rules change? | only if a programmer changes them | yes, as it learns |
| Handles new things? | only what the rules cover | can cope with new examples, but may be wrong |
1question = input("Ask: ") 2if question == "hours": 3 print("Open 9 to 5") 4elif question == "address": 5 print("12 Example Road") 6else: 7 print("Sorry, I do not know")
Sorry, I do not know
| Typed | The program prints |
|---|---|
| hours | Open 9 to 5 |
| Hours | Sorry, I do not know |
Rules versus learning (no computer). Play “Rule robot”. One person is a robot with exactly four written rules (for example: “if you hear clap, jump”; “if you hear snap, spin”; “if you hear stamp, sit”; else “say sorry”). The others give commands. Does the robot ever invent a new rule? Then play “Learning robot”: the robot is not given rules, but shown ten examples of “good” and “bad” answers by a partner (for example, shown ten pictures of shapes called “yes” or “no”) and must guess a new picture. Discuss which robot can cope with something new, and which can be wrong. If you have a computer or tablet, ask an adult to help you run the pool helper program and try five questions.
1question = input("Ask: ") 2if question == "pool": 3 print("Open 7 to 9") 4elif question == "towels": 5 print("Hire at the desk") 6else: 7 print("Sorry, I do not know")