The problem of an ensemble of repulsive particles on a potential-energy landscape is common to many physical systems and has been studied in multiple artificial playgrounds. However, the latter usually involve fixed energy landscapes, thereby impeding in situ investigations of the particles’ collective response to controlled changes in the landscape geometry. Here, we experimentally realize a system in which the geometry of the potential-energy landscape can be switched using temperature as the control knob. This realization is based on a high-temperature superconductor in which we engineer a nanoscale spatial modulation of the superconducting condensate. Depending on the temperature, the flux quanta induced by an applied magnetic field see either a geometrically frustrated energy landscape that favours an ice-like flux ordering, or an unfrustrated landscape that yields a periodic flux distribution. This effect is reflected in a dramatic change in the superconductor's magneto-transport. The thermal switching of the energy landscape geometry opens new opportunities for the study of ordering and reorganization in repulsive particle manifolds.