Giter Site home page Giter Site logo

visualizer's Introduction

Path Finding Algorithm

This program shows the shortest path between two point
Instruction:

  1. left click to create two points to find the shortest path (2 times)
  2. drag left click to draw a obsticle line
  3. right click to erase those two points or point from line (click/drag)
  4. space bar to show result
  5. c to clear path
  6. r to restart
  7. n to generate random obstacles
  8. m to generate maze
  9. a to use A* Algorithm
  10. b to use BFS Algorithm
  11. d to use Dijkstra Algorithm

Usage:

>> python Path.py

Roomba Path Finding

This program shows the shortest path between two point in the map
Using a Image_Grid.py to create grid from map.png

Instruction:

left click to select a position and perform a shortest path

Usage:

>> python Roomba.py

Sort Algorithm

This program compares the sorting algorithms
Instruction:

  1. Space Bar to show result
  2. R to reset
  3. A to set to ascending order
  4. D to set to descending order
  5. I to use Insertion Sort Algorithm
  6. B to use Bubble Sort Algorithm
  7. S to use Selection Sort Algorithm
  8. E to use Shell Sort Algorithm
  9. H to use Heap Sort Algorithm
  10. M to use Merge Sort Algorithm
  11. Q to use Quick Sort Algorithm

Usage:

>> python Sort.py

Sudoku

This program generates sudoku board and its solution
Use Sudoku_Solver.py in utils to solve online sudoku automatically

Note: You have 5 seconds to move your cursor to Top Left corner of the board

Usage:

>> cd utils
>> python Sudoku_Solver.py

To use GUI, please follow the instruction below:

Instruction:

  1. Click to select the grid
  2. 1-9 to sketch number and Enter to confirm
  3. Del to delete sketch
  4. I to view instruction
  5. C to clear all sketch
  6. R to reset board
  7. N to create new game
  8. Space Bar to show solution (sketch)
  9. , , , to navigate through grid

Usage:

>> python Sudoku.py

Tic Tac Toe

Minimax algorithm: backtracking decision making to find the optimal move
Instruction:

  1. Click grid to place your mark (X/O)
  2. g to change gamemode (pvp/ai)
  3. 0 to change ai level to 0 (random algorithm)
  4. 1 to change ai level to 1 (minimax algorithm)
  5. r to restart the game

Usage:

>> python XO.py

Container With Most Water

This program visualizes the Container With Most Water problem in LeetCode
Instruction:

  1. Type height array in Height Entry then Add to display
  2. New to clear all of the canvas graph and title
  3. Save to save plotted graph in assets folder
  4. Undo to pop the last histogram
  5. Redo to append the last popped histogram
  6. Annotate to switch between on/off of histogram height visualize
  7. Water to switch between on/off of water container visualize
  8. Random Histogram to random generate (5-100) histogram's height
  9. Normal Distribution to generate normal distribution with random mean and std

Usage:

>> python Container.py

Minimum Cost to Connect All Points

This program visualizes the Minimum Cost to Connect All Points problem in LeetCode
Instruction:

  1. Type x array in X Entry
  2. Type y array in Y Entry
  3. Add to display minimum spanning tree
  4. New or Clear to clear all of the canvas graph and title
  5. Save to save plotted graph in assets folder
  6. Undo to pop the last x, y
  7. Redo to append the last popped x, y
  8. Random MST to random generate minimum spanning tree

Usage:

>> python MST.py

Regression

This program visualizes the Regression graph in form of linear, non-linear, and logistic
Instruction:

  1. Type x array in X Entry
  2. Type y array in Y Entry
  3. Add to display regression graph
  4. Save to save graph in assets folder
  5. Clear to clear all of the canvas graph and title
  6. Select model to display in canvas graph and title

Usage:

>> python Regression.py

Prime Factors

This program visualizes the Prime Factors in form of bar graph
Instruction:

  1. Type a positive number
  2. Plot Factors to visualize prime number

Usage:

>> python Prime_Factor.py

N-Puzzle

This program visualizes the 8-Puzzle solved using A* Search,
Use N_Puzzle.ipynb to animate the solution
Instruction:

  1. Create an animation that illustrates each steps in solution
  2. Return None if there is no such solution
  3. 0 represents empty slot that should be in top left corner
  4. Plot each steps in subplots

Example:

Initial state of game:
+---+---+---+
| 1 | 6 | 0 |
+---+---+---+
| 7 | 2 | 4 |
+---+---+---+
| 8 | 5 | 3 |
+---+---+---+

Expected final state:
+---+---+---+
| 0 | 1 | 2 |
+---+---+---+
| 3 | 4 | 5 |
+---+---+---+
| 6 | 7 | 8 |
+---+---+---+

Usage:

>> python Puzzle.py

Mathematics Expression

This program display a list of math expression solution for every number from 0 to result using a combination of + - * / % ** // operators and list of input numbers
Instruction:

  1. Enter a list of numbers (e.g., 3 7 5 9)
  2. Enter a result number (e.g., 10)

Usage:

>> python Math_Expression.py

Example:

Enter numbers: 3 7 5 9
Enter result: 10

0  = ((3 + (7 - 5)) // 9)
1  = ((3 + (7 + 5)) // 9)
2  = ((3 + (7 * 5)) % 9)
3  = (3 + ((7 - 5) // 9))
4  = (3 + ((7 + 5) // 9))
5  = (3 + (7 - (5 % 9)))
6  = (3 + (7 + (5 - 9)))
7  = (3 + ((7 ** 5) % 9))
8  = (((3 - 7) // 5) + 9)
9  = (((3 + 7) % 5) + 9)
10 = (3 + (7 + (5 // 9)))

Resource

visualizer's People

Contributors

bhuribhat avatar

Watchers

Kostas Georgiou 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.