1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] improve runtime of genetic algorithm python code

Discussão em 'Python' iniciado por Stack, Outubro 3, 2024 às 08:52.

  1. Stack

    Stack Membro Participativo

    I developed a genetic algorithm model with Python on Colab.

    There are pretty complicated parts especially whats related to the fitness function. So far the best results were reached when the population size is set to 160 and the number of generations equal 100.

    Is there a way to enhance it more to generate the same results faster? (Current runtime is approximately 5 hours)

    P.S. I tried to replace the for loops with vectorization but it didn't work because of datatypes error.

    Code can be accessed from here: https://colab.research.google.com/drive/1xEeVMoD9LU4ccxfVhz3U-s4mDRv5t3OX?usp=sharing

    Continue reading...

Compartilhe esta Página