Radiofrequency ablation (RFA) is a common cancer treatment modality for patients who are ineligible for open surgery. There is a need for RFA electrodes that generate heating zones that closely match the geometry of typical tumors, especially for endoscopic ultrasound-guided (EUS) RFA. In this paper, the procedure for optimization of an RFA electrode is presented. First, a novel compliant electrode design is proposed. Next, a thermal ablation model is developed to predict the ablation zone surrounding an RFA electrode in biological tissue. Then, a multi-objective genetic algorithm is used to optimize two cases of the electrode geometry to match the region of destructed tissue to a spherical tumor of specified diameter. This optimization procedure is applied to an EUS-RFA ablation of pancreatic tissue. For a target 2.5cm spherical tumor, the optimal design parameters of the compliant electrode design were found. After simulating 40 generations of 50 designs per generation, both cases converged to optimal solutions. The objective functions were useful for simple electrode designs. For more complex electrode designs, the objective functions were unable to direct the design toward a 2.5cm sphere. The results of the optimization demonstrate how computational models combined with optimization can be used for systematic design of ablation electrodes. The optimization procedure may be applied to RFA of various tissue types for systematic design of electrodes that generate spherical ablation zones.