What AI is and its characteristics
Artificial intelligence (AI) is a branch of computer science that deals with the simulation of intelligent behaviour by computers. The computer behaves in a way we would call clever if a person did it.
AI has three main characteristics.
1. The collection of data and the rules for using that data. The system stores facts and rules about how to use them.
2. The ability to reason. It can use its rules and data to reach a conclusion or make a decision.
3. It can learn and adapt. Some AI systems change their own rules or data as they get new experience.
e.g.ExampleA sat-nav app collects live traffic data (data), applies rules about speed and distance (rules), works out the fastest route (reasoning), and changes the route when a road is blocked (adapting).
!Watch outNot every AI system can learn. An expert system reasons with fixed rules. Machine learning is the kind that learns and adapts.
Expert systems: the four parts
An expert system is an AI program that copies the knowledge and decisions of a human expert in one subject, such as a doctor or a car mechanic.
It has four parts. Cambridge expects all four.
e.g.ExampleA car fault-finding expert system:
Knowledge base: "A flat battery stops the engine turning over."
Rule base: IF engine does not turn over AND lights are dim THEN battery is probably flat.
Interface asks: "Does the engine turn over?" User: No. "Are the lights dim?" User: Yes.
Inference engine applies the rule and concludes: battery is probably flat (90% likely).
Interface shows the conclusion and explains which answers led to it.
?Why?Keeping facts (knowledge base) apart from the logic (rule base) means experts can add new facts or rules without rewriting the program.
How an expert system reaches a conclusion
Try the expert toy. It finds out why a laptop will not start. Answer its Yes or No questions. When a rule fires, read How I decided to see which rules the inference engine used.
The system often gives a probability or confidence with each answer, for example "75% likely". It can also explain its reasoning, which helps the user trust it.
Uses include medical diagnosis, car and machine fault finding, mineral prospecting, financial planning and plant identification.
There is something to try for this step in the IGCSE library.
Machine learning
Machine learning is a type of AI where the program adapts its own processes and/or data as it is used. It is not given every rule by a programmer.
It is given lots of example data. It finds patterns in that data and builds its own way of making decisions.
As it gets more data and feedback, it changes itself and becomes more accurate.
e.g.ExampleAn email spam filter:
1. It is shown thousands of emails already marked "spam" or "not spam".
2. It finds patterns, such as certain words or senders, that appear in spam.
3. It uses those patterns to sort new emails.
4. When you mark a missed email as spam, it adapts and improves.
Other examples: video and music recommendations, face recognition on a phone, translation apps.
?Why?Some problems are too complex to write every rule by hand. It is easier to let the program learn the rules from examples.
!Watch outExpert system versus machine learning: an expert system's rules are written by people and stay the same. A machine learning system changes its own rules from data.