Behind the Scenes of Blok 9

Posted January 13th, 2012 by rachel under Games, Intelligent Play, News, Sifteo Life


We get a lot of questions about how the Artificial Intelligence (AI) in Blok 9 works, so today we got the game’s creator to spill a few of his secrets and give a heady explanation of the magic (or mathematics) at work.

First meet Eric:

Name: Eric

Age: 32

Sifteo job title: Game Designer/Developer

Fun fact: I am an expert at opening fruit with my bare hands. Once I opened a pineapple.

Favorite food: pigs’ feet

 

…and now meet his AI and formidable opponent, The Void:

Name: The Void

Age: 11 months

Sifteo job title: Office Security

Fun fact: I can recite pi in iambic pentameter.  It is beautiful.

Favorite food: Slim Jims

 

When designing Blok 9, I first had to consider what the goals for the AI were. Obviously, the main goal is to have it be able to play the game. But at what level? It’s surprising to some that the goal of game AI is usually not to be as good as possible. If you’ve ever played a game against an opponent who crushes you every time, you know that’s no fun. In order to result in a fun experience, it must be challenging but seem beatable by the player.

At this early stage of development, I realized that I wouldn’t be able to lay down rules and strategy for how the AI behaved, as I myself didn’t understand what good Blok 9 strategy was (one sign of an interesting game: the designer can’t fully solve the game immediately). So I began to survey my options.

One of the chief ways AIs for board games like chess and Othello work is by using an algorithm called minimax. In this algorithm, the AI will create a branching tree that explores each possible move n turns into the future. It predicts the future by having each player pick the best move possible for that player. Since there are so many branches, the tree becomes too large to compute, and one must rely on a heuristic, or special rule, to decide which parts of the tree to explore. For example, in chess, you could have a heuristic that ignores all moves that involve moving anything but pawns. (Note: That is probably not a good chess heuristic!)

That sounded like a good start, except that Blok 9 has one fundamental difference from those games: it is non-deterministic. What this means is that there is some element of chance involved. Each turn, a player gets one of two pieces randomly; as a result, there’s no way to predict what moves are optimal in the future.

I decided I had enough research under my belt and I wanted to start experimenting. At first, I was curious how an AI would perform if it wasn’t able to look ahead at each move’s outcome, so I programmed it to simply pick the move that gave it the most pieces. This is known as a greedy algorithm. Check it out here:


As someone who grew up in the 80s, this was a real War Games moment for me. It tickled me to no end. But how well did the greedy AI play?

As you might expect, the greedy algorithm doesn’t fare too well. It’s too easy for the human player to trick the AI into making a move that’s only good in the short term, and then steal all the AI’s pieces back and win the game.

So what next? I began looking into what’s called the Monte Carlo method.

The Monte Carlo method

The Monte Carlo method involves simulating many possible games from the current point forward, choosing moves randomly, and choosing the move which results in the most wins.

For example, let’s say the AI has 3 moves available. We could simulate a bunch of games from those 3 moves and look at the results:

Results for 1000 games

Move # Move location Resulting Wins Resulting Losses
1 upper left hand corner 233 100
2 Center left 45 288
3 Lower right hand corner 176 158

 

Since Move 1 has the most resulting wins, we choose it. Simple, right? Since we are simulating the full games, it takes into account the randomness of the game. I didn’t have to tell it anything about strategy, and if the game changed, the AI would continue to work. It sounded good to me!

And indeed it was—the Monte Carlo AI beating the greedy AI about 70% of the time. Simulating 1000 games is time consuming, however—even for a computer! Each turn took about a minute and a half, which is way too long. I needed a method that would take the AI less than 5 seconds each turn to complete.

It’s easy to think, then, that the solution could be to simulate games for 5 seconds only, right? But one thing about the Monte Carlo method is that it works much better with more data. If your sample size is too small, you might be just hitting a random run. For example, if you flip a coin 1000 times, you’re likely to get very close to 50% heads and 50% tails. But flip it 10 times, you might get something very unbalanced. My computer could simulate only about 50 games in 5 seconds. That was not enough.

Since it was clear that the more games simulated, the better, I worked on speeding up the AI so it could simulate a few hundred games in 5 seconds. That helped, but what helped even more was being smarter about which games to simulate.

