wonderland: optimized

Genetic algorithm itinerary optimization for Canada's Wonderland

The Problem

Planning a day at Canada's Wonderland means navigating 26 attractions spread across a large park, each with time-dependent queue lengths that shift throughout the day. This is a variant of the Travelling Salesman Problem with a twist: not every ride is equally desirable, walking between attractions costs real time, and wait times change by the half-hour.

The optimizer below uses a genetic algorithm to find a tour that maximizes your personal ride preferences while minimizing total time spent walking and waiting. Adjust your preferences, hit optimize, and watch the algorithm work.

Your Profile

0.020

Wait Times

Park Map

Tour Replay

How It Works

Representation

A tour is a permutation of attraction IDs. Each individual in the population is one candidate itinerary — an ordered sequence of rides to visit starting from the park entrance at a given hour. The total fitness accounts for ride preferences gained, walk time between attractions, and time-dependent queue waits at each stop.

Single-Objective GA

The optimizer maximizes Σ(prefi) − α × total_time. It uses Order Crossover (OX) to combine parent tours while preserving relative visit order, swap + insert mutation to explore the search space, tournament selection (k=3), and elitism so the best individual survives each generation. Population size is 50 over 60 generations.

NSGA-II

The original project also implements NSGA-II, a multi-objective algorithm that simultaneously maximizes preference and minimizes time. It finds a Pareto front of trade-off solutions using (μ+λ) selection and non-dominated sorting, letting you pick your own operating point along the efficiency frontier. The browser version above uses the single-objective formulation for speed.