Computer Fundamentals and ApplicationsUnit 109 min read
AI Basics: Definitions, Techniques & Real-World Impact
Unit 10 of Computer Fundamentals and Applications covers core AI concepts—what AI is, its subfields (ML, NLP, robotics), how algorithms learn, and ethical considerations—with Nepalese and global examples (e.g., eSewa fraud detection, Pathao route optimization). Includes hands-on comparisons of rule-based vs. machine le
What is Artificial Intelligence?
Artificial Intelligence (AI) is the simulation of human intelligence in machines—programs that can perform tasks requiring human-like reasoning, learning, perception, or decision-making. Unlike traditional software (which follows fixed rules), AI systems improve with experience or adapt to new data.
Key Characteristics of AI:
mindmap
root((AI Characteristics))
Intelligence["Thinks & Learns"]
Reasoning["Logical problem-solving"]
Learning["Improves from data"]
Self-Correction["Adjusts mistakes"]
Human-Like["Mimics human traits"]
Perception["Sees/hears like humans"]
NaturalLanguage["Understands speech/text"]
Creativity["Generates new ideas"]
Autonomy["Operates independently"]
DecisionMaking["Chooses actions"]
Adaptation["Changes for goals"]
A simple neural network with 3 layers (input, hidden, output) and weighted connections. (Image: Dake, Mysid, CC BY 1.0, via Wikimedia Commons)
Subfields of AI
AI is divided into three major branches, each with distinct techniques and applications:
| Subfield | Definition | Key Techniques | Example Applications |
|---|---|---|---|
| Machine Learning (ML) | Systems learn patterns from data without explicit programming. | Supervised, Unsupervised, Reinforcement | Fraud detection (e.g., eSewa transactions), recommendation systems (e.g., YouTube "Recommended") |
| Natural Language Processing (NLP) | Machines understand, generate, or translate human language. | Tokenization, Sentiment Analysis, Chatbots | WhatsApp chatbots, Google Translate |
| Robotics | Physical machines that perceive and interact with the real world. | Sensors, Actuators, Path Planning | Pathao delivery robots, surgical robots |
Why it matters: Most real-world AI (e.g., Khalti’s risk scoring) uses ML, while NLP powers customer service (e.g., Ncell helpline bots).
How AI Works: Core Techniques
1. Machine Learning (ML) – Learning from Data
ML algorithms find patterns in data to make predictions or decisions. Three main types:
flowchart TD A["Machine Learning"] --> B["Supervised"] A --> C["Unsupervised"] A --> D["Reinforcement"] B --> B1["Labeled Data\n(e.g., spam/not spam)"] C --> C1["Unlabeled Data\n(e.g., customer segments)"] D --> D1["Trial & Error\n(e.g., game AI)"]
Worked Example: Predicting Loan Defaults (Nepalese Banks)
- Problem: A bank (e.g., Nabil Bank) wants to predict if a customer will default on a loan.
- Data: Past loan records (amount, income, credit score, repayment history).
- Algorithm: Logistic Regression (a supervised ML model).
- Steps:
- Train: Feed historical data (labeled as "default" or "no default").
- Predict: For a new applicant, the model outputs a probability of default (e.g., 85% → reject).
- Real Impact: Reduces bad loans, saving banks millions of NPR/year.
2. Neural Networks – The Brain of AI
Inspired by the human brain, neural networks process data through layers of interconnected nodes (neurons). Each connection has a weight that adjusts during learning.
Worked Example: eSewa’s OCR for Bill Payments
- Problem: Users upload handwritten electricity bills (NTC) to pay via eSewa.
- Solution: A Convolutional Neural Network (CNN) scans the image, extracts text, and matches it to the NTC database.
- Why CNN?: Specialized for image recognition (unlike general neural networks).
AI in the Real World
1. eSewa: Fraud Detection with ML
- AI Idea: Anomaly Detection (unsupervised ML).
- How it works: Monitors transactions in real-time. If a user suddenly sends 10x their usual amount to an unknown account, the system flags it as fraud.
- Impact: Blocks ~30% of fraudulent transactions in Nepal annually.
2. Pathao: Dynamic Pricing & Route Optimization
- AI Idea: Reinforcement Learning + Graph Algorithms.
- How it works:
- Pricing: Adjusts fares based on demand (e.g., surge pricing during Kathmandu traffic jams).
- Routing: Uses A algorithm* to find the fastest path, avoiding accidents or roadblocks (real-time data from Google Maps API).
- Impact: Reduces driver idle time by 25% and improves user satisfaction.
3. NEPSE: Stock Market Prediction
- AI Idea: Time-Series Forecasting (e.g., LSTM neural networks).
- How it works: Analyzes past stock prices, news sentiment (from Nepali newspapers), and global trends to predict NEPSE index movements.
- Impact: Helps traders make data-driven decisions (though not 100% accurate!).
AI vs. Traditional Programming
| Feature | Artificial Intelligence | Traditional Programming |
|---|---|---|
| Approach | Learns from data; improves over time. | Follows explicit, fixed rules. |
| Flexibility | Adapts to new situations. | Requires manual updates for changes. |
| Example | WhatsApp auto-replies (learns from past chats). | ATM withdrawal rules (fixed steps). |
| Data Dependency | Needs large datasets to train. | Works without data (just logic). |
| Error Handling | Corrects itself with more data. | Errors require programmer fixes. |
Visual Comparison:
stateDiagram-v2 [*] --> Traditional: "Fixed Rules" Traditional --> ATM: "Withdrawal: Check PIN → Check Balance → Dispense Cash" Traditional --> Error: "If PIN wrong → Block Card" [*] --> AI: "Learns from Data" AI --> Chatbot: "User: 'Hello'\nBot: 'Hi! How can I help?' (adjusts responses over time)" AI --> FraudDetection: "Detects new fraud patterns without reprogramming"
Advantages and Limitations of AI
✅ Advantages
- Automation: Reduces human error (e.g., NTC’s automated bill processing).
- Speed: Analyzes data faster than humans (e.g., Daraz’s inventory management).
- 24/7 Operation: No fatigue (e.g., Ncell’s customer service bots).
- Personalization: Tailors experiences (e.g., YouTube recommendations).
❌ Limitations
- Data Hunger: Needs large, clean datasets (Nepal’s AI struggles with limited data).
- Bias: Learns from biased data (e.g., facial recognition fails for darker skin tones).
- Lack of Common Sense: Struggles with ambiguous queries (e.g., "What’s the meaning of life?").
- Ethical Concerns: Privacy risks (e.g., AI tracking user behavior on Daraz).
Ethical Issues in AI
- Privacy: AI systems (e.g., Google’s search history tracking) collect vast personal data.
- Bias: If trained on biased data, AI can discriminate (e.g., hiring algorithms favoring certain universities).
- Job Displacement: Automation may replace roles (e.g., self-checkout kiosks replacing cashiers).
- Accountability: Who is responsible if an AI makes a mistake? (e.g., self-driving car accidents).
Nepalese Example:
- Problem: Nepal Police’s AI surveillance risks violating citizens’ privacy.
- Solution: Transparent laws on AI data usage are needed.
Exam Tip: How to Score Full Marks
Define AI clearly (1 mark):
"AI is the field of computer science that enables machines to perform tasks requiring human intelligence, such as learning, reasoning, and problem-solving."
Applications (4 marks):
- Healthcare: AI diagnoses diseases from X-rays (e.g., lung cancer detection).
- Transportation: Self-driving cars (e.g., Tesla’s Autopilot).
- Education: Adaptive learning platforms (e.g., Khan Academy’s AI tutors).
- Entertainment: Deepfake videos or AI-generated music (e.g., Boomy app).
Worked Examples (3–5 marks):
- Always show steps (e.g., for ML: data → training → prediction).
- Use Nepalese context (e.g., eSewa, NTC, banks).
Diagrams (2 marks):
- Draw a neural network or ML workflow if asked for a technique.
- Label all parts (input, hidden layers, output).
Compare AI vs. Traditional Systems (3 marks):
- Use the table above or a Venn diagram (if allowed).
Final Note: AI is everywhere—from your Khalti app to NTC’s smart meters. Focus on real-world examples and how AI solves problems, not just theory. Practice drawing neural networks and ML workflows for diagrams!
Based on the TU BCA syllabus for Computer Fundamentals and Applications (BCA101), unit 10.
Discussion
Loading…