Genomes as smart systems