Skip to content

smhenderson89/NameDistance_NextJS

Repository files navigation


Name Distance - Determine shortest path on a keyboard using the A* (A star) algorithm

https://name-distance.vercel.app/
Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. Acknowledgments

Project Inspiration

Alt text for basketball hoop gif

After watching a video from Stuff Made Here about using graph theory to build a basketball hoop where the shot always lands in, I was curious to more how to incorporate graph theory in my own project.

a-star-gif
Source: Wikipedia (License)

Seperately, I noticed that in some names on a keyboard, all the letters are adjacent to each other.

"DREW" can be spelled "D" -> "R" -> "E" -> "W", moving between letters adjacent to their corners.

But what about more complicated names like "SCOTT" or "WASHINGTON"? How could you determine the shortest path between the letters? How would you know where to go?

With these two ideas, I worked on this project to make a program that determine the shortest path for any name and give a final "distance" score for each name. What is the shortest path for each name depending on the name length?

(back to top)

Built With

(back to top)

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Roadmap

  • Stretch Goal: Add unit tests for current keyboards to assist for further keyboard additions
  • Stretch Goal: Account for other languages accented letters (Renée, Götz, etc. )
  • Stretch Goal: Heat map for each keyboard based on the optimal path and searched letters

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contact

Scott Henderson Github: https://github.com/smhenderson89

(back to top)

Acknowledgments

Stuff Made Here Youtube channel for inspiration (link)
Sebastian Lague for Astar Explaination (link)
Peter Froud
Daniel Therman

(back to top)