Assignment 1 for P. Hegarty CS193P (2013) Stanford course