Random Movie Generator
Generate random movie suggestions filtered by genre, decade, and rating. Discover films from a curated database of 200+ titles instantly.
About
Choosing a film from an ever-growing catalog is a decision-fatigue problem. Studies show that the average person spends 23 minutes browsing before selecting a title, and roughly 40% of the time they revert to something already seen. This generator eliminates that friction by applying a Fisher-Yates shuffle across a curated set of 200+ films spanning 15 genres and 9 decades. Filters narrow the pool by genre, minimum IMDb rating, and release decade before the random draw executes.
The database covers films from 1940 to 2024, weighted toward critically recognized works (median rating ≈ 7.2). This is not a recommendation engine. It does not learn preferences or track behavior beyond the current session's history buffer of 50 entries, which exists solely to prevent consecutive duplicates. Favorites persist locally via localStorage for later reference. Limitations: the dataset is static and English-title-centric, though it includes international cinema.
Formulas
The selection algorithm applies a filtered Fisher-Yates shuffle. Given a filtered pool of n films, randomness is sourced from crypto.getRandomValues for uniform distribution.
j ← floor(random() × (i + 1))
swap(arr[i], arr[j])
Where j is a cryptographically random index in the range [0, i]. The result is the element at index 0 after shuffling. History deduplication removes the last 50 picks from the candidate pool before shuffling, ensuring no immediate repeats until the pool is exhausted.
The probability of selecting any single film from an unfiltered pool of N titles is:
Where h = number of films in the history buffer (max 50). When N − h ≤ 0, the history is cleared to allow re-selection.
Reference Data
| Genre | Films in Database | Decade Range | Avg. Rating | Notable Example |
|---|---|---|---|---|
| Action | 18 | 1981 - 2024 | 7.5 | Mad Max: Fury Road |
| Comedy | 16 | 1959 - 2023 | 7.3 | The Grand Budapest Hotel |
| Drama | 22 | 1941 - 2024 | 7.9 | Schindler's List |
| Sci-Fi | 18 | 1968 - 2024 | 7.6 | Blade Runner 2049 |
| Horror | 14 | 1960 - 2023 | 7.2 | The Shining |
| Thriller | 16 | 1954 - 2023 | 7.7 | Se7en |
| Animation | 14 | 1988 - 2023 | 7.8 | Spirited Away |
| Romance | 10 | 1942 - 2023 | 7.4 | Before Sunrise |
| Crime | 14 | 1972 - 2022 | 8.0 | The Godfather |
| Adventure | 12 | 1975 - 2023 | 7.5 | Indiana Jones: Raiders |
| Documentary | 10 | 2002 - 2023 | 7.8 | Free Solo |
| Fantasy | 12 | 1984 - 2023 | 7.6 | The Lord of the Rings |
| Mystery | 10 | 1958 - 2022 | 7.5 | Zodiac |
| War | 8 | 1957 - 2022 | 8.0 | Saving Private Ryan |
| Western | 6 | 1966 - 2018 | 7.8 | The Good, the Bad and the Ugly |