Many-body physics of electron-electron correlations plays a central role in condensed mater physics, it governs a wide range of phenomena, stretching from superconductivity to magnetism, and is behind numerous technological applications. To explore this rich interaction-driven physics, two-dimensional (2D) materials with flat electronic bands provide a natural playground thanks to their highly localised electrons. Currently, thousands of 2D materials with computed electronic bands are available in open science databases, awaiting such exploration. Here we used a new machine learning algorithm combining both supervised and unsupervised machine intelligence to automate the otherwise daunting task of materials search and classification, to build a genome of 2D materials hosting flat electronic bands. To this end, a feedforward artificial neural network was employed to identify 2D flat band materials, which were then classified by a bilayer unsupervised learning algorithm. Such a hybrid approach of exploring materials databases allowed us to reveal completely new material classes outside the known flat band paradigms, offering new systems for in-depth study on their electronic interactions.