Coder Social home page Coder Social logo

assignment-2's Introduction

Genetic Algorithm

Assignment-2

Intro to AI: Assignment #2

Traveling Salesperson Problem with Genetic Algorithm

This project solves the Traveling Salesperson Problem (TSP) using a Genetic Algorithm. The goal of the TSP is to find the shortest route that a salesperson can take to visit a given set of cities and return to the starting city.

Setup and Usage

  1. Install the required dependencies by running pip install -r requirements.txt.

  2. Select python interpretor we used: python 3.11

  3. Run the Flask web application by running the sample-code.ipynb file by using jupyter notebook:

  4. Open your web browser and access the application at http://localhost:5678.

  5. The homepage provides an overview of the Traveling Salesperson Algorithm, explaining how it works and its applications.

  6. Click on the "See our Genetic Algorithm Results" button to view the results of the Genetic Algorithm applied to the TSP.

  7. The Genetic Algorithm implementation utilizes the genetic_algorithm.html template file and generates a plot of the best route using matplotlib.

  • sample-code.ipynb: Contains the Flask application code.
  • templates: Directory containing the HTML templates used by Flask.
  • templates/index.html: The main page template displaying information about the Traveling Salesperson Algorithm.
  • templates/genetic_algorithm.html: The template for displaying the results of the Genetic Algorithm.
  • static: Directory to store static files such as images.
  • static/plot.png: The plot image generated by the Genetic Algorithm.
  • requirements.txt: File specifying the project's dependencies.
  • README.md: This file providing an overview of the project.

assignment-2's People

Contributors

soldiermedic avatar jscastro197 avatar

Watchers

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