Artificial Intelligence (AI) algorithms are step-by-step methods or instructions that help machines perform tasks requiring human-like intelligence such as learning, decision-making, and problem-solving.
Explainable (Whitebox) Algorithms → Transparent and easy to understand.
Unexplainable (Blackbox) Algorithms → Complex and hard to interpret.
1. Explainable (Whitebox) Algorithms
Explainable (white-box) algorithms are models whose decisions can be easily understood by humans, with clear steps showing how the output is reached.
Example:
A rule-based traffic fine system:
If you exceed the speed limit by a certain amount, a fixed fine is applied. The rules are clear, and you can easily see how the decision (fine) was made.
a) Decision Trees
A decision tree is a model that works like a flowchart, where a series of yes/no questions are asked to reach a final decision or prediction.
Example: Identifying an animal:
Does it have feathers? → Yes → It’s a bird.
Does it have fur? → Yes → It’s a mammal.
Example: Deciding what to wear based on weather:
Is it raining? → Yes → Wear a raincoat
Is it raining? → No → Is it sunny? → Yes → Wear light clothes
Is it sunny? → No → Wear normal clothes
b) Linear Regression
Linear regression is a machine learning method that uses past data to find a straight-line relationship between variables and predict numerical values.
Examples of Linear Regression:
House price prediction: Bigger house size → higher price
Study vs marks: More study hours → higher score
Salary prediction: More experience → higher salary
Sales prediction: More advertising → more product sales
c) Rule-Based Systems
Rule-Based Systems:
Rule-based systems use a set of “if-then” rules to make decisions. These rules are written by humans to guide the computer on what action to take in different situations.
Example: In a game:
If there is an obstacle ahead → then jump
If enemy appears → then attack
If health is low → then hide or heal
If coin is found → then collect it
2. Unexplainable (Blackbox) Algorithms
Unexplainable (Black-box) Algorithms:
Black-box algorithms are advanced AI models whose internal decision process is hidden or too complex to understand clearly. We can see the input and output, but not how the result is produced.
Examples:
Face recognition in smartphones
YouTube or TikTok recommendation systems
Spam email detection
Self-driving car decision-making systems
Multiple Choice Questions (MCQs) on Artificial Intelligence Algorithms
1. What are AI algorithms?
a. Random computer games
b. Step-by-step methods for machines to perform intelligent tasks
c. Only hardware parts of a computer
d. Internet browsing tools
Answer: b. Step-by-step methods for machines to perform intelligent tasks
2. Which of the following is a feature of explainable (white-box) algorithms?
a. Hidden decision process
b. Difficult to understand
c. Transparent and easy to understand
d. No output is given
Answer: c. Transparent and easy to understand
3. What do black-box algorithms mean?
a. Simple and clear rules
b. Algorithms with visible steps
c. Complex models whose decision process is hard to understand
d. Manual calculations only
Answer: c. Complex models whose decision process is hard to understand
4. Which algorithm works like a flowchart with yes/no questions?
a. Linear Regression
b. Decision Tree
c. Black-box Model
d. Neural Network only
Answer: b. Decision Tree
5. Linear regression is mainly used to predict what type of values?
a. Text values
b. Images
c. Numerical values
d. Random outputs
Answer: c. Numerical values
6. Which is an example of linear regression?
a. Face recognition
b. Spam detection
c. House price prediction
d. Game controls
Answer: c. House price prediction
7. What is a rule-based system?
a. A system that learns without rules
b. A system using if-then rules written by humans
c. A system that works randomly
d. A system only for games
Answer: b. A system using if-then rules written by humans
8. In a game, what does "If obstacle ahead → then jump" represent?
a. Neural network
b. Rule-based system
c. Linear regression
d. Black-box model
Answer: b. Rule-based system
9. Which of the following is an example of a black-box system?
a. Traffic fine system
b. Decision tree
c. YouTube recommendation system
d. Simple calculator
Answer: c. YouTube recommendation system
10. What is true about decision trees?
a. They are always hidden models
b. They use random guessing
c. They use step-by-step decisions
d. They only work for images
Answer: c. They use step-by-step decisions
Test Yourself: Interactive MCQs (AI Algorithms)
1. What are AI algorithms?
2. What do AI algorithms help machines do?
3. What do explainable (white-box) algorithms mean?
4. What do black-box algorithms mean?
5. Which algorithm uses yes/no questions like a flowchart?