Skip to content

Consider Fast Loaded Dice Roller for WeightedIndex #1014

Closed
@vks

Description

@vks

It seems to outperform the alias method (and others), being close to the theoretical optimum of entropy use. According to the paper, it is faster than the alias method (if the latter is modified to produce exact samples), while using several orders of magnitudes less preprocessing time. Maybe it can replace our current algorithms in Rand?

There is a reference implementation in C and Python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-newPropose usage of a new algorithmX-staleOutdated or abandoned work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions