Skip to content

Instantly share code, notes, and snippets.

@mithi
Last active January 10, 2019 21:29
Show Gist options
  • Save mithi/45c6b02bbe4429cca119e60a3b8f5729 to your computer and use it in GitHub Desktop.
Save mithi/45c6b02bbe4429cca119e60a3b8f5729 to your computer and use it in GitHub Desktop.

(WIP) Weighted random choice and importance sampling

  • Some Keywords: Fitness proportionate selection, roulette wheel selection

Weighted Random Choice

Implemented in C++

Implemented in Python

numpy.random.choice

Importance Sampling

Applications where I personally used this:

  • Particle Filters (includes localization of robots) - Implemented
  • Genetic algorithms - Implemented
  • Reinforcement Learning: DQN with Priority Experience Replay - Currently Implementing

Priority Experience Replay Links - sumtree is used

Related Short Videos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment