Drinkdaptive

Android, Firebase, Jaccard Algorithm, And Beer

Drinkdaptive – Android, Firebase, Jaccard Algorithm, And Beer

It has been a long time since I developed my own home project. Actually, the last project I developed was a quiz application for my friends and me. Since then, I have of cause designed and build many different educational and professional programs and services. However, as a matter of a fact, I have not created my own hobby project in a long while. Well, that is about to change, right now!

I always had a passion for entertainment and socializing with a drink in my hand. For the sake of motivation, I, therefore, decided that I would like to develop a party-entertainment smartphone application.

At the same time, I would also like to use some of the machine learning specializations. After a bit of brainstorming and shaping the idea, I had a concept for the application.

INTEGU - drinkdaptive icon

The Concept

The idea of Drinkdaptive is to create the Netflix of party-entertainment-games. What I mean by that, is to have a game application which changes behavior dependent on the player. This is what I will use the Jaccard algorithm for, but more on that later…

Multiple players should be able to connect in a share game. The game will begin with the first player being given the option of three “cards”. The only knowledge the player will be given about this card will be its category. A category can be any type of party entertainment. Some players will want to pick the categories related to drinking, some will want the once related to trivia, and a third type of players will want something totally different. Ideally, the game will be covering a wide span of categories from which the player can pick their preference from.

When the player then picks their preferred category they will be given an action. This action will be required to answer, perform, or demonstrate to complete. Additionally, the choice of the category will also be recorded for data storage. This way we can use it as an indication of the player’s preference. I will explain how I intend to do this later in the article.

Categories

Each of the three category options, given to the player will be based on individual sources.

As can be seen from the list below, I have attempted to cover the selection of options from a variaty of perspectives.  

 

 

  • One option will be based on the player’s preference, which has been determined by past game history.
  • Another option will be purely random to ensure some sort of serendipity to the options.
  • Finally, the third option should be based on the preferences of the two players, who share the closest preference to them.
INTEGU - Too many options

Designing The Core Application

Before rapidly starting to code based on what comes to mind, I would argue that it is always important to start by gaining an overview. Therefore, I started by sketching my application on a whiteboard. I consider this a sort of brainstorming, which will act as a foundation for the application look and functionality. Things may change throughout the development phase and that is okay. However, I expect that the core flow diagram of the application will still look similar.

 

 

Sketching out the entire application from the beginning also adds the advantage of facing various development problems. Discovering problems at this stage means that you can determine the most suitable solutions. This is favaorable instead of being forced to make a bad solution because you discovered the problem after three weeks of coding.

INTEGU - drinkdaptive_wireframe - INTEGU

The Technologies

Android

In terms of the technologies, I decided to go with Android as the target of my application. Ideally, I would like to make this application both compatible with both IOS and Android. However, in terms of time and my preferred platform, I decided that Android was fine. Who knows, maybe I will rework the entire application to a cross-platform language at some point in the future. (Drinkdaptive 2.0)

INTEGU - android-flat

Firebase

Since the application requires a backend data storage solution, I decided to try out the Google Firebase service. I only heard a bit about it before and my understanding is that it is straightforward to learn. If you don’t know what Firebase is, I will explain it briefly. It is a Backend-as-a-Service (BaaS). It intends to free the developer from the task of programming and structuring of the backend of a system.

In the case of Android, I connected the application with the Firebase API and implemented the Firebase JSON file into the project. This allowed my application to see and understand the new Firebase objects. Through these objects, it is now possible to use all Firebase’s functionalities. This includes storing, updating and extract information from a real-time database. Likewise, it is also possible to use machine learning services, use multiple authentication services to sign in and sign up new users, plus many other services.

Given my break from Android programming, I thought that taking a Udemy course related to Firebase might be a good chance to brush up both skills. After finishing the class I can honestly say that it was not worth the time and effort. Firebase is so simple to use and understand, that you only need the Firebase console documentation and maybe a five minutes YouTube video when you run into problems. My advice is just to try it.

INTEGU - Firebase icon

Machine Learning

Finally, the last core technologies, which I would like to use is machine learning, or more specifically a recommendation algorithm. This should, as mentioned, determine what card options a user should be given. I decided to develop the algorithm my self since I thought it was a better exercise than using a prebuild library or API. This point may change throughout the development phase.

INTEGU - AI

Recommendation Algorithm

The idea of using the Jaccard algorithm actually stems from an old exam paper, which I wrote during the last semester before my Master thesis. The concept is rather simple in comparison to other recommendation algorithms. Hopefully, it will be able to provide reliable results. I allowed my self to take a snippet from my report to explain the concept. The main purpose of the algorithm is to find other users with similar taste and thereby determine recommended items. In this case, items refer to the cards which the target user will find interesting.

INTEGU - jaccard-algorithm

The reason why I would like to use the Jaccard algorithm is that it doesn’t rely on active ratings. (e.g. rate this item from zero to five stars) Instead, I want to rely on a passive rating system. I believe this will give more insight into the user’s actual preferences. Any time a user provides an active rating, they are giving the rating representing their envisioned self. However, through a passive rating system, they would provide the application with the preferences of their actual preferences. I found a TED Talk with Reed Hastings who explains how Netflix also uses this concept in their recommendation algorithm. This will truly become the Netflix of party-entertainment-games. He explains the concept around 9:40, but I would encourage to watch the whole clip if the topic interests you.

Development Process

Finally, I decide on a development distribution tools. I created a GitHub project since I expect that some of friends and colleague might be interested in following along. Additionally, by linking the application to Microsofts App Center will allow it to automatically build and distribute to my “beta” tester group. In the highly unlikely case that they would find a bug, it would then be possible to notefy me. Ideally, I would have them go to my Trello board directly and create an issue. But they are just my friends, not a paid quality assurance team.

INTEGU - process-1

To Be Continued…

Given that this is still an ongoing project, I will come back later and link this article to future once. Until then, feel free to learn more through the links below. 

Edit: If you want to continue learning more about the Drinkdaptive project, I would encourage you to checkout the next blog post.

Drinkdaptive: Demonstration And Evaluation

About

Hi, I'm the Author

My name is Daniel H. Jacobsen and I’m a dedicated and highly motivated software developer with a masters engineering degree within the field of ICT. 

I have through many years of constantly learning and adapting to new challenges, gained a well-rounded understanding of what it takes to stay up to date with new technologies, tools and utilities. 

The purpose of this blog is to share both my learnings and knowledge with other likeminded developers as well as illustrating how these topics can be taught in a different and alternative manner.

If you like the idea of that, I would encourage you to sign up for the newsletter.

Cheers! 🍺

Didn't Find What You Were Looking For?

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Scroll to Top
INTEGU - Cookie-consent

INTEGU uses cookies to personalize your experience and provide traceability for affiliate links. By using the website, you agree to these terms and conditions. To learn more see the privacy policy page.