Solving the “Rotation” puzzle in stages

Introduction A few months ago (in June last year), I wrote a simple puzzle named “Rotation”  (play here) that involves rearranging a grid of jumbled-up numbers in order by rotating groups of numbers about. The player clicks on the cyan colored buttons in order to rotate the group of numbers immediately adjacent to it clockwise. In the…

2048 AI – The Intelligent Bot

Introduction In this article, we develop a simple AI for the game 2048 using the Expectimax algorithm and “weight matrices”, which will be described below, to determine the best possible move at each turn. The implementation of the AI described in this article can be found here. The source files for the implementation can be…

Solving Sudoku by Backtracking

In this project, we look at the backtracking algorithm to solve Sudoku puzzles. Here is the Javascript implementation of the backtracking algorithm that will be explained in this article. Getting back on track The primitive brute force approach is to fill up all of the blank spaces randomly with numbers from 1 to 9 until a valid…

Frequency Analysis Attack – Breaking the Substitution Cipher

The Substitution Cipher Perhaps the oldest and one of the simplest method of encrypting a message is to use the substitution cipher. What this cipher does is, as its name suggests, to simply substitute each character in the message with the character it is mapped to. In this article, we will examine substitution ciphers specifically…