Look above at the chart of 1000 games. Move 2 looks like a clear loser. Do we really need to simulate 333 games that follow from Move 2 just to see that it loses 288 times? No. A simple change to prioritize winning moves gave the AI the magic it needed to begin consistently beating me.


And that’s how The Void came to be.

I’m glossing over plenty of details here, but if you’re interested in learning more about the AI concepts mentioned in this post, check out:

So now that you know the Void’s tricks, can you beat it? Try and find out!

Any questions or comments about the Blok 9 AI? You’re welcome to add your comments below or to email me: eric@sifteo.com.

 

Tagged , , ,

Leave a comment »


A Sifteo Game Designer’s Secret Weapon

Posted January 5th, 2012 by rachel under Events, Intelligent Play, Press, Sifteo Life

A lot of brainpower goes into the development of any single Sifteo game. In fact, we generally believe the more brains the better, and try to welcome as much collaboration as possible. Since many of our users have great ideas about what games they’d like to play and how our system can better suit their imaginations, we like to reach out and connect with them, too.

But most people don’t realize that many of the minds at work on our games are very young. And I’m not talking start-up, Silicon Valley young, but like, elementary school young. At Sifteo, kids are taken very seriously as critics of our work. After all, they’re usually the most enthusiastic and active game players out there!

Some of us are lucky enough to have nieces, nephews, or kids of our own who are eager to test out the latest Sifteo games in development. But most of the very young people we work with hang out at the Innovation Lab of the Children’s Creativity Museum, where children get a hands-on experience with new technology, talk with tech professionals about their jobs, and experiment with the latest innovations.

We really appreciate this opportunity to work with Sifteo’s biggest fans. With the right kind of exposure to technology, we’ve seen students become inspired to pursue a curriculum that could eventually lead to a career in computer science or engineering. And of course, the insights of children at play in the Innovation Lab are tremendously helpful to our game developers, who are in turn inspired by the imaginations of even our youngest users.

“I didn’t intend for Matchination to be playable with 2 cubes; I thought it’d be too simple,” Sifteo Game Developer, Eric Liao, explains. “But I’d forgotten to restrict the game to 3 cubes or more, and then noted that a lot of our younger play testers at the Children’s Creativity Museum were having a blast with 2 cubes. Their engagement really helped me understand what works for different age levels. I immediately made 2-cube play one of the options in Matchination.”

Another Developer, Josh Lee, describes group dynamics in Sifteo game play. “During one of our earliest play tests, I put a set of three cubes down on a table in front of three girls. Each girl took a cube and claimed it as her own. I thought this would make the games unplayable—they were designed with a single player in mind! But the girls naturally cooperated and brought their cubes together to play Chroma Shuffle and Mount Brainiac like a boss (a three-headed, six-handed boss). It really opened my eyes to different forms of collaborative play.”

On the games development team, we’re excited by this congruity of values in our work and play—we have more success and more fun when we work together.

If you live in the San Francisco Bay Area and are interested in having your children participate in the Sifteo PlayLab, please fill out our survey or contact emily@sifteo.com. In the meantime, feel check out ABC 7’s coverage of play time in the Children’s Creativity Museum!

Tagged , , , ,

Leave a comment »


“I Like Sifteo!”

Posted December 23rd, 2011 by rachel under Intelligent Play, News, Sifteo Life, Videos

Thanks for the shout out :) We think you’re pretty great, too!

Tagged , , ,

Leave a comment »


Getting Hands On With Digital Learning (a Good.is Video about Sifteo)

Posted December 14th, 2011 by laurie under Intelligent Play, News, Press, Sifteo Life, Videos

10 hours of shooting in the Sifteo office and out and about San Francisco paid off! This video by Good.is featuring Sifteo co-founder David Merrill does a beautiful job of telling the Sifteo story.

“Sifteo co-founder David Merrill believes in the power of hands-on thinking. Using digital cubes, he explores how intelligent play and physical exploration with our hands stimulates cognitive learning. Defying the idea that technology creates a passive experience, Sifteo cubes engage users with games and encourage them to play and think nimbly with exploration-oriented problem solving.” See the full article on Good.is

Tagged , , ,

Leave a comment »


Monkey Monday: Game Tip

Posted November 21st, 2011 by Josh Lee under Games, Intelligent Play, News

 

The secret to beating No Evil Monkeys…


