Coder Social home page Coder Social logo

travsalesman's Introduction

p_vs_np_challenge

P vs NP Challenge by @Sirajology on Youtube

Overview

This is the code for the 'Why is P vs NP Important?' challenge, given by @Sirajology on Youtube. The file 'main.py' holds several algorithms:

  • Nearest neighbor: Checks which city is closest to current city and appends it to the list.
  • Simulated annealing (info): Generates random paths and checks if the total distance is higher than the current best path.

Dependencies

  • Python 3+
  • Random

Usage

To run the demo code just run the following in terminal

python3 main.py

Challenge

The challenge for this function was to add one or several functions that determine the best path the 'traveling salesman' should/could take.

Credits

Credit for the vast majority of code here goes to westphal. I've merely created a wrapper around all of the important functions to get people started.

The credits for making the video (and for being awesome) go to @Sirajology on YouTube.

travsalesman's People

Contributors

mickvanhulst avatar

Watchers

James Cloos avatar Shahrukh Rao 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.