Added CUTOFF and DECAY parameters, and adjusted the weight by the depth it searched.