CSC 494 · Introduction to Artificial Intelligence
Our notes
2 min readMachine learning
A program learns if its performance at a task improves with experience (data). Kinds:
- Supervised: labelled examples (spam or not, house price).
- Unsupervised: find structure (clusters, topics).
- Reinforcement: learn by trial and reward (game playing, robot control).
The perceptron
A single artificial neuron: output = 1 if w₁x₁ + w₂x₂ + b > 0, else 0. Learning rule: w ← w + η (target − output) x, b ← b + η (target − output).
Worked example: learn AND with η = 1, starting w₁ = w₂ = 0, b = 0, taking the inputs in the order (1, 1), (0, 0), (0, 1), (1, 0) each pass.
- Input (1, 1), target 1: sum 0, output 0, error 1 → w₁ = 1, w₂ = 1, b = 1.
- Input (0, 0), target 0: sum 1, output 1, error −1 → b = 0.
- Continue cycling through all four inputs until a pass has no errors (the fifth pass here). Final weights: w₁ = 2, w₂ = 1, b = −2 (check: (1,1) → 1 > 0 ✓; (1,0) → 0, not > 0 ✓; (0,1) → −1 ✓; (0,0) → −2 ✓).
A single perceptron cannot learn XOR (not linearly separable), which is why multi-layer networks are needed.
Neural networks and deep learning
Layers of neurons with non-linear activations, trained by backpropagation and gradient descent. Deep learning uses many layers: CNNs for images, recurrent networks and transformers for language and sequences. Needs large data and computing power (GPUs).
Large language models (2020s)
Transformer networks trained on huge text collections to predict the next token, then tuned to follow instructions. They write, summarise, translate and code, but can produce false statements, reflect bias in their data, and need careful use.
Ethics of AI
| Issue | Example |
|---|---|
| Bias and fairness | a loan model trained on past decisions repeats past discrimination |
| Privacy | face recognition and data collection without consent (the Nigeria Data Protection Act 2023 sets rules for personal data) |
| Transparency | deep networks are hard to explain ("black boxes") |
| Accountability | who is responsible when an AI system causes harm? |
| Safety and misuse | deepfakes, scams, misinformation |
| Jobs | automation changes work; new skills needed |
| Academic integrity | submitting AI-written work as your own breaks university rules; use AI tools only as your course allows and acknowledge them |
Principles widely proposed: fairness, transparency, privacy, human oversight, safety, accountability.
Exams usually ask
- Distinguish supervised, unsupervised and reinforcement learning.
- Explain the perceptron and its learning rule; show why XOR needs more than one layer.
- Discuss ethical issues in AI with examples.
Common mistake
Treating machine learning output as objective. Models learn from data chosen by people; biased data gives biased results.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Machine learning
(opens en.wikipedia.org in a new tab)
Wikipedia, Machine learning, CC BY-SA 4.0 · licence
-
Perceptron
(opens en.wikipedia.org in a new tab)
Wikipedia, Perceptron, CC BY-SA 4.0 · licence
Watch
-
Best pick But what is a neural network? | Deep learning chapter 1
19 min · ≈ 86 MB · about ₦48
(opens youtube.com in a new tab)
-
AI, Machine Learning, Deep Learning and Generative AI Explained
10 min · ≈ 45 MB · about ₦25
(opens youtube.com in a new tab)
-
Neural Network In 5 Minutes | What Is A Neural Network? | How Neural Networks Work | Simplilearn
6 min · ≈ 27 MB · about ₦15
(opens youtube.com in a new tab)
-
The Essential Main Ideas of Neural Networks
19 min · ≈ 86 MB · about ₦48
(opens youtube.com in a new tab)
-
Super Simple Neural Network Explanation | Machine Learning Science Project
9 min · ≈ 41 MB · about ₦23
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.