Inspiration

I was having a conversation with a friend of mine about his 1-year old grandson sharing a birthday with me. He's a former Wall Street trader and one of the fastest people at arithmetic I've ever met (also very fast with Trig problems. But when I told him the probability of two people in a group of 23 sharing a birthday was greater than 50% according to the birthday paradox he said no way because....

After I explained that he should not be focusing on days but instead of pairs, kind of like graph theory he got it and then acknowledge it's a true paradox.

I taught this to my daughter when she was around 5 (her best friend also shares my birthday). When I ran it by her again at age 8, she really didn't seem so interested in the math behind it. So then I crated this game with a "pair of ducks" and she really liked the ducks :) So hopefully this will inspire others to have fun and bush up on some elementary combinatorics.

The Birthday Paradox is a fascinating mathematical puzzle that often surprises people with its counterintuitive results. We wanted to create an engaging, interactive visualization that makes this complex probability concept more accessible and fun. By transforming students into playful ducks swimming in a pond, we've made mathematics more approachable and memorable.

What it does

Birthday "Paradux" is an interactive web application that demonstrates the birthday paradox through an animated duck pond visualization. Users input a class size and their probability guess, then watch as ducks representing students swim around a pond. When birthday matches are found, the corresponding ducks perform a special heart-shaped dance pattern. The app includes real-time probability calculations, interactive elements with typewriter effects, and an expandable mathematical explanation.

How I built it

I developed the application using:

Amazon Q (told me how to make the fastest deployment of any game I've every built) Amplify (I had no idea I could just upload a zip of my build, copy some nameservers and have a game live that fast! React for the interactive UI components SVG animations for duck movements and water effects Custom mathematics engine for probability calculations (this actually started as a python prototype, so there's not a lot of math for the probability - but rather for the elliptical path, which I've decided to leverage into other elliptical themed games for the hackathon to see how many I can build with Q to deploy). Inline styling for consistent, dependency-free design Animated transitions and typewriter effects for enhanced user engagement

Challenges we ran into

Implementing smooth, physics-based duck movements around an elliptical path Creating natural-looking water ripple effects using SVG patterns Choreographing the heart-shaped dance animation for matching birthday pairs Balancing educational content with engaging visuals and interactions Ensuring responsive design while maintaining animation performance

Accomplishments that we're proud of

Created an intuitive and visually appealing way to understand probability Implemented complex SVG animations without external libraries Developed a seamless user experience with staged interactions Successfully combined education with entertainment through the duck theme Built a fully responsive design that works across different screen sizes

What I learned

Never deploy to a hackathon without Amplify and Q. Really smooth, rapid, bug and headache free. Advanced SVG animation techniques Complex state management for multiple animated elements Mathematical modeling of probability in interactive systems User experience design for educational applications Performance optimization for animations

What's next for Birthday "Paradux"

Add multiple visualization modes (e.g., calendar view, grid view) Implement social sharing features for results Create a classroom mode for teachers Add sound effects and background music Develop additional probability puzzles using the duck pond theme Create an API for educators to track student understanding Add accessibility features for screen readers

Built With

Share this project:

Updates