Skip to content

nickpenaranda/astar-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A* Test

screenshot

This is a barebones test/demonstration of the A* pathfinding algorithm, as described by Patrick Lester here.

Written in Java using Slick/LWJGL:

Copyright (c) 2011 Nick Penaranda. Distributed under the MIT License.

Instructions

  • Press SPACEBAR to generate a new map and randomize start/end locations

  • Left click to place a wall and right click to remove a wall. Adding and removing walls will automatically recalculate the path.

  • Mouse wheel up/down to adjust the heuristic (H) calculation weight. Increasing this value reduces the number of iterations required to find a solution, but also reduces the quality of the path (higher weight produces less optimal path)

  • Gray blocks are locations that the algorithm attempted, providing a rough indication of the amount of difficulty it had trying to produce the path.

Changelog

  • 19 Sep 2011
  • Added weight scaling via mousewheel
  • Display path info
  • (FIXED) Crash when mouseclick outside of grid

About

A* pathfinding algorithm tests in Java/Slick

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages