This work discusses the numerical calculation of the measure of entanglement by minimizing the Shannon entropy. This is an optimization problem and it becomes hard when the number of quantum levels of the system and the number of parts increase. A genetic algorithm is presented for calculating the measure of entanglement of qutrits.