For this hackathon, we made an online social deduction game where a detective asks questions and attempts to identify the humans among several AI agents.
With AI scams and deepfakes becoming widespread, this game challenges your belief that you would not be fooled by AI. AI Detective is a creative game that helps educate players about the dangers of AI. It is a web-based application that can be played both on mobile devices and desktop computers.
How the Game Works
Throughout the game there is a single detective. The goal of the detective is to successfully identify the humans and eliminate them. Apart from the detective, the game allows for up to 4 humans to join. The goal of these players is to blend in with the AI agents. If at least one human survives all the rounds and avoids being identified by the detective, they win. The last role is that of the AI agent, powered by GPT3.5 Turbo. We have engineered these agents to act as closely to humans as possible, and have equipped them with several distinct personalities.
At the start of each round, the detective provides a prompt for all players (humans and AI) to respond to. Based on the given responses, the detective then attempts to eliminate one of the humans. At the end of the round, the true identity of the eliminated player is revealed. If any humans remain, a new round will begin.
How we Developed it
We wrote the front-end in HMTL, CSS and JavaScript, whilst the back-end was written in Golang, taking advantage of the Melody library to implement web sockets. The AI responses were generated by using the OpenAI API, utilising GPT3.5 Turbo, with custom prompts to give them distinct personalities and human-like behaviour.
Challenges we ran into
- At first, we found it challenging to create a real-time application in Go.
- Persuading the large language models to behave realistically was also challenging and required extensive prompt engineering.
Accomplishments that we are proud of
- Working on both frontend and backend in parallel supported by excellent communication and planning
- We are proud of how polished we made the game look, and how fun we found it to play.
What we learnt
- For most of us, this was our first experience using Go
- We learnt how to interact with a OpenAI API and customise the AI agents to simulate different personalities
What's next for AI Detective
We would like to expand our application to a fully fledged web app that supports multiple lobbies and remote play. We believe that this app can be both a powerful tool to promote vigilance toward AI scams, and a game people would play across the world. For instance, this could be an engaging tool to educate business employees about what to look for in AI-based scams.
Built With
- css
- go
- html
- javascript
- openai
Log in or sign up for Devpost to join the conversation.