DID YOU KNOW… Unscrambling the pictures in No Evil Monkeys can seem really hard at times. Like, REALLY hard. But there’s a simple rule that will give you a big advantage over those sneaky monkeys: before you shuffle the tiles, memorize which monkey is on which cube. Then focus on putting the monkeys back in their original positions. As long as you can remember which piece goes where and don’t let yourself get turned around, you’ll be juggling monkeys in no time.

Tagged , ,

1 comment »


Sifteo Game Release: Planet of Tune

Posted November 17th, 2011 by rachel under Events, Games, Intelligent Play, News

 

Planet of Tune

Imagine this: you’re listening to a piece of music and you want to shake things up a bit. But instead of skipping to the next track, you reach out and grasp pieces of the music you hear, shaping them with your hands to create an entirely different sound. A sound that’s all yours and very literally shaken up!

Here at Sifteo, Game Designer Chris March imagined exactly that—and made it a reality on your Sifteo cubes. In our latest application, Planet of Tune, we combined our love of music with the technology that makes this kind of musical interaction possible.

With Planet of Tune, each Sifteo cube becomes a home for one of 14 different, crazy creatures playing a unique instrumental sound. The creatures prowl through 7 wild terrains on the Planet of Tune and, with each step, play a note on their instruments. You can tilt or shake your cubes to guide them to walk on your favorite notes. With one-button recording and looping playback, Planet of Tune offers a whole new world of music to explore and original compositions to create!

A couple days ago, Sifteo gave a sneak preview with a video that featured the first of the 7 planetary terrains. Each terrain has a distinctive mood and style, so we’d like to give you another glimpse (and listen!) into life on the Planet of Tune:

 

Tagged ,

3 comments »


Sifteo Spotlight #2

Posted November 10th, 2011 by rachel under Intelligent Play, Sifteo Life

 

Earlier today we posted about Picture Me in Computing Day. #picmecomp is designed to encourage young women to imagine themselves in the fields of technology and computing by posting pictures of the women already involved in those professions. In support, we bring you another Sifteo employee profile to celebrate the innovative women in tech—right here in our own office! Check out what Larisa has to say about technology, music, and life as an MIT undergrad.

Larisa, Sifteo Game Design Intern and Music Expert

Name: Larisa

Age: 23

Sifteo Job Title: Intern, Game Design

From: New Jersey, attending school in Boston

 

How did you first become interested in tech?

I ended up at a brand new engineering magnet high school in New Jersey, kind of by accident. My favorite teacher, Dr. Goodman, taught physics. He’s an MIT alum himself, and always spoke of it highly. We also used a lot of the MIT open courseware materials in school. I really liked the MIT vibe—mainly their straightforward and open approach to problems and subject material, so I applied and got in.

I didn’t really get oriented to technology until a little later in my MIT career. There were several factors that had slowly been drawing me into Computer Science. During the summer of my freshman year, I had a job at a Science/Hacker/Maker camp that was started by MIT alumni. Campers were using Scratch, a block-oriented beginning programming language. The seven-year-old kids were constantly borrowing my computer to work on their projects until finally I wanted to know what this Scratch thing was all about. So curiosity was sort of how it started.

In the computer labs, MIT also uses their own Unix system called Athena. My best friend, Lulu, knew all the secret incantations of the Unix shell and could write scripts so that her lab’s computer would do her bidding while we grabbed lunch. I finally took an intro class at the end of my sophomore year. I ended up loving it more than the classes in my major and switched shortly after.

 

What do you like the most about your job?

I really like working with the Sifteo technology because it enables you to make cool things. Even though I went to an engineering high school on a whim, I was really always more of a writing/music/expressive kind of person. What is interesting to me now is how you can express creative ideas from other disciplines in software, particularly with the Sifteo platform. I think technology can enable great things—we can build interesting tools and give more people access to what we think is important in the world.

 

What inspires you?

Well, right now I’m working on a Sifteo game about music, which I’m very passionate about. I’m really inspired by Jeanne Bamberger, who did a lot of early work with music education and technology. She also did a lot of research trying to understand why different people like certain kinds of music better than others, mainly because she wanted to encourage people to become more musically literate.

