What does it mean to be human? After an abandoned attempt at generating infinite money from forex, we decided on doing this fun and thought-provoking challenge, showcasing how an AI might compete in a subjective game, and whether or not you could tell them apart from a human player. We know bots will be coming for our jobs, now they might be coming for our humour too!

What it does

Our product is a webapp that allows you to play the dark humour card game "Cards Against Humanity" against several AI opponents. The objective of the game is to choose one card from your hand that best matches the situation posed in the form of a black card - the winner is the combination which has the darkest humour (arguably). The winning card will be fed back to the AIs to train them to be increasingly controversial (therefore successful!).

How we built it

We built a Flask MVC app for the web interface, while backend logic was written in Python and Javascript. We used cognitive engines from Microsoft Azure, Amazon AWS and Google Cloud Platform for sentiment analysis of phrases from the cards. Each engine provided different sentiment values, corresponding to different 'profiles' of players. Each AI was trained to play cards using Bayesian learning with a training dataset based on proven popular hands scraped from Reddit.

Challenges we ran into

We had to understand a substantial amount of statistics to fully utilise multiple results from A.I. cognitive engines to build an excellent model with an optimal parametrisation for judging the sentiment value of the phrases in the card game. Two team members used a Mac and the rest of us used Windows. Although both operating systems supported Python, there were minor compatibility issues, which were time-consuming to resolve.

Accomplishments that we are proud of

We found our resilience in completing this project after giving up on an initial project idea 9 hours into the hackathon to be quite remarkable! On the other hand, we had a whole 15 hours to hack our new project out.

What we learned

From this project, we have learned to use multiple APIs in machine learning.

What's next for Bots Against Humanity

In our current implementation, the judge of who 'wins' is decided by the human player themselves - we hope to expand to a multiplayer/online interaction where more humans can give their input. Also, while our Bayesian posterior updating algorithm seems to work, there hasn't been extensive testing/optimisation in allowing our bots to perform better. With more data input and better optimisation, our bots will topple governments and rule the world (with their humour).

Share this project: