I got paid minimum wage to solve an impossible problem

From broom to C++: the 'smart' path that made everyone mad

TLDR: A student used C++ to plan the “perfect” supermarket sweeping route, only to learn the shortest path felt absurd to walk. Comments erupted: some said “it’s NP-hard, quit,” others demanded human-friendly metrics, while jokers memed the chaos—proof tech should optimize comfort, not just distance.

A computer science student tried to turn a supermarket sweeping shift into a science project: map the store as a grid, write a C++ optimizer, and chase the “perfect” route. But when “Path A” came out shorter‑yet‑deranged—think Roomba having a meltdown—the crowd yelled: you optimized the wrong thing. One commenter staged a courtroom gag where the cleaner “couldn’t escape” because she’d just finished sweeping, capturing the absurd vibe. Others chuckled at simulated annealing—a method that tries lots of changes, then “cools” into a good answer—while reminding everyone the human still has to walk like a person.

Then came the brawl: math purists shouted “NP-hard, just give up!”—translation: some problems are famously brutal for computers—while systems‑thinkers warned that optimizing the wrong metric becomes oppression‑lite. Pragmatists argued the real prize is a better “cost function”: fewer tight turns, less backtracking, happier ankles. A wholesome subplot asked whether this sweeper landed a dev job. Bottom line, the thread wasn’t about code; it was a referendum on what we choose to optimize—and why tech should measure sanity, not just distance. Also, someone gave Path A major “CAPTCHA fail” energy. More drama via the Traveling Salesman Problem.

Key Points

  • The supermarket floor was modeled as a grid graph, with tiles representing sweepable areas and obstacles.
  • A visual editor was built in Processing to map the layout and export the graph structure.
  • The objective was to find a cycle visiting all tiles, likened to the Traveling Salesman Problem.
  • A C++ optimizer using simulated annealing was implemented to approximate a good path.
  • The shortest-distance path proved impractical due to excessive turns, highlighting the importance of the right cost function.

Hottest takes

"I couldn't, the hallway has only two doors; the attacker come trough the front door, in the back... I just finished sweeping" — elbci
"Isn't this just trying to find a hamiltonian cycle, isn't this NP hard? That's when I would give up" — leothetechguy
"Optimizing for anything outside of what's literally needed seems to be fundamental to oppression" — crawfordcomeaux
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.