Cochlear implants (CIs) are neural prostheses that restore hearing by stimulating auditory nerve pathways within the cochlea using an implanted electrode array. Research has shown when multiple electrodes stimulate the same nerve pathways, competing stimulation occurs and hearing outcomes decline. Recent clinical studies have indicated that hearing outcomes can be significantly improved by using an image-guided active electrode set selection technique we have designed, in which electrodes that cause competing stimulation are identified and deactivated. In tests done to date, an expert is needed to perform the electrode selection step with the assistance of a method to visualize the spatial relationship between electrodes and neural sites determined using image analysis techniques. We propose to automate the electrode selection step by optimizing a cost function that captures the heuristics used by the expert. Further, we propose an approach to estimate the values of parameters used in the cost function using an existing database of expert electrode selections. We test this method with different electrode array models from three manufacturers. Our automatic approach generates acceptable active electrode sets in 98.3% of the subjects tested. This approach represents a crucial step toward clinical translation of our image-guided CI programming system.