A-maze-ing prms algorithm