def bandit_session_choose(exp)
      name = "bandit_#{exp}".intern
      # choose url param with preference
      value = params[name].nil? ? cookies.signed[name] : params[name]
      # choose with default, and set cookie
      cookies.signed[name] = Bandit.get_experiment(exp).choose(value)
    end
def bandit_session_choose(exp)
      name = "bandit_#{exp}".intern
      # choose url param with preference
      value = params[name].nil? ? cookies.signed[name] : params[name]
      # choose with default, and set cookie
      cookies.signed[name] = Bandit.get_experiment(exp).choose(value)
    end
stick to one alternative for the entire browser session