对TSP问题的遗传算法进行了cuda加速,对遗传算法的交叉、变异、生成子代的操作都有明显的性能提升。在交叉操作中需要不断地在亲代染色体中搜索子代的基因对应的位置,在交叉的核函数中定义了查找表优化了查找的效率。生成子代时采用了thrust基数排序对适应度进行排序并选出适应度高的个体生成新的种群。对于节点数、个体数、迭代次数分别为100、100、10000的TSP遗传算法,cpu耗时大约为60s,cuda加速后耗时为3.25s
最后生成的最短路如图:
Speed up TSP_GA problem using CUDA
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.