A few years back Nextdoor started letting its user “announce” whether they are giving out candy or not for Halloween. That was exciting to us ! As real “nerds” we thought what if we can plan ahead the path that will give you the most candy without having to sweat too much!
Hence, we decided to do some legwork to prepare for the big day. We used the data on Nextdoor to identify the locations of houses giving out candies. Given that Next-door includes voluntary information only we also did some manual labor and drove around the area to see which houses at which streets where decorated – this increases the chance of them handing out candies…
Then the problem is “easy”. If you assume that every house that hands out candy provides the kid with a benefit, and assuming that all houses give out good candies so the benefit is the same for every such house, then what we have is essentially a constrained optimization problem. Maximize the “candy profit” by walking only a pre-defined maximum amount of distance!
Luckily we had readily available algorithms that we have developed with for urban tour recommendations (which we have used in the past to find paths full of trees) and hence, we crunched the data and…voilà, we were ready to go get some candies. As for the evaluation, we will have to wait after Halloween to see how much candy we collected..! Hopefully, next year more people will have the information on Nextdoor so I will not have to do extra data collection…Just a note to Nextdoor folks, let the people say what candies they are handing out too, so we don’t end up with a lot of peanut butter 🙂