Tips Main Katla, Ini Dia Tebakan Pertama Terbaik

Setelah permainan tebakan kata Wordle viral dan dimainkan jutaan orang, Indonesia punya versinya sendiri! Katla, adalah versi Indonesia dari game tersebut. Dibuat oleh Fatih Katlifa, game ini kini meramaikan jagat Twitter, TikTok, dan Instagram Indonesia.

Cara Bermain Katla

Cara bermain Katla cukup sederhana, sama seperti aturan Wordle. Mengutip dari situsnya, setiap tebakan harus merupakan kata valid 5 huruf sesuai KBBI dan pemain memiliki 6 kesempatan untuk menebak.

Setiap tebakan tentunya sangat berharga, terlebih jika kita bisa mendapat banyak petunjuk. Untuk itu, statistik dapat digunakan untuk memaksimalkan peluang memperoleh tebakan terbaik. Mari kita bahas!


Untuk pengolahan data, bahasa pemrograman yang akan digunakan adalah Python. Kata-kata yang digunakan diperoleh dari source code situs tersebut, kemudian disimpan dalam format .txt. Bagi yang tertarik untuk membaca cuplikan script Python-nya, dapat dilihat di artikel ini.

Selanjutnya, kita dapat menghitung jumlah kemunculan tiap alfabet pada daftar kata tersebut. Dengan menggunakan script Python, diperoleh hasil seperti gambar di bawah ini.

Statistik 1: Distribusi peluang kemunculan huruf

Dari grafik tersebut, dapat dilihat bahwa huruf ‘a’ adalah huruf yang paling mendominasi, dengan peluang kemunculan lebih dari 15%. Huruf selanjutnya yaitu ‘e’ dengan peluang kemunculan hampir 8%. Dengan hasil ini, kita dapat menyimpulkan bahwa dua huruf ini harus dimasukkan di awal tebakan kita.

Salah satu yang penting dari cara kita menebak adalah posisi huruf. Huruf ‘a’ pada awal kata tentu memiliki peluang yang berbeda dengan huruf ‘a’ pada urutan lain. Untuk itu, kita hrus meninjau peluang huruf tersebut muncul di tiap urutan.

Peluang muncul di Urutan Tertentu

Dari gambar di atas, dapat disimpulkan bahwa huruf ‘a’ paling sering muncul di urutan keempat pada sebuah kata. Meskipun huruf ‘a’ juga menjadi huruf yang paling sering berada di posisi kedua sebuah kata, tentu kita tidak ingin menggunakannya dua kali di awal tebakan kita. Huruf selanjutnya yang dapat kita pilih adalah ‘e’ di posisi kedua.

Tebakan Terbaik

Berdasarkan dua kriteria peluang tersebut, secara kasar kita dapat langsung menjumlahkan nilai peluangnya setelah dinormalisasi. Dengan menggunakan script Python, diperoleh kata terbaik untuk tebakan pertama adalah ‘serak’! Selanjutnya, untuk tebakan kedua, kita dapat menggunakan kata ‘pulih’.

Dengan menggunakan kombinasi dua kata ini, semoga anda dapat menebak kata dibalik teka-tekinya dengan mudah. Selamat bermain!

Jika anda tertarik dengan stastik serupa, anda dapat menonton video dari 3Blue1Brown. Di video tersebut, Grant membahas tentang metode penentuan tebakan pertama untuk Wordle berdasarkan Teori Informasi.

Magnetometer Calibration Using Levenberg-Marquardt Algorithm

Recently I worked on a magnetometer calibration method. This method is based on Levenberg-Marquardt Algorithm (LMA), a non-linear least-squares optimization algorithm. The method is implemented on ArduPilot and PX4, an open-source flight controller firmware.

I have to admit, formulizing mathematical notion from code is not straightforward. I spent several days to learn from LMA basic and finally understanding the sphere fit and ellipsoid fit algorithm.

In case you are wondering about the mathematical part, I write the formulation of the algorithm on PDF since it can’t be viewed on WordPress (unless I pay more for the plugin).

Click here for the document.

Python vs Julia: Speed Test on Fibonacci Sequence

Recently MIT released a course on Computational Thinking with code 18.S191 and it is available on YouTube. I can code in C++ and Python, so the founder’s claim that this code is as fast as C and as easy as Python gains my interest.

Introduction to Julia

Julia is created in 2009 and first introduced to public in 2012. The developers aimed for scientific computing, machine learning, data mining, and large-scale linear algebra. We might have heard this application on Python, but Julia gives advantages to programmer compared to Python.

Continue reading Python vs Julia: Speed Test on Fibonacci Sequence

Humanitarian Robotics: Autonomous Landmine Detection Rover

Although war is not happening, the dangerous impact is still tangible today. Landmine has been one of the threats left by the past wars, killing 15,000–20,000 people every year according to UN Mine Action Service. Demining efforts cost US$ 300–1000 per mine and imposing danger to people, resulting one person is killed and two are injured for every mines cleared.

HRATC 2017

Robot can be really helpful in solving this problem, as it is designed to do the “dull, dirty, dangerous, and difficult” tasks. In 2017, IEEE Robotics Automation Society’s Special Interest Group on Humanitarian Technology (RAS–SIGHT) held a competition. The competition was Humanitarian Robotics and Automation Technology Challenge (HRATC), held at the 2017 International Conference on Robotics and Automation (ICRA’17).

Autonomous Landmine Detection Rover
Continue reading Humanitarian Robotics: Autonomous Landmine Detection Rover

Text Extraction from a Table Image, using PyTesseract and OpenCV

Extracting text from an image can be exhausting, especially when you have a lot to extract. One commonly known text extraction library is PyTesseract, an optical character recognition (OCR). This library will provide you text given an image.

PyTesseract is really helpful, the first time I knew PyTesseract, I directly used it to detect some a short text and the result is satisfying. Then, I used it to detect text from a table but the algorithm failed perform.

Figure 1. Direct use of PyTesseract to Detect Text in a Table

Figure 1 depicts the text detection result, with green boxes enclosing the detected words. You may realized that most of the text can’t be detected by the algorithm, especially numbers. In my case, these numbers are the essentials of the data, giving me value of daily COVID-19 cases from a local government in my hometown. So, how extract these information?

Getting Started

When writing an algorithm, I always try to think as if I’m teaching the algorithm the way humans do. This way, I can easily put the idea into more detailed algorithms.

When you’re reading a table, the first thing you might notice is the cells. A cell might be separated from another cell using a border (lines), which can be vertical or horizontal. After you identify the cell, you proceed to read the information within. Converting it into algorithm, you may divide the process into three processes, namely cells detection, region of interest (ROI) selection, and text extraction.

Continue reading Text Extraction from a Table Image, using PyTesseract and OpenCV

List of Prime Numbers

Recently I had an interview for an internship position with Volocopter. It is an Urban Air Mobility (UAM) company based in Germany. As far as I know, this company is one of the most advance in UAM competition.

One part of the interview was an online coding. The interviewer asked me to “provide a list of all prime number up to 1000”. I found this question interesting as a there’s only one characteristic of a prime number.

Continue reading List of Prime Numbers