Surface patterning has been widely utilized in structure enhancement, bionics, and surface lubrication. Drawing inspiration from the layer-by-layer forming principle of additive manufacturing and the Yin-Yang theory of traditional Chinese culture, we herein tailor patterned surfaces with various stripes of width using photosensitive polyimide and photosensitive polyimide-polytetrafluoroethylene composites that exhibit tough and lubricated properties by changing inks. To further optimize the self-lubricating surfaces, we present an accurate screening of the tribological data using machine learning (ML) and the optimized surfaces demonstrated the exceptional comprehensive properties. The combination of ML design and vat photopolymerization 3D printing is believed to enhance toughness and lubrication of surfaces, has the potential to the applications of the mechanical engineering, space equipment, and automobile manufacturing.