Inspiration

Two days ago was Friday, and it was circleline, for those that don't know it's a yearly tradition when students go round the tube line, and drink half a pint at every stop. Now I fully intended to leave early, only drink 2 pints, but somehow, not for lack of trying ended up worse for wear, hanging in a lecture theatre, about to start a 36 hour hackathon (again). I'm not alone in this. It is so easy to fool yourself, but data doesn't lie, machine learning can be used in an app to tell you whether you should go home.

What it does

"Should I go home?" is a humourous web app where people can go on and answer a sequence of 6 tick box questions before being told whether they should a) continue drinking full steam ahead, b)have one more drink, c) go home, what are you even doing out in the first place. The results are calculated using a cognitive service regression algorithm, based off peoples past drinking experiences and how worth it they were.

I think it has real application for the student market, excessive alcohol consumption is a problem, but no one wants to be controlled. Most PSAs are unappealing, and struggle to be relateable plus it's really hard to judge your drunkness levels even based on your own past experiences. "Should I go home?" removes these issues, giving a reliable, impartial source, informed by your peers past actions and has a fun, simple user interface.

How I built it

The web app was built using a combination of HTML, CSS, handlebars and node. As users would answer 6, multiple choice button questions. Its designed to be quick, simple and humourous to appeal to its target drunk, student audience. Once their 6 responses had been recorded, this data could be sent to the azure api, and in response the app would receive a "worthit" score for the person to keep drinking.

To start with users are asked what kind of drinker are they: light weight (penguin, cos feathers are light), heavy weight (bears, because bears are bare heavy) and average ("pengbears a cross between the two.")

I posted a survey to reddit where I asked people to describe their recent drinking experiences. They answered the same 6 questions as on the website, plus one evaluation question of how worth it the night was (used as the label score), These were used to train the algorithm, the higher the worth it score, the more likely my web app recommended to continue drinking.

Challenges I ran into

The node.js was more rudimentary than I would have liked, I could not solve a bug that prevented browsers registering modified XHR, so the url could not be updated on the website. It was very frustrating as it was a matter of configuration of static files rather than something directly related to programming. This prevents multiple users using the website at once, or me exploring session data etc.

Accomplishments that I'm proud of

I managed to quickly get accurate outputs for a trained machine learning algorithm to use in the app, I really enjoyed developing the graphics and my "pengbear" is baller.

What I learned

I learned how to develop a node.js application with good structure between dynamic and static content. Also how to call azure apis, and use their cognitive services.

What's next for Should I go home?

In the future I would want to integrate it with the mobile platform, so that accelerometers could detect whether someone was ignoring the apps advice, and based on that decide whether to help the student in the morning with "how to deal with your hangover" advice. Also instead of training the API on such a small dataset, users would have the option to input their own experiences to add to the dataset or validate how effective the apps recommendations had been the morning after. With a larger dataset, the number of possible questions could be far greater, including maths problems to evaluate someones current cognitive skills, and a small subset of these could be chosen, to keep the app interesting.

Share this project:
×

Updates