Code Monkey home page Code Monkey logo

hamiltonian-paths's Introduction

Hamiltonian Paths and the Icosian Game

Try finding a Hamiltonian path/cycle in the planar dodecahedron Graph (Hamilton's Icosian game).

Run

First, clone this repository

git clone https://github.com/explorablesforsfi/hamiltonian-paths.git

Then change to the created directory and start a local webserver

cd hamiltonian-paths
python -m "http.server" 1313

Go to your browser and navigate to http://localhost:1313 .

hamiltonian-paths

Modify

Add your own graph as a json-file and load it in index_html as graph_url = './path/to/graph.js'. This file must be of the following structure:

{
  "links": [
    {
      "source": 0,
      "target": 1
    },
    {
      "source": 0,
      "target": 19
    },
    ...
  ],
  "nodes": [
    {
      "id": 0,
      "x": 0.9510565162951535,
      "y": -0.3090169943749474
    },
    {
      "id": 1,
      "x": 0.5877852522924732,
      "y": 0.8090169943749473
    },
    ...
  ]
}

License

All original code in this repository, i.e. all code which is not in the subdirectory /libs/ is licensed under the CC 4.0 licence. The subdirectory /libs/ contains external libraries which are licensed as follows

File name License Link to repository
d3.v5.min.js BSD 3-Clause "New" or "Revised" License d3
widget.v3.4.js permission to use given by D. Brockmann complexity explorables

hamiltonian-paths's People

Contributors

benmaier avatar lindenschneider avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.