Inspiration
I like to play some simple vocal games with my son when I am driving and he gets bored. Calculate 24 is one of the games that we play a lot. You help him to improve his math skill while playing a game!
What it does
Basically, a question starts with 4 one digit integer from 0 to 9. The player is asked to use basic math operation: plus, minus, times and division to manipulate numbers so that the end result is 24. The Calculate 24 skill has 2 modes, Practice and Challenge. In Practice mode, Alexa will ask you a question - include 4 numbers and you try to solve the math puzzle. If you could't figure out the answer, you can ask Alexa to tell you the solution. In challenge mode, you try to solve 3 questions and there is a leader broad to compete who finish 3 questions with shortest time.
How I built it
I used Alexa NodeJS SDK to build it and host the service on AWS lambda.
Challenges I ran into
We have to define intents which matches all the possible vocal interaction between the player and Alexa. The answer intent is the most challenge one since it includes all the slot values that represents a valid answer. I have to figure out how well Alexa can capture player's vocal input.
The first challenge is the session length. The Alexa SKD is designed for the scenario that the user keeps a constant conversation with Alexa. If a user does not reply anything in 6 seconds, Alexa will shut down the session of this skill. For my case, players might take more than a minute to figure out the answer of a question. After I realized that, I have to keep player's progress of answering a question in DynamoDB, so that player can resume a session by reactivate my skill.
The second challenge is the accuracy of slot values. That says you say 2 plus 2 is four to Alexa. This intent includes three slots, number one, number two and the operator. The possibility of not catching the right slot value is quite high: more than 20% in my case. The user experience is very bad if you say something and Alexa misunderstands it and you have to repeat the whole answer again. I had to do some work to correct the slot values by the range of values that are valid for my game.
The third challenge is to filter a lot of necessary intents. After Alexa hands the conversation to a user, it tries to capture all the audio input and match to one of the intents for this skill. For example, Alexa just give you a question, while you are thinking of the solution, some background noise might trigger another intent, which will ruin the user experience completely. I had to do some work to ask the player to confirm the intents of a user.
Accomplishments that I'm proud of
All the parents try to cut their kid's screen time and it is great alternative to play a Alexa skill with their kid. Calculate 24 not only kills some time without adding more screen time, but also help your kid with their math skill. Vocal interaction application has huge potential. My game is quite a unique approach. I believe my feedbacks can help Amazon to polish their SDK a lot.
What I learned
First time on Alexa Nodejs SDK and a lot of AWS service, I learn a lot from technical prospect. I also learned a lot about the potential, limitation and design approach of vocal interaction application.
What's next for Calculate 24
I want to have a competition mode that you can challenge your friends with the same questions that you just solved. I believe this type of feature can bring viral to this skill. However, this idea needs the support of Alexa SDK. I will see when Amazon can offer something to support my plan.
Built With
- alexa-nodejs-sdk
Log in or sign up for Devpost to join the conversation.