tsp

A library for cognitive science research on the traveling salesperson problem (TSP).

https://github.com/jackvandrunen/tsp

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 11 months ago · JSON representation ·

Repository

A library for cognitive science research on the traveling salesperson problem (TSP).

Basic Info
  • Host: GitHub
  • Owner: jackvandrunen
  • License: isc
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 473 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 6 years ago · Last pushed about 3 years ago
Metadata Files
Readme License Citation

README.md

tsp

A library for cognitive science research on the traveling salesperson problem (TSP). Documentation is hosted here. Built and maintained by Jack VanDrunen, with contributions from Mark Beers (github, linkedin).

Coming here from the Problem Solving textbook? Check out the quickstart demo, and the setting up a simple experiment demo.

Installation

Runs anywhere Python (3.8+) and Concorde can be installed.

First, you will have to download (and compile, if necessary) Concorde and its supporting libraries.

Then, clone and install this repository:

git clone https://github.com/jackvandrunen/tsp.git cd tsp python3 -m pip install .

And you're ready to go!

License

This work is dual-licensed under the ISC and the Copyfree Open Innovation License. You can choose between the two when you make use of the code. The intent is that you are free to use this code as you please (ISC), with explicit patent grant if you deem that necessary (COIL). COIL provides a more permissive alternative to the more popular Apache 2.0 license for that purpose.

SPDX-License-Identifier: ISC OR COIL-1.0

If you use our code for scientific work, we encourage you to cite it, including at least (1) our full names (Jacob VanDrunen and Mark Beers), (2), the title of the project ("tsp: A library for cognitive science research on the traveling salesperson problem"), and (3) the GitHub url (https://github.com/jackvandrunen/tsp).

Citations

This library accompanies the forthcoming book Problem Solving: Cognitive Mechanisms and Formal Models by Zygmunt Pizlo (Cambridge UP, 2022). It has been used to generate results for the following abstracts:

VanDrunen, J., Nam, K., Beers, M., and Pizlo, Z. "Traveling salesperson problem with simple obstacles: The role of multidimensional scaling and the role of clustering." Computational Brain and Behavior, 2022.

Pizlo, Z. and VanDrunen, J. "The status of mental representations in cognitive functions." Annual Interdisciplinary Conference, 2020.

VanDrunen, J. and Pizlo, Z. "The effectiveness of Multidimensional Scaling in TSPs whose metric is not Euclidean" (poster). Society for Mathematical Psychology, 2019.

The pyramid algorithm for approximating human solutions to TSP has been described in a number of papers, none of which precisely describe the algorithm implemented in this library. A paper describing the ancestor of our model:

Haxhimusa, Y., Kropatsch, W. G., Pizlo, Z., and Ion, A. "Approximative graph pyramid solution of the E-TSP." Image and Vision Computing 27 (2009), 887-896.

Other papers describing 3D TSP, not-Euclidean TSP with obstacles, and not-Euclidean TSP with colors:

Haxhimusa, Y., et al. "2D and 3D traveling salesman problem." The Journal of Problem Solving 3 (2011), 167-193.

Saalweachter, J. and Pizlo, Z. "Non-Euclidean traveling salesman problem." In Decision Modeling and Behavior in Complex and Uncertain Environments (Springer, 2008), 339-358.

Sajedinia, Z., Pizlo, Z., and Hélie, S. "Investigating the role of the visual system in solving the traveling salesperson problem." Cognitive Science Society, 2019.

Caveats

This code represents the accumulation of 4 years of technical debt, thanks to what I called when I worked at a startup, "demo-driven development." I have paid off some of it. The code is well-linted and well-documented. But for those entering into the rabbit-hole of development with it, a few caveats: (1) it lacks a systematic suite of integration tests to ensure there are no regressions still lurking around, (2) it very frustratingly uses numpy arrays in some areas and lists in others, and (3) it is computationally inefficient, despite some algorithms having theoretically-lower complexity bounds.

Oh, and (4) it still relies on Concorde, which is a notoriously difficult piece of software to install. I am happy to hear about any alternatives you can suggest.

Acknowledgements

Many thanks to Kevin Nam for tracking down innumerable bugs and usage difficulties, especially on Windows, and to Zyg Pizlo for guidance at every step of the development process. Early development was funded in part by a fellowship to JV from the Division of Undergraduate Education at the University of California, Irvine. A sizable portion of the development happened at Bad Coffee Costa Mesa, for whose existence I am also grateful. S.D.G.

Owner

  • Name: Jack VanDrunen
  • Login: jackvandrunen
  • Kind: user
  • Location: San Diego/Irvine

B.S. Computer Science (2020). Graduate student in Logic and Philosophy of Science at UC Irvine. Interested in machine learning and computational science.

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  tsp: A library for cognitive science research on
  the traveling salesperson problem
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Jacob
    family-names: VanDrunen
    email: jvandrun@uci.edu
    affiliation: 'University of California, Irvine'
    orcid: 'https://orcid.org/0000-0002-7719-8196'
  - given-names: Mark
    family-names: Beers
    affiliation: 'University of California, Irvine'
version: 0.2.0
date-released: 2022-07-08
url: "https://github.com/jackvandrunen/tsp"

GitHub Events

Total
Last Year

Dependencies

pyproject.toml pypi