Code Monkey home page Code Monkey logo

tsp_ga's Introduction

TSP_GA算法加速

对TSP问题的遗传算法进行了cuda加速,对遗传算法的交叉、变异、生成子代的操作都有明显的性能提升。在交叉操作中需要不断地在亲代染色体中搜索子代的基因对应的位置,在交叉的核函数中定义了查找表优化了查找的效率。生成子代时采用了thrust基数排序对适应度进行排序并选出适应度高的个体生成新的种群。对于节点数、个体数、迭代次数分别为100、100、10000的TSP遗传算法,cpu耗时大约为60s,cuda加速后耗时为3.25s

CUDA计算结果

最后生成的最短路如图:

TSP_GA_result

tsp_ga's People

Watchers

buzepeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.