Bot Dilemma


With the lack of social interaction that we're going through as a result of COVID-19, not only are we getting more and more depressed, but deprived of interesting relationships and interactions with new people. Given the current situation around the world, our group was looking to create a hack that can make living in isolation, not only less... "iso", but entertaining and challenging too. We wanted to take something technically advanced, and spin it in a super creative way such that it can improve living for those by themselves, help with mental health issues, make some connections, and most of all, have some fun!

I guess it is

What it does

Bot Dilemma is both a social network, a Turing test, and an intriguing game. Once you create an account you can start playing. The game is you will be put into a chat room with either a robot (powered by a powerful NLP model we tweaked) or another player, you won't know. You can start having conversations with the other "person", and once you are ready, you choose whether you think your opponent was human or not. The app is designed to incentivize meaningful conversations conducive of connections, with higher points awarded to those who can keep up conversations for longer without giving away whether or not they're a bot. The game is a fun aspect, but it's important to keep an eye on the prize (precious social interaction). Our robot's artificial intelligence algorithm 90 million different parameters that enable it to reciprocate slang, mood, context, and more, so it won't be tough to hold those lengthy conversations. We've set up our service so that there are over a 1000 different personas with unique careers, families, and hobbies, so literally every time you speak with it it's like meeting a whole new person.


How we built it

The conversational chatbot, perhaps the most technically challenging and intriguing part of our project, was an offshoot of the famous Blender model released by Facebook in their recent paper here. After reading the paper and checking out some of the cool techniques they used (token generation / selection for word encodings, dataset selection, beam search), we simply had to implement it ourselves. Unlike the 2B parameter model (too big for our machine), we had to settle for the 90M parameter model, which we fine tuned and implemented via pytorch and the parlAI system provided by facebook. We have a safety model also built, as a part of the same system, for filtering inappropriate language, and strongly negative connoted messages to prevent foul interactions between users, and users and the chatbot as well, though users have an incentive to keep it clean, and send profound conversations, since longer conversations without detection as a bot or not are rewarded with points.

Model Architecture

For the actual deployment of the app, this was perhaps the most difficult part, if not tied with the model setup itself. We deployed the app using a python web-socket server, and porting it on an openly accessible ip so other users on the network could access the chatbot. We accessed the app through a mobile app via http requesting from there. Thinking a couple steps ahead, we set up the server so that it could handle several conversations at once (up to 40 workers for now), but scalability wasn't exactly the focus in the moment, rather getting a basic proof of concept up.

For our app, we of course used flutter, Google's hot new app dev framework which enables speedy development, and a lot of firebase (A LOT). Our UI team spent tons of time on making a clean UI, and our backend guys used firebase cloud storage, auth, and database to build a messaging system, and the points / leaderboard system that brought the whole app together.

Challenges we ran into

This project led to some mind-numbingly frustrating experiences. Spending 3 hours debugging web-socket code, workers, and context saving for our deep model was anything but enjoyable, though we resisted head-bashing. Getting the app done was really a challenge, since we didn't really realize that other developers were on the app team too so we may not have done a good job of cross-checking compatibility. When it came time for the big merge, it was pandemonium, with merge errors, and reverts, and build errors everywhere!

For the UI folks, loading assets was a huge headache, and getting the firebase database to link up with the UI led to the loss of much sleep for us all. As always, I'm leaving the hackathon with 30 gray hairs because there was an async error LITERALLY EVERYWHERE!!! Nonetheless we persevered and made something that works (we think), and acts as a cool solution to a widespread problem.

What if?

Accomplishments we're proud of

We've all wanted to step out of our comfort zones and do something completely new. When we discovered Oxford hacks we decided this was the perfect chance and we took advantage! We are super proud to not only add such a complicated AI system, but to get to creatively incorporate it in order to help those isolating.

We are also proud because to us Bot Dilemma seems like an app that we might actually want to use for fun on our own rather than just scrapping afterwards. We believe that this hack was our best idea to date and we are truly proud to finally complete it.

What we learned

Each member in the group learned plenty in their respective areas. The backend programmers learned impressive new methods to to utilize online tools such as firebase. This was really a breakthrough into the pytorch and parlAI ecosystem. Those working on the frontend all grew comfortable with the advantages and disadvantages of Flutter programming and how to make it work just how you want it.

We learned from our mistakes: beware of git, async, http, and websockets, but on a more serious notes the pain is burned in our heads, and this will hopefully be the last time we are terrorized by these banes to programming.


What's next for Bot Dilemma

  • My group would love to open Bot Dilemma to the public by putting it on the app store and see how users perform, and how our app actually helps people.

  • At some point we would like to update the Artificial Intelligence model a bit, depending on feasibility we can consider an upgrade to the 1B parameter model to boost performance and user interest in addition to making everything even better.

  • Finally, the User Interface is never be perfect! We can always improve there!

+ 1 more
Share this project: