Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

astar_visualizer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astar_visualizer

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

A* Visualizer

A Visualizer* is an interactive application to visualize the A* pathfinding algorithm in a grid with obstacles. The heuristic function used is the Manhattan distance.

It uses the Gosu game development library.

Demo

Install

To install this ruby gem, use the gem command:

gem install astar_visualizer

Usage

To launch the A* Visualizer, use this command:

astar-visualizer

You can also use the irb environment:

require 'astar_visualizer'
AStar.new.show

You can also choose the size of the grid:

astar-visualizer SIZE

SIZE must be a number between 10 and 100 (default: 50).

It will open a window with the grid. Then:

  1. Left click on a node to choose the start node.
  2. Left click on another node to choose the end node.
  3. Left click on nodes to put obstacles. Right click on them if you want to remove them.
  4. Press ENTER to launch the A* algorithm. If a path is found, the path is colored in yellow and the visited nodes in cyan.
  5. Press SUPPR to clear the window.

Author

Quentin Deschamps

License

MIT

FAQs

Package last updated on 11 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc