GithubHelp home page GithubHelp logo

som-tsp's Introduction

SOM-TSP

SOM-TSP is an attempt to solve the traveler problem using the self-organizing map algorithm, and the same was implemented in the project to solve the traveler problem using the dynamic programming algorithm. The performance of using these two methods is compared

Contributors

Yifan Liu (sc22yl) [@HaldenMemphis]

Yifan Huang (sc22yh) [@flash666404]

Litian Huang (sc22lh) [@Litian Huang]

Yibo Sun (ml21y5s) [@YIBOWAY]

[EN]

This repository implements an attempt to solve the traveler problem with the SOM algorithm In this SOM algorithm:

  • Use Euclidean distance as the competition mechanism
  • Use normal distribution as a reward for the winner node (winner-take-all)

DataSet

The dataset in the experiment was selected from a competition called 'Traveling Santa 2018 - Prime Paths' and the competiton was published in the website Kaggle. This is the link of the raw dataset: https://www.kaggle.com/competitions/traveling-santa-2018-prime-paths/data

The raw dataset includes a list of cities and their coordinates, this experiment was conducted with randomly selected data from the raw data.

How to Run?

All the code files needed to run the project are stored in the src directory, the dataset files are placed in the Data directory, and the corresponding full run results and partial text files are placed in the documents directory.

This project runs in anaconda environment. The anaconda runtime environment has been exported as the requirements.yaml file. Please use this file to create the anaconda environment to run the software.

To run this project, run the main function inside src/main.py. Where the input file is a formatted csv file, and different data can be selected by changing file_path. Of course, the learning rate, the maximum number of iterations, and the decrease rate can be modified by passing in the parameters in som_run.

[CN]

本存储库实现了SOM算法解决旅行商问题的尝试 在本SOM算法中:

  • 使用欧几里得距离作为竞争机制
  • 使用正态分布作为对胜利者节点的奖赏(赢家通吃)

如何运行?

本储存库的src目录下存有运行所需的所有代码文件,数据集文件被放置在Data目录下,相应的完整运行结果和部分文本文件被放置在documents目录下。

本项目在anaconda环境下运行,anaconda的运行环境已导出为requirements.yaml文件。请使用此文件创建anaconda环境以运行软件。

要运行此项目,请运行src/main.py 内的main函数。其中,输入文件为格式化的csv文件,可通过更改file_path来选择不同的数据。当然,学习率,最大迭代次数,和decrease rate可以通过som_run内的传入参数进行修改。

数据集

实验中的数据集是从一个名为 "Traveling Santa 2018 - Prime Paths "的比赛中选出的,该比赛发布在Kaggle网站上。这是原始数据集的链接:https://www.kaggle.com/competitions/traveling-santa-2018-prime-paths/data 原始数据集包括一个城市及其坐标的列表,本实验从原始数据中随机选择数据进行实验。

som-tsp's People

Contributors

flash666404 avatar haldenmemphis avatar liltim1022 avatar yiboway avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

liltim1022

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.