Background: Tumor treating fields (TTFields) is an innovative cancer therapy utilizing electric fields to disrupt cell division, where stronger fields are more effective at inhibiting tumor cells. This study seeks to enhance TTFields ' effectiveness by optimizing electrode array 's position using an intelligent algorithm, thus increasing electric field intensity within the tumor region. Method: The study employed two representative real abdominal models of liver cancer patients. We utilized an improved white shark optimization (IWSO) algorithm to optimize the positions of four electrode arrays on the abdominal skin. The IWSO algorithm was enhanced through the integration of sinusoidal chaotic mapping, Levy flight strategy, and differential evolution. Furthermore, we utilized the finite element method to compute electric field intensity within tumor region as the objective function for the IWSO algorithm. Results: Experiments on two real abdominal modes demonstrate that the electrode arrays by our approach is superior to the default layout in terms of average electric field intensity ( E ave ), average power loss density ( P ave ), average current density ( C ave ), and the average treatment coverage of the tumor ATV1 to ATV3 . For Patient 1, the E ave , P ave , and C ave of the tumor area were improved by 46.71%, 106.33%, and 48.14%. For Patient 2, the E ave , P ave , and C ave of the tumor area increased by 11.86%, 22.09%, and 50.25%. Conclusion: This study demonstrates that optimizing the position of TTFields electrode arrays using the IWSO algorithm can effectively enhance the electric field intensity and treatment coverage of tumors, providing a more effective method for personalized TTFields treatment.