  Topological photonics revolutionizes some of the traditional approaches to
light propagation and manipulation, and it provides unprecedented means for
developing novel photonic devices. Recently discovered higher-order topological
phases go beyond the conventional bulk-edge correspondence for photonic
crystals and introduce novel opportunities for topological protection. Here, we
introduce an intelligent numerical approach for inverse design of higher-order
photonic topological insulators with great flexibility for controlling both
topological edge and topological corner states. In particular, we consider the
second-order photonic topological insulator and design several structures
supporting both edge and corner states at different frequencies. By carefully
programming these structures, we suggest a novel approach for topological
routing of the edge and corner states by changing the operational frequency.
Our finding paves the way to integrated topological photonic devices with novel
functionalities.
