The development of phononic crystals,especially their interaction with topological insulators,allows exploration of the anomalous properties of acoustic/elastic waves for various applications.However,rapidly and inversely exploring the geometry of specific targets remains a major challenge.In this work,we show how machine leaming can address this challenge by studying phononic crystal beams using two different inverse design schemes.We first develop the theory of phononic beams using the transfer matrix method.Then,we use the reinforcement learning algorithm to effectively and inversely design the structural parameters to maximize the bandgap width.Furthermore,we employ the tandem-architecture neural network to solve the training-difficulty problem caused by inconsistent data and complete the task of inverse structure design with the targeted topological properties.The two inverse-design schemes have different adaptabilities,and both are characterized by high effi-ciency and stability.This work provides deep insights into the combination of machine learning,topological property,and phononic crystals and offers a reliable platform for rapidly and inversely designing complex material and structure properties.