Let Fate Decide
Automate and integrate Let Fate Decide random decision-making into your workflows
Category: productivity Source: trailofbits/skillsLet Fate Decide is a community skill for building randomized decision-making tools, covering random selection, weighted probability, group assignment, tournament brackets, and customizable spinner interfaces for choice resolution.
What Is This?
Overview
Let Fate Decide provides tools for creating randomized selection mechanisms that resolve choices fairly. It covers random selection that picks items from lists with uniform probability distribution for unbiased choices, weighted probability that assigns different selection likelihoods to options based on configured preference values, group assignment that distributes people or items into balanced teams or categories using randomized allocation, tournament brackets that generate elimination pairings from participant lists with seeded or random ordering, and customizable spinner interfaces that present animated wheel selections with configurable segment labels and colors. The skill enables users to create fair and engaging decision tools for various selection scenarios.
Who Should Use This
This skill serves team leads organizing group activities with random assignments, educators creating classroom selection tools, and event organizers building interactive decision experiences for participants.
Why Use It?
Problems It Solves
Group decisions stall when no one wants to choose and no fair selection mechanism exists. Manual random selection methods like drawing names from a hat lack transparency and repeatability. Team assignments made without randomization introduce bias toward familiar groupings. Tournament bracket creation requires balanced pairing logic that manual approaches frequently get wrong.
Core Highlights
Random picker selects items from lists with configurable probability weights. Team builder distributes participants into balanced groups with size constraints. Bracket generator creates elimination tournament pairings from player lists. Spinner widget renders animated wheel selection with customizable appearance.
How to Use It?
Basic Usage
import random
class DecisionEngine:
def pick_one(
self,
options: list[str]
) -> str:
return random.choice(
options)
def pick_weighted(
self,
options: list[str],
weights: list[float]
) -> str:
return random.choices(
options,
weights=weights,
k=1)[0]
def pick_multiple(
self,
options: list[str],
count: int
) -> list[str]:
count = min(
count, len(options))
return random.sample(
options, count)
def assign_groups(
self,
people: list[str],
num_groups: int
) -> list[list[str]]:
shuffled = (
people.copy())
random.shuffle(
shuffled)
groups = [
[] for _
in range(num_groups)]
for i, person\
in enumerate(
shuffled):
groups[
i % num_groups
].append(person)
return groups
Real-World Examples
class BracketMaker:
def __init__(
self,
players: list[str],
seeded: bool = False
):
self.players = (
players.copy())
if not seeded:
random.shuffle(
self.players)
self._pad_to_power()
def _pad_to_power(
self
):
n = len(self.players)
power = 1
while power < n:
power *= 2
while len(
self.players
) < power:
self.players\
.append('BYE')
def first_round(
self
) -> list[tuple]:
pairs = []
for i in range(
0, len(
self.players),
2):
pairs.append((
self.players[i],
self.players[
i + 1]))
return pairs
def display(
self
) -> str:
lines = []
for a, b\
in self\
.first_round():
lines.append(
f'{a} vs {b}')
return '\n'.join(
lines)
Advanced Tips
Seed the random generator with a shared value to produce verifiably fair results that participants can independently reproduce. Implement exclusion rules that prevent certain people from being assigned to the same group based on constraint lists. Log selection outcomes with timestamps to maintain an audit trail for transparency.
When to Use It?
Use Cases
Pick a random restaurant from a list when a group cannot agree on where to eat. Assign students into balanced project teams with randomized allocation. Generate seeded tournament brackets for a team competition event.
Related Topics
Random selection, decision tools, team assignment, tournament brackets, probability, spinner wheels, and group allocation.
Important Notes
Requirements
Python standard library random module for basic selection operations. Frontend framework for interactive spinner or wheel interfaces. No external API dependencies for core selection logic.
Usage Recommendations
Do: use cryptographically secure random sources when selection fairness has real consequences such as prize drawings. Display selection parameters and seed values for transparency when fairness matters. Allow participants to verify randomness by sharing the seed before selection.
Don't: use weighted selection without disclosing that probabilities are unequal to participants. Rely on pseudo-random generators for security-sensitive selection scenarios. Rerun selections until a preferred outcome appears since this defeats the purpose of random selection.
Limitations
Pseudo-random generators produce deterministic sequences that are not suitable for cryptographic applications. Group assignment with complex constraints may not have feasible solutions with simple random allocation. Animated spinner interfaces require frontend rendering capabilities not available in all environments.