Skip to content

Instantly share code, notes, and snippets.

@DanielSlater
Created October 21, 2017 20:16
Show Gist options
  • Save DanielSlater/1110e79122944707b0784c2b868aac0f to your computer and use it in GitHub Desktop.
Save DanielSlater/1110e79122944707b0784c2b868aac0f to your computer and use it in GitHub Desktop.
def upper_confidence_bounds(payout, samples_for_this_machine, log_total_samples):
return payout / samples_for_this_machine + math.sqrt((2 * log_total_samples) / samples_for_this_machine)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment