Machine vision as state-space search