Musical literacy is an interesting thing. Most people listen to music with a very binary ear: I like this song or I don’t like that song. But the music that I listen to now I definitely wouldn’t have liked as a teenager. So what is it about how we hear sound that orients us in different ways? It’s not a simple question. Having more of a musical vocabulary can help you figure it out and expand beyond that initial bias. As a kid, I’d fall asleep at the symphony. When it was over, my dad, who played oboe for the symphony, would say, “hey, did you hear my solo in the first movement?” I thought, that’s ridiculous…an oboe is such a little instrument, how am I supposed to pick it out from all the other sound? One day he gave me the pocket score so that I could follow his music during the concert and, sure enough, I heard it that time. I kept working at it, trying to pick out my favorite parts. All of a sudden what used to be a boring drone of sound was really amazing to me.

To this day, I have no idea how people can listen to classical music to relax—it’s too exciting! There’s so much going on. But unfortunately it takes a lot of time, effort, and training to learn to play instruments, to read music scores. That’s why I want to make tools that can engage people who may have no musical background at all, or people who are just beginning to learn. The act of listening doesn’t get enough attention or appreciation. But technology and new interfaces could be the entry point into fixing that.

Tagged

Leave a comment »


Sifteo and Thinking Skills – Cooperation and Collaboration

Posted August 25th, 2011 by David Merrill under Intelligent Play

two boys play with sifteo cubes

“Team player. Works well with others.” These phrases are used so often that they sound cliche. If you encountered them in a recommendation letter for a job applicant, would they make any impact on your assessment? They should! Companies embark on more and more ambitious projects every year, and a well-functioning team – one that cooperates and collaborates – is a must-have ingredient for success.

But does technology help us learn to cooperate and collaborate? A lot of the “social” stuff we do with computers (posting content and communicating using social media, playing social games, reading and commenting on articles) doesn’t bring us together face to face and is actually pretty solitary. Even digital activities that are expressly about collaboration, like editing Wikipedia articles or team questing in World of Warcraft, keep participants behind their computers looking at the screen rather than getting together to interact in person. Continued »

Leave a comment »


Sifteo and Thinking Skills – Patterns and Perception

Posted August 10th, 2011 by David Merrill under Intelligent Play

Photo credit: Justin Swett

The world is a sea of chaos, yet our brains somehow make sense of it all. Sights! Sounds! Textures! Scents! A jumble of stimuli relentlessly barrages our sensory systems in a continuous manner, day in and day out. Somehow, we categorize it all with ease. More often than not, we take it for granted. How many times have you walked down the street and perked up when your nose detected a nearby café or laundromat just by the scent of coffee or fabric softener?

It wouldn’t be crazy to say that pattern recognition is the primary function of our brain, and the one that continues to help with cognitive development. Researchers have found that both humans and animals have critical periods in their development for acquiring certain pattern-recognition skills, for instance sight or language understanding. Young birds that are deprived of hearing other birds singing are unable to learn normal birdsong later in life. Similarly, cortical blindness (blindness due to damage to the visual area in the brain’s occipital cortex) can cause a person with healthy eyes to be functionally blind. Simply put, our brain constantly takes raw sensory input and turns it into recognizable things we can reason about, and under normal conditions we develop special-purpose brain “hardware” for these abilities.

Continued »

Leave a comment »


Sifteo and Thinking Skills – Language and Literacy

Posted July 26th, 2011 by David Merrill under Intelligent Play

XKCD - Iambic Pentameter

(Thanks to XKCD for the comic!)

Language seems deceptively easy. Every day, we read thousands of words and have plenty of conversations without any trouble. But peruse an academic paper by a computational linguist (scientists who attempt to map out all the rules that govern how our speech and writing work) and you’ll quit taking these rather complex skills for granted!

Children soak up spoken language effortlessly and without much formal instruction – their gurgles become full sentences as quickly as their crawling becomes sprinting. By comparison, fluency in written language is regarded as a more hard-won (even unnatural) skill. Learning to read requires repeated, focused practice! We parents place great importance on our kids’ mastery of the written form at an early age, so it’s no wonder why there are so many products designed to help children learn to read (think Hooked On Phonics, LeapPad, Speak and Spell, etc).

Once they move beyond babbling, kids start saying words and observing how their parents react. They conjugate verbs to make longer phrases, at first incorrectly like “I runned over here” or “I goed to school”, then they learn which ones are irregular and get them all right. That explains why kids’ first knock-knock jokes are non-sensical - only later do they figure out what makes a real punchline. Continued »

Leave a comment »


by Sifteo