Pillared surfaces are the products of a surface modification technique that allow the implementation of active control methods by an outer source such as magnetic fields. Pillar arrays with magnetic tips exhibit different characteristics depending on the initial positional arrangement of the pillars and/or the environmental magnetic field conditions. This study develops methods for simulation and parameter optimization by machine learning to aid the investigation of pillar behaviors in various combinations of initial positions and magnetic fields. Optimization is performed using the co-variance adaptation evolution strategy (CMA-ES). The algorithm is tested to obtain preliminary results: (1) the maximum size of the pillar pitch at a given magnetic field; (2) the initial pillar arrangement of a 3-pillar unit cell and three settings of applied magnetic field-each corresponds to a predefined contact state of a three-stage paring pattern.