Skip to content

Instantly share code, notes, and snippets.

@hmrm
hmrm / README.md
Last active August 29, 2015 14:01 — forked from mbostock/.block

Wilson’s algorithm uses loop-erased random walks to generate a uniform spanning tree — an unbiased sample of all possible spanning trees. Most other maze generation algorithms, such as Prim’s, random traversal and randomized depth-first traversal, do not have this beautiful property.

The algorithm initializes the maze with an arbitrary starting cell. Then, a new cell is added to the maze, initiating a random walk (shown in magenta). The random walk continues until it reconnects with the existing maze (shown in white). However, if the random walk intersects itself, the resulting loop is erased before the random walk continues.

Initially, the algorithm can be frustratingly slow to watch, as the early random walks are unlikely to reconnect with the small existing maze. However, as the maze grows, the random walks become m

@hmrm
hmrm / gist:4596188
Created January 22, 2013 16:49
Project idea for mobile computing

#Mobile Project Idea# Discoverable topic-specific status-message conversation-starters.

##Approximate Functionality##

  1. Each user has a set (perhaps changing) of 'topic : status' pairs.
  2. Users detect other users in the immediate area using the app
  3. If a pair of users are in proximity and have a shared topic, the get a 'match' and can view the statuses associated with that topic

##Additional Functionality Ideas##

  1. Alert for first time match or rare match