Alan would love to speak to you at http://passtheturing.herokuapp.com/ or 415-200-2524 (made with Twilio!)
The inspiration from this came from Alan Turing, one of the greatest pioneers of Artificial Intelligence. The Turing Test, as we know it, is the topic of a widely debated controversy. We decided to challenge this test with our own intelligent bot.
What it does
Our Alan Turing Artificial Intelligence Bot returns human-like responses when the user converses with it. We wanted to make a bot where the user wouldn't be sure if they were talking to a human or a computer when conversing with our bot. We created a database of movie scripts by using regular expressions on movie subtitles, which found the questions and answers for us. The user input is then checked if it fully matches a question, if it matches an answer (in case the user types a statement), and then if it partially matches a question if all else fails.
How we built it
We used flask as our web framework, and used MongoDB (Pymongo) for our database queries. MongoDB's NoSQL architecture helped us with partial word matches and random records request for questions that the bot is asking the user. We used AJAX for the front end to update the page without a refresh. We also used the Twilio SMS API for the bot's text conversations!
Challenges we ran into
- Finding the correct regex to match text on subtitle data.
- Working with a relational database
Accomplishments that we're proud of
- Creating an interface that obscures Alan's characteristics as an AI, e.g. giving Alan artificial thinking time
- Parsing movie and television scripts of various formats and characters using regex expressions
What we learned
Machine learning and artificial intelligence in general can be hard to learn about over the course of three days. Our team is planning to continue this project into the future.
During our time in CalHacks 3.0 we learned about many new methods for interacting with our MongoDB collection, furthered our understanding of Python and learned about error handling with the Try and Except blocks!
What's next for Pass the Turing
In future iterations of Alan, Alan will become more and more indistinguishable from a human being, courtesy of the power of more data and the support of more sophisticated machine learning systems from libraries such as TensorFlow. The words that encompass Alan's response data will be tokenized and vectorized, strengthening the accuracy of Alan's ability to determine an effective response to user interaction.