Controls:

  • Arrow keys: Scroll through options
  • Enter: Select option
  • Spacebar: Start new game
  • m: Back to main menu

How to Play:

This game can take a little practice to get a feel for, but it's a good mental exercise once you get into it.

In the top right corner of the screen, a 2x2, 4x4, or 8x8 greyscale grid will be displayed. In the top center of the screen, a second greyscale grid will be created by removing one frequency from the Discrete Cosine Transform (DCT) for the original grid. (If you are unfamiliar with DCTs, they are a variation of the Fourier Transform that can be used to convert a series of data points into a sum of cosine functions at different frequencies, which can be useful in applications such as image compression.) 

Your objective is to find which two-dimensional frequency from among the basis functions displayed in the bottom center of your screen was removed to get from the original (top left) grid to the new (top center) grid. Each time you make a guess, the new grid created by removing your selected frequency from the original will be displayed in the top right corner. Points are awarded based on how few guesses you use to correctly identify the missing frequency.

This game takes a little practice to get used to, so I would strongly recommend starting with the 2x2 grid and trying to get a feel for how the different frequencies affect the grid. (Even after practice, the 8x8 grid is very tough). Note that the greyscale grids are randomly selected, and some will be much easier to identify the missing piece from than others.

Source code: https://gitlab.com/karldeve/whats-your-cosine

Leave a comment

Log in with itch.io to leave a comment.