def adjust_distributions_using_gradient
      return if @recent_scores.length < 3
      vx = (1..@recent_scores.length).to_a.to_numeric
      vy = @recent_scores.reverse.to_numeric
      r = Statsample::Regression::Simple.new_from_vectors(vx,vy)
      slope = r.b
      if slope > 0
        @distributions.each_pair { |k, d| d.tighten slope }
      elsif slope < 0
        @distributions.each_pair { |k, d| d.loosen slope }
      end
    end
def adjust_distributions_using_gradient
      return if @recent_scores.length < 3
      vx = (1..@recent_scores.length).to_a.to_numeric
      vy = @recent_scores.reverse.to_numeric
      r = Statsample::Regression::Simple.new_from_vectors(vx,vy)
      slope = r.b
      if slope > 0
        @distributions.each_pair { |k, d| d.tighten slope }
      elsif slope < 0
        @distributions.each_pair { |k, d| d.loosen slope }
      end
    end
def adjust_distributions_using_gradient return if @recent_scores . length < 3 vx = ( 1 .. @recent_scores . length ) . to_a . to_numeric vy = @recent_scores . reverse . to_numeric r = Statsample :: Regression :: Simple . new_from_vectors ( vx , vy ) slope = r . b if slope > 0 @distributions . each_pair { | k , d | d . tighten slope } elsif slope < 0 @distributions . each_pair { | k , d | d . loosen slope } end end
use the gradient of recent best scores to update the distributions
use the gradient of recent best scores to update the distributions