Misi hari ini: buat Prediktor kelompok kalian
Misi 1 (8 menit)
- Pakai skenario Jarak dan waktu tempuh.
- Klik Terlalu kecil, lalu Latih GD. Amati bola merah.
- Klik Pas, lalu Latih GD.
- Klik Terlalu besar, lalu Latih GD.
- Klik Jalankan GA. Bandingkan error dan jumlah evaluasi.
Misi 2 (13 menit)
- Pilih skenario lain atau Skenario sendiri (isi nama, label, dan satuan).
- Isi 6 sampai 10 titik data. Boleh lewat tabel atau klik grafik.
- Latih GD dengan Pas.
- Klik Jalankan 5 kali untuk GA.
- Coba prediksi 2 atau 3 nilai x baru.
- Isi nomor kelompok dan satu kalimat kesimpulan di Kartu Hasil.
Tantangan tambahan
- Tambah satu titik pencilan yang jauh dari pola. Bagaimana GD dan GA bereaksi?
- Coba populasi 6 dan generasi 5. Seberapa jauh dari jawaban terbaik?
- Cari learning rate terkecil yang masih mencapai selisih di bawah 10% dalam 50 langkah.
Data harus fiktif dan netral. Jangan memakai data pribadi atau nilai siapa pun.
Mission 1 (8 minutes)
- Use the Distance and travel time scenario.
- Click Too small, then Train GD. Watch the red ball.
- Click Just right, then Train GD.
- Click Too large, then Train GD.
- Click Run GA. Compare the error and the number of evaluations.
Mission 2 (13 minutes)
- Pick another scenario or Your own scenario (fill in the name, labels, and units).
- Enter 6 to 10 data points, in the table or by clicking the chart.
- Train GD with Just right.
- Click Run 5 times for GA.
- Try predicting 2 or 3 new x values.
- Fill in your group number and a one-sentence conclusion on the Result Card.
Extra challenges
- Add one outlier far from the pattern. How do GD and GA react?
- Try population 6 and 5 generations. How far are you from the best answer?
- Find the smallest learning rate that still gets the gap below 10% within 50 steps.
Data must be fictional and neutral. Do not use personal data or anyone's grades.
Data dan Model
Klik grafik untuk menambah titik data. Model: y = w·x + b.
Lanskap Error
Arahkan atau klik peta untuk mencoba satu pasangan (w, b).
Latih Model
Cara 1: Gradient Descent (GD)
Cara 2: Algoritma Genetika (GA)
Tabel Data
| No | x | y |
|---|
Prediksi
Tiga prediksi terakhir otomatis masuk ke Kartu Hasil.
Kartu Hasil
Panduan Peserta: Prediktor, Dua Cara Belajar
Apa yang kita lakukan hari ini? Kita membuat alat prediksi sederhana. Modelnya garis lurus y = w·x + b. Mesin dikatakan "belajar" ketika ia mencari pasangan w (kemiringan) dan b (titik potong) yang membuat error paling kecil. Kita melatihnya dengan dua cara, lalu membandingkan hasilnya.
- Cara 1, Gradient Descent (GD): mengikuti kemiringan error menuju lembah. Cepat, tapi sensitif terhadap learning rate.
- Cara 2, Algoritma Genetika (GA): sekumpulan tebakan diseleksi, dicampur, dan dimutasi dari generasi ke generasi. Tidak butuh kemiringan. Hasilnya bisa sedikit berbeda setiap kali dijalankan.
Tidak perlu menulis kode. Semua berjalan di browser, juga tanpa internet setelah halaman pernah dibuka. Tombol EN di kanan atas mengganti tampilan ke bahasa Inggris.
Misi 1 (8 menit): kenali dua cara
- Di tab Praktik, pakai skenario Jarak dan waktu tempuh (atau klik Siapkan Misi 1).
- Klik Terlalu kecil, lalu Latih GD. Bola merah merayap pelan.
- Klik Pas, lalu Latih GD. Bola turun ke lembah dan mendekati bintang.
- Klik Terlalu besar, lalu Latih GD. Bola melompat makin jauh dan error membesar.
- Klik Jalankan GA. Titik hijau tosca berkumpul menuju bintang. Bandingkan jumlah evaluasinya dengan GD.
Misi 2 (13 menit): Prediktor kelompok kalian
- Pilih skenario lain atau Skenario sendiri. Isi nama skenario, label, dan satuan x serta y.
- Isi 6 sampai 10 titik data fiktif di tabel, atau klik grafik untuk menambah titik.
- Latih GD dengan Pas.
- Klik Jalankan 5 kali untuk GA. Lihat terbaik, terburuk, dan rata-ratanya.
- Di kotak Prediksi, coba 2 atau 3 nilai x baru.
- Isi nomor kelompok dan satu kalimat kesimpulan di Kartu Hasil, lalu nyalakan Mode Presentasi jika akan tampil.
Macet? Klik Pakai preset. Ingin mengulang dari awal? Klik Reset.
Arti setiap kontrol
- Error (MSE)
- Rata-rata kuadrat selisih antara tebakan garis dan data asli. Makin kecil makin pas. Satuannya satuan y dikuadratkan.
- Lanskap Error
- Peta semua pasangan (w, b). Warna terang berarti error kecil, gelap berarti error besar. Bintang emas adalah jawaban terbaik, yang bisa dihitung langsung karena modelnya kecil.
- Learning rate
- Ukuran langkah GD. Terlalu kecil membuat lambat, terlalu besar membuat bola melompat dan error membesar.
- Jumlah langkah
- Berapa kali GD melangkah.
- Ukuran populasi
- Banyaknya tebakan (w, b) dalam satu generasi GA.
- Jumlah generasi
- Berapa kali populasi diperbarui.
- Laju mutasi
- Peluang setiap anak digeser sedikit secara acak. Rendah membuat populasi cepat seragam, tinggi membuat pencarian lebih menyebar.
- Seed
- Angka awal pengacak. Seed yang sama selalu memberi hasil yang sama, sehingga hasil bisa diulang.
- Evaluasi
- Berapa kali error dihitung. GD: satu kali per langkah. GA: ukuran populasi dikali jumlah generasi. Dipakai untuk membandingkan secara adil.
Cara membaca Kartu Hasil
- GD: pengaturan learning rate dan langkah, error akhir, serta selisihnya dengan jawaban terbaik.
- GA 5 kali: error terbaik, terburuk, dan rata-rata dari lima seed berbeda. Selisih dalam persen menunjukkan seberapa jauh dari jawaban terbaik.
- Jawaban terbaik: error dari rumus pasti, sebagai kunci jawaban.
- Prediksi: contoh pemakaian model untuk nilai x baru.
- Kesimpulan: satu kalimat dari kelompok kalian.
Catatan kejujuran tentang metaheuristik
Algoritma genetika dan metaheuristik lain tidak menjamin jawaban terbaik. Mereka memberi jawaban yang cukup baik dalam waktu yang wajar. Karena itu kita menjalankannya beberapa kali dan melaporkan hasil terbaik, terburuk, dan rata-ratanya apa adanya. Untuk garis lurus, jawaban terbaik bisa dihitung dengan rumus. Metaheuristik berguna untuk masalah yang tidak punya kemiringan, misalnya menyusun urutan rute perjalanan.
Pertanyaan lanjutan dan kanal resmi
Pertanyaan yang belum terjawab bisa disampaikan ke presenter setelah sesi atau lewat kanal resmi Computing Laboratory:
- Instagram: @computing.lab
- Situs: computinglab.tech
Pindai untuk membuka alat ini di perangkat lain.
Alat ini tidak mengumpulkan data apa pun. Isian hanya tersimpan di browser kalian sendiri.
Participant Guide: Prediktor, Two Ways to Learn
What are we doing today? We are building a simple prediction tool. The model is a straight line y = w·x + b. We say a machine "learns" when it searches for the pair w (slope) and b (intercept) that makes the error as small as possible. We train it in two ways and compare the results.
- Method 1, Gradient Descent (GD): follows the slope of the error down into the valley. Fast, but sensitive to the learning rate.
- Method 2, Genetic Algorithm (GA): a set of guesses is selected, mixed, and mutated from generation to generation. It needs no slope. The result can differ slightly every time it runs.
No coding needed. Everything runs in the browser, even without internet once the page has been opened. The ID button at the top right switches the display back to Bahasa Indonesia.
Mission 1 (8 minutes): meet the two methods
- On the Practice tab, use the Distance and travel time scenario (or click Set up Mission 1).
- Click Too small, then Train GD. The red ball crawls slowly.
- Click Just right, then Train GD. The ball drops into the valley and approaches the star.
- Click Too large, then Train GD. The ball jumps further and further away and the error grows.
- Click Run GA. The teal dots gather toward the star. Compare its number of evaluations with GD.
Mission 2 (13 minutes): your group's Predictor
- Pick another scenario or Your own scenario. Fill in the scenario name, and the labels and units for x and y.
- Enter 6 to 10 fictional data points in the table, or click the chart to add points.
- Train GD with Just right.
- Click Run 5 times for GA. Look at the best, worst, and average.
- In the Prediction box, try 2 or 3 new x values.
- Fill in your group number and a one-sentence conclusion on the Result Card, then turn on Presentation Mode if you will present.
Stuck? Click Use preset. Want to start over? Click Reset.
What each control means
- Error (MSE)
- The average of the squared differences between the line's guesses and the real data. Smaller means a better fit. Its unit is the y unit squared.
- Error Landscape
- A map of every (w, b) pair. Light colors mean small error, dark colors mean large error. The gold star is the best answer, which can be computed directly because the model is small.
- Learning rate
- The step size of GD. Too small makes it slow; too large makes the ball jump and the error grow.
- Number of steps
- How many steps GD takes.
- Population size
- How many (w, b) guesses are in one GA generation.
- Generations
- How many times the population is renewed.
- Mutation rate
- The chance that each child is nudged a little at random. Low makes the population converge quickly; high spreads the search out more.
- Seed
- The starting number for the random generator. The same seed always gives the same result, so results can be repeated.
- Evaluations
- How many times the error is computed. GD: once per step. GA: population size times generations. Used for a fair comparison.
How to read the Result Card
- GD: the learning rate and step settings, the final error, and its gap to the best answer.
- GA 5 runs: the best, worst, and average error from five different seeds. The percentage gap shows how far each is from the best answer.
- Best answer: the error from the exact formula, used as the answer key.
- Predictions: examples of using the model for new x values.
- Conclusion: one sentence from your group.
An honest note about metaheuristics
Genetic algorithms and other metaheuristics do not guarantee the best answer. They give a good-enough answer in a reasonable time. That is why we run them several times and report the best, worst, and average results as they are. For a straight line, the best answer can be computed with a formula. Metaheuristics are useful for problems that have no slope, such as ordering the stops of a travel route.
Further questions and official channels
Questions that were not answered can be brought to the presenters after the session or sent through Computing Laboratory's official channels:
- Instagram: @computing.lab
- Website: computinglab.tech
Scan to open this tool on another device.
This tool collects no data at all. Your input is stored only in your own browser.
Pseudocode
Ditulis dengan gaya umum supaya mudah dibaca. Notasinya tidak mengikuti notasi resmi mata kuliah tertentu.
Menghitung error
fungsi error(w, b)
total ← 0
untuk setiap titik (x, y) dalam data
tebakan ← w * x + b
total ← total + (tebakan - y)²
kembalikan total / banyak_data
1. Brute force di atas grid (w, b)
terbaik ← tak hingga
untuk w dari -2 sampai 4, naik 0,1
untuk b dari -2 sampai 4, naik 0,1
e ← error(w, b)
jika e < terbaik maka
terbaik ← e
simpan (w, b)
kembalikan (w, b) yang tersimpan
Kapan dipakai: saat kemungkinan jawabannya sedikit dan kita ingin memeriksa semuanya.
2. Gradient Descent
w ← w_awal
b ← b_awal
ulangi sebanyak jumlah_langkah kali
gw ← kemiringan error terhadap w // 2 × rata-rata((w*x + b - y) * x)
gb ← kemiringan error terhadap b // 2 × rata-rata(w*x + b - y)
w ← w - learning_rate * gw
b ← b - learning_rate * gb
jika error(w, b) membesar tak terkendali maka berhenti
kembalikan (w, b)
Kapan dipakai: saat error punya kemiringan yang bisa dihitung, seperti saat melatih model machine learning.
3. Algoritma Genetika
populasi ← N pasangan (w, b) acak
ulangi sebanyak jumlah_generasi kali
hitung error setiap individu
baru ← [individu dengan error terkecil] // elitisme
selama ukuran(baru) < N
induk_1 ← turnamen(populasi) // ambil 3 acak, pilih yang error-nya terkecil
induk_2 ← turnamen(populasi)
anak ← campuran(induk_1, induk_2) // crossover: nilai acak di sekitar kedua induk
dengan peluang laju_mutasi:
geser anak sedikit secara acak // mutasi
tambahkan anak ke baru
populasi ← baru
kembalikan individu dengan error terkecil
Kapan dipakai: saat kemiringan tidak ada atau sulit dihitung, misalnya menyusun urutan rute atau jadwal.
Pseudocode
Written in a generic style so it is easy to read. The notation does not follow any particular course's official notation.
Computing the error
function error(w, b)
total ← 0
for each point (x, y) in data
guess ← w * x + b
total ← total + (guess - y)²
return total / data_count
1. Brute force over a (w, b) grid
best ← infinity
for w from -2 to 4, step 0.1
for b from -2 to 4, step 0.1
e ← error(w, b)
if e < best then
best ← e
save (w, b)
return the saved (w, b)
When to use it: when there are only a few possible answers and we want to check all of them.
2. Gradient Descent
w ← w_start
b ← b_start
repeat number_of_steps times
gw ← slope of the error with respect to w // 2 × average((w*x + b - y) * x)
gb ← slope of the error with respect to b // 2 × average(w*x + b - y)
w ← w - learning_rate * gw
b ← b - learning_rate * gb
if error(w, b) grows out of control then stop
return (w, b)
When to use it: when the error has a slope we can compute, as when training a machine learning model.
3. Genetic Algorithm
population ← N random (w, b) pairs
repeat number_of_generations times
compute the error of every individual
next ← [individual with the smallest error] // elitism
while size(next) < N
parent_1 ← tournament(population) // pick 3 at random, keep the one with the smallest error
parent_2 ← tournament(population)
child ← blend(parent_1, parent_2) // crossover: a random value around both parents
with probability mutation_rate:
nudge the child a little at random // mutation
add child to next
population ← next
return the individual with the smallest error
When to use it: when there is no slope or it is hard to compute, for example ordering a route or a schedule.
Computing Laboratory
Laboratorium di Fakultas Informatika, Telkom University.
Fokus: Computational Intelligence dan optimasi, dengan competitive programming sebagai pondasi cara berpikir algoritmik.
Di Computing Laboratory, belajar dipandang sebagai optimasi, seperti gradient descent yang kalian coba hari ini. Lab mendalami metaheuristik, yaitu algoritma genetika, particle swarm optimization, ant colony optimization, simulated annealing, dan Komodo Mlipir Algorithm yang dikembangkan di Telkom University. Lab juga mendalami machine learning yang berpijak pada optimasi, sehingga tidak berhenti pada memanggil library.
Kaitan dengan Kelompok Keahlian DSIS
DSIS (Data Science and AI) membahas cara mengolah data dan membangun sistem yang bisa memprediksi atau mengambil keputusan. Hampir setiap model dilatih dengan mencari pengaturan terbaik, dan itu adalah masalah optimasi. Prospek karier yang terkait: Data Scientist, Machine Learning Engineer, dan AI Engineer.
Topik publikasi lab tahun 2026
- Bias warna kulit pada AI dermatologi.
- Small language model terkuantisasi 4-bit dengan prompting CoT dan PoT.
- Video-LLM yang dapat dijalankan di perangkat edge.
- Algoritma hybrid bee colony untuk rekomendasi rencana perjalanan.
Kanal resmi
- Instagram: @computing.lab
- Situs: computinglab.tech
Computing Laboratory
A laboratory in the Faculty of Informatics, Telkom University.
Focus: Computational Intelligence and Optimization, with competitive programming as the foundation of algorithmic thinking.
At Computing Laboratory, learning is treated as optimization, like the gradient descent you tried today. The lab works on metaheuristics: genetic algorithms, particle swarm optimization, ant colony optimization, simulated annealing, and the Komodo Mlipir Algorithm developed at Telkom University. The lab also works on machine learning grounded in optimization, going beyond only calling libraries.
How it relates to the DSIS Expertise Group
DSIS (Data Science and AI) is about processing data and building systems that can predict or make decisions. Almost every model is trained by searching for the best settings, and that is an optimization problem. Related career paths: Data Scientist, Machine Learning Engineer, and AI Engineer.
The lab's 2026 publication topics
- Skin-tone bias in dermatology AI.
- 4-bit quantized small language models with CoT and PoT prompting.
- Edge-deployable video-LLMs.
- A hybrid bee colony algorithm for itinerary recommendation.
Official channels
- Instagram: @computing.lab
- Website: computinglab.tech