American Roller Coaster Trivia Alexa Skill

If you just want to add the game to your Alexa device, click here!

THE PROBLEM

Sometimes the problem I am trying to solve isn’t something practical like a new educational game or 3D printed gadget. This time, the problem I was trying to solve is that I wanted a t-shirt. Amazon has monthly offers for swag if you develop skills for their Amazon Alexa product, which are basically like the platform’s “apps”. They let you have the digital assistant perform all sorts of tasks, like turn on and off your smart devices or interface with your favorite websites. You can also make Alexa play games with you, which is what I decided to do.

It’s no mystery from my website that I love roller coasters, so I decided that what Alexa really needed was a roller coaster trivia skill. This would let me get my feet wet into how Alexa development works and let me produce a fun game to share with my fellow roller coaster enthusiasts. The idea is that it will take a number of questions I have written about the best roller coasters in America, like what years rides opened, what park they are at, how fast they go, and more. Alexa asks five of these questions at random and keeps track of your score. Here’s some sample questions:

Name this roller coaster model who’s namesake was used by Aboriginal Australians for hunting. (Answer: Boomerang)

The oldest roller coaster in America is what? (Answer: Leap-the-Dips)

THE SOLUTION

I was happy to discover that I could write Alexa skills using one of my favorite languages, Node.js, and that I could set them up on one of my favorite platforms, Lambda, which is part of Amazon Web Services. Essentially you can develop an Alexa skill like you would any microservice. Of course, there are rules that you have to follow that you can learn from one of their many samples, which is where I found an excellent sample for a trivia game. My coaster trivia uses this code extensively, and let me see a fully functioning Alexa skill that follows the best practices. I discovered all sorts of things- building responses, handling requests, and what Alexa has trouble saying. When you go to publish your Alexa skill you get a nice interface to test what you’ve done, which is where I found out that some roller coasters have names that do not play well with Alexa’s speech technology. I found, for example, that the roller coaster Rougarou is very hard to understand, so my questions related to it had to be dropped. If you are at all interested in making your own skills for Alexa, I recommend starting with one of their samples. It walks you through the whole process, from getting started with Lambda to creating intent schemas and testing.

SHARING THE SOLUTION

I made all of my code public by forking the original Amazon sample. You can get it here!

I really like the Alexa platform and have many more skills in development. I have a lot of plans as to how digital assistants may be valuable in the classroom. You can keep posted on my projects here, or on my new Alexa Skills page I linked from my Projects page.

Finally, you can add the skill to your Alexa device by clicking here, or search American Coaster Trivia in your Alexa app!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s