Finding Pixel Flow levels with a 768-bit RGB pHash visual search
I’m a big fan of the game Pixel Flow, but I often find myself getting completely stuck on specific levels. Because it is a purely visual grid game, you cannot simply search for a solution using tex...

Source: DEV Community
I’m a big fan of the game Pixel Flow, but I often find myself getting completely stuck on specific levels. Because it is a purely visual grid game, you cannot simply search for a solution using text. To solve this, I built a reverse image search engine specifically designed to find level solutions based on a screenshot. The challenge was figuring out how to do image matching quickly, accurately, and without heavy infrastructure. Here is how I approached the technical side: Multi-Channel pHash (Per-Channel RGB) Most perceptual hashing (pHash) implementations convert an image to grayscale before processing. However, in a game like Pixel Flow, color is the primary piece of information. Discarding color would mean losing the ability to distinguish between levels with similar layouts but different color palettes. To fix this, I split the image into its Red, Green, and Blue channels and computed a 256-bit pHash for each channel independently. Combining into a 768-Bit Fingerprint After genera