A simple experiment for pathfinding in JavaScript