Memory game, with a twist

In the Memory game, you are shown a rectangular grid of cards, all face down. On the face of each card (the side you can’t see), is a picture. For any given picture, a pair cards will have that picture on its face — so for every card there is a matching card.

You play the game by turning up two cards at a time. If those two cards have the same picture, then you get to keep the cards. Otherwise, you have to turn them both face down, and try again. It’s really a test of memory (hence the name of the game) — if you can remember which card was which, you can win the game quickly. Otherwise, it can take a long time to finish.

Here is a simple version of the game that I’ve implemented as a Java applet, to give you the idea.

My friend Van Chung, who is a very accomplished Java programmer and amateur mathematician — and who also happens to be twelve years old — came up with a wonderfully fiendish variation of the Memory game. He calls it “the Memory game with a twist.” It’s a lot sneakier than the original version (be warned). I liked it so much that I reimplemented it. Here is my reimplementation of Van’s twisted Memory game.

To me the most interesting thing about this is the way that games can inspire other games, just as stories can inspire other stories. Van took a fairly prosaic game, added his own very clever variation, and came up with something far more interesting. And, arguably, more profound. For whereas the original Memory game is a kind of meditation on permanence, Van’s variation is a meditation on impermanence.

I was so impressed by this that I then created my own variation of Van’s variation, which took his idea even further. But I’ll get to that the day after tomorrow. Meanwhile, I’ll give you a chance to play with (and hopefully to solve) Van’s version of the Memory game.

Attic, part 7

As their teacher’s voice filled the room, intoning the strange words, Jenny and Josh looked at each other.

“Whoa,” Josh said, “Isn’t he supposed to be translating that stuff into English?”

“Keep your voice down!” Jenny whispered. “I’m sure Mr. Symarian knows what he’s doing. Besides, whatever it is, I think something’s happening.”

“What do you mean?”

“Haven’t you noticed?” she said. “It’s getting colder in here.”

“Maybe somebody left the window open…” Josh’s whispered voice trailed off. The window was shut tight. As they watched, lines of frost were forming over the panes of glass. “It could just be a cold snap,” he suggested.

Jenny shook her head, and pointed. Across the room, the window on the office door was also frosting up. Josh stared at the door, agape, and then they both looked back at their teacher. A patch of air above the center of his desk was starting to shimmer, the way hot air shimmers on a summer’s day. The surface of the desk directly beneath was slowly and ominously beginning to darken.

Suddenly there was a popping sound. Mr. Symarian had stopped his chant, and was now peering with interest down at the desktop. Standing there on the desk, looking around with a somewhat disgruntled expression, was a bright reddish-orange six inch tall demon.

As Jenny and Josh looked on in amazement, the demon spread first one leathery wing, then the other, eyeing them critically.

“Hello Sid,” said Mr. Symarian.

The demon glared up at their teacher reproachfully. “You couldn’t have picked a better color, maybe?” he said in what sounded like a strong Brooklyn accent.

“Sorry,” Mr. Symarian shrugged. “I’m a little rusty.”

“Yeah, right. And now ’cause you’re rusty, I’m rusty.” The demon shook his horned head in resignation. “Amateurs! I need a smoke.” He waved one of his tiny taloned hands, and a perfectly proportioned little cigar appeared in his fingers, already lit.

“Sorry Sid, you can’t smoke in here,” Mr. Symarian admonished.

“You gotta be kidding me,” the demon replied. “Who’s idea was it to bring me here in the first place? Cut me a break, will ya?”

“You know the rules, Sid. Local customs. It’s not up to me. They’re His rules.”

“Crap,” the demon said. There was a bright reddish-orange flare, and the little cigar vanished as suddenly as it had appeared.

Jenny and Josh had been silent throughout this exchange, too stunned to speak. But now Josh found his voice. “You said crap.”

The demon looked at him, as if seeing him for the first time. “What’s it to you?”

“Demons aren’t supposed to say things like that.”

Jenny chimed in supportively. “And whoever heard of a demon that smokes cigars?”

“And what’s the deal with the Brooklyn accent?” Josh added. “That is a Brooklyn accent, isn’t it?” His tone was almost accusing.

Sid rolled his eyes. “Look kids, I’ve had a rough day, and I’m not in the mood to debate theology with a pair of human whelps. But since you asked, don’t you think it’s kind of nuts, these questions?”

“I think they’re perfectly reasonable questions,” Jenny said, and Josh nodded in agreement.

“Oh give me a break. I’m a friggin’ mythical creature. You know, as in `Imaginary, fictitious, not based on facts or scientific study.’ I’m not even supposed to exist. You gonna stand there and tell me what accent I’m supposed to have?”

“He does have a point,” said Mr. Symarian.

Vignetting

I was watching a rather high-tech film the other day, and suddenly I noticed how crisp were the edges of the screen. In the film a character stood in the foreground, framed from chest up against a brightly lit interior, and all of this was surrounded by a rectangle of inky blackness — the areas within my vision that were off of the screen image.

Oddly, the seemed notable precisely because it is a phenomenon that generally goes so unnoticed. The sharp line between light and dark, the sudden horizontal slash that cuts of a character at the chest or waist or neck, we see these intercisions every day, and yet we never really look at them. And yet they are so at odds with the way reality itself operates. In the real world there are no such sudden cut-offs. The world flows in a continuous way, from one atom to the next. When bodies in the physical are cut into pieces, it is not so much an artistic choice as it is an act of extreme violence.

What came to mind as I observed myself observing this was the now long obsolete phenomenon of vignetting in early silent films. In many early silents, you don’t actually see the edges of the frame. Rather, the filmmaker deliberately throws out a portion of the frame, fading everything near the edge to black in a smooth and fuzzy transitional zone.

I had never understood before why early filmmakers did such a thing. Suddenly it becomes clear. There was no reason for those cinematic pioneers to believe that an audience would accept the sight of a head severed sharply at the neck or a body cut off below the waist. They were trying to protect their audience from odd images of violence, dismembered limbs, headless bodies. There was, as yet, no well developed theory of mind for a cinematic audience, and so there was not yet a consensus on a most plausible representation of human reality on screen.

I believe we are faced with similar issues with the introduction of each new information technology. At first artists feel they need to be literal, to protect their audience from the sheer strangeness of our new mode of expression. But then at some point they learn to relax into it, to see the places where an audience is able to embrace an abstraction, a sort of short-hand.

TV shows in the last decade have become thoroughly post-modern, with meta-dialog in which the writers gleefully speak directly to the audience through the mouths of their characters. In the midst of an otherwise realistic love scene or conflict, a character will suddenly describe their motivation, or the dramatic irony of the show’s set-up.

This is but one of many examples. The vignette, that soft fuzzy transitional layer around the edges that attempts to distract us from the fact that we are watching a fiction, is no longer necessary. Audiences are now used to seeing characters severed in half at odd moments, their spoken thoughts and expressed emotions suddenly sailing out of the frame of the story.

I suspect, as computer-mediated character driven interactive narrative starts to come into its own in the next ten years, that we will see more kinds of vignetting obsoleted, as player/observers of these emerging media learn how to jump in and out of the frame, in their enjoyment of these new fictional worlds to come.

Attic, part 6

Mr. Symarian was in his office when they went to see him the next morning at study period. He seemed so small sitting behind that big desk. Nobody really knew how old he was — he just seemed to have always been part of the school.

Jenny and Josh stood in the door for a while, just watching the light reflecting off Mr. Symarian’s bald head as he pored over what looked like the biggest book they’d ever seen. He seemed so absorbed in what he was reading, and neither of them wanted to disturb him when he was working.

Suddenly he looked up at them, and then smiled a broad smile. “Children, do come in! Have some chocolates.” He pointed expansively to a dish containing assorted bonbons. Mr. Symarian’s desk was always a reliable source of chocolate.

“Um, I don’t think we’re children,” Jenny said.

“Speak for yourself,” Josh cut in, grabbing a fistful of the chocolates.

Mr. Symarian leaned back in his chair and regarded them with amusement. “You two look so serious, like you’re on a mission.”

“You could say that,” Jenny began, holding out the scroll.

Suddenly Mr. Symarian became very serious. “No, it can’t be!” he said. “It’s been years …. Where did you get this, child?”

This time Jenny knew better than to correct him. “It’s a long story, but the important thing is that it’s got stuff written on it that we can’t understand.”

“No, you wouldn’t,” he replied. “It’s in the Old Tongue. Very few are left who know the old ways. Can you tell me where you found it?”

“Are you saying we stole it?” Josh said, forgetting all about the piece of half-eaten chocolate in his hand.

“Oh no, not at all. You might even think you did, but you couldn’t have. The fact that you are holding this scroll means that you were supposed to have it. It is what was meant to happen.”

“Mr. Symarian, I’m sure that made perfect sense,” Jenny said, “but I have no idea what you just said.”

He looked at her blankly for a moment, and then he laughed. “No, you wouldn’t, would you? It doesn’t matter. I imagine you came to me to translate the thing. Is that about right?”

“Oh yes, that would be great!” Jenny said. “Could you really?”

Josh nodded in enthusiastic agreement. He would have said something, but he was just finishing off the last of the chocolate, and his mouth was full.

“I can do even better than that,” Mr. Symarian said. “Shall we begin?”

Jenny handed him the scroll. Their teacher unfurled it and placed it carefully on the desk, as though handling a thing of great rarity. Then, to their surprise, he started to read the strange foreign sounding words out loud.

Where it all started

Since I’m visiting the MIT Media Lab this week, I have much occasion to ponder where the zeitgeist might be going in multimedia. Clearly those at the forefront of technology are increasing our collective abilities to transmit our presence remotely, create new and powerful forms of sensory interaction, build ever more wonderful interfaces for virtual and augmented reality, and in general blur the distinction between bits and atoms (to borrow a well-quoted meme from Nicholas Negroponte).

And yet when we all pile in to see Avatar in IMAX 3D, immersing ourselves in a sensory world only made possible by the very latest and greatest of cyber-capability, how do we communicate our enthusiasm with each other? What is the preferred medium for this brave new world of future connectedness, for the hive mind communicating with itself?

Ironically, our tech-savvy new generation turns to Twitter — 140 characters of bare text, sans image, sans video, nothing but the pure naked words.

Perhaps there is a collective instinct to turn back to the most purely unadorned expression of the human mind. To reject the intermediaries of Flash and YouTube, to turn away from 3D graphics and the like. When we really just want to reach out to each other, to find a sense of immediacy and connectedness, we ditch the hi-tech trappings, and go back to our roots.

Presented with all the possibilities brought about by twenty first century technology, we instinctively circle back to where it all started — the written word.

Attic, part 5

Jenny picked up the scroll and gave it a long hard look. “You wanna do the honors? After all, it’s your wooden chest.”

“Well, technically it’s not my…” Josh began. “Oh, nevermind. Just give me the scroll.”

He took the scroll from her, and pulled on one end of the ribbon. The knot came free and the yellow ribbon fluttered to the floor. He placed the scroll down on one of the library tables and unfurled it, spreading the document flat against the tabletop.

“Oh my god,” Josh said, looking seriously at the incomprehensible symbols on the paper. “Do you realize what this means?”

“No,” Jenny said, looking at him expectantly.

“Neither do I,” Josh replied, grinning.

“Dork,” Jenny said.

“Sorry, that was just too easy. I may be a dork, but you have to admit I’m a funny dork.”

“I don’t have to admit anything,” Jenny said, but she wore a trace of a smile while she said it. “Any ideas on how we can get this thing translated?”

“Ah,” Josh replied. This is a job for Mr. Symarian.”

“You mean the English teacher?” Jenny asked incredulously. “What would he know about something like this.”

“Quite a bit,” Josh said. “He knows everything about all sorts of old languages and stuff. Trust me, Mr. Symarian is our man.”

“Sounds good to me,” Jenny said. “I didn’t get this far just to be stopped by a little language problem. Lead the way!”

Dance Dance

There has been much positive discussion recently around the recent push to use “Dance Dance Revolution” in schools as an exergame — a game that gives kids healthful physical exercise, by engaging in play that involves their entire body. Why not have fun while fighting our national epidemic of child-obesity?

But I think these people are missing an opportunity. As long as you’ve got kids playing DDR in schools, why not use this as an opportunity to teach them other valuable skills? For example, a variant of this healthful game could be employed in science classes, but with content up on the display that takes a young learner through the principles of Darwin’s theories of evolution and the origin of species.

Of course you’d have to change the name to something more appropriate like “Dance Dance Evolution”. Think of the benefits of such a game. While exerting herself to dance according to various ever-changing patterns, the inquisitive young student could be “leveling up” by advancing through the species, starting with humble amoebae, rapidly progressing through the invertebrate and amphibious states, and finally arriving at the pinnacle of Darwinian evolution — the primates.

Think about how appropriate this is. The student learns all about survival of the fittest while becoming ever more fit. It doesn’t get much more poetic than that.

Of course some parents might object to subjecting their impressionable young children to something as cold and heartless as evolution. After all, nature can be very cruel, and some families might prefer a friendlier alternative. For such folks, it should be possible to come up with a different educational exercise game, one that does not conflict with their happy ideas about people being the center of the universe.

For such people, we could provide “Dance Dance Revelation”. In this joyfully educational game, children would lose weight by jumping around in various ever more challenging step patterns, while trying to “level up” to increasing states of enlightenment. In the Christian version, children could start out in a state of sin, and gradually exercise their way to increasing states of beautitude, eventually reaching sainthood.

Again, the dance-as-exercise metaphor is quite apt. The student achieves enlightenment while literally becoming lighter.

Of course the apparent tension between these two concepts is an entirely Western problem. For the Hindus, things would be much easier. We could just make a single game and package it as both “Dance Dance Evolution” and “Dance Dance Revelation” — two for the price of one. In either case you would start out as an amoeba and gradually work your way up.

One could argue that James Cameron had pretty much the same synthesis in mind. “Avatar” is essentially a story about Revelation brought about by Evolution. Or maybe Evolution brought about by Revelation (I think one of these is the 3D version).

That’s probably why the Vatican gave the film such a negative review. If you go around claiming that one can achieve a state of higher spiritual consciousness by placing one’s faith in evolution, you’re not going to make a lot of friends in Rome.

I’ve seen a lot of people dancing around these questions, and getting pretty worked up in the process.

But that’s a different kind of dancing entirely. Maybe if they get worked up enough, they’ll lose a few pounds.

Attic, part 4

After the closing bell, they waited until the last stragglers had left school. When they were sure there wasn’t a soul around Jenny and Josh made their way to the school library.

“Well, this is it.” Josh said.

“Yes,” said Jenny, “but how are we going to get into the library?” The two of them looked at the forbidding oak door. Even if they’d wanted to, they couldn’t have forced their way through a door that big.

“Wait, I have an idea,” Josh said.

“OK,” said Jenny, “What’s your brilliant plan?”

“Watch,” Josh said. And with a look of studied concentration, he turned the door handle. The library door swung inward.

“How did you…” Jenny started.

“It was easy,” Josh shrugged. “The librarian never locks these doors after hours.”

“And you would know this how?”

Josh looked sheepish. “I like to come here to read after everyone’s gone, but I have a reputation to uphold. If kids found out how much of a bookworm I really am, they’d lose all respect.”

“You’re a dork,” Jenny said. “Fortunately, you’re a lovable dork.”

The two of them pressed on. Soon they were standing in front of the glass case, staring at the old wooden chest.

Josh tried the glass door. “No luck this time — this one’s really locked. Are we going to be doing any glass smashing today?”

“Not necessarily,” Jenny said, walking over to the librarian’s desk. “I’ve spent some time around here too, you know. This is not a very high security establishment. And you pick up some things if you know how to watch.” She opened the top drawer of the desk and rummaged around. “Aha!” she said, holding up a small metal key. “No glass smashing today.”

The little metal key indeed unlocked the door to the glass case. Soon they had removed the wooden chest from the case.

“You want to do the honors?” Josh asked. “After all, it’s your key.”

“Technically I’m not sure about that,” Jenny said, “But it’s probably true to a first approximation.” Gingerly she inserted the skeleton key into the little skull-shaped keyhole in the wooden chest. Nothing happened.

“Um,” Josh said, “I think you have to turn it.”

“Oh, right, I knew that. At least I think I knew that.” Jenny turned the key to the left, and they both heard a definite click. Slowly Jenny reached out with both hands, and lifted the lid of the chest.

There, lying in the middle of the chest, was a scroll, tied neatly with a faded yellow ribbon.

Variety

I realized during last November’s NanoWrimo that posting an entire novel on-line without “commercial interruptions”, as it were, is not the optimal use of the weblog as a medium. A daily posting needs variety. Otherwise people start to cross their eyes, everything goes blurry, pictures begin to shift around on the walls, and before you know it, devoted blog readers everywhere are speaking in tongues and levitating small household objects.

So consider today’s post as a friendly message from your sponsor.

While I’m here, I might as well talk about something. In particular, a snatch of a conversation I had over coffee yesterday. A colleague and I were discussing the fact that there is woefully insufficient cultural cross-over between the interests of art and the interests of science. I’m not talking about weird stuff like “an abstract interpretive dance about quantum theory.” Rather, a genuine merging of these two great human quests — the quest for aesthetic/emotional meaning and the quest for objective truth.

Soon after that point in the conversation I found myself, unexpectedly, telling my colleague: “I might be one of the few people I know who loves to do science that also really really cares why Austen had Elizabeth Bennet start to realize she likes Mr. Darcy in that particular chapter, rather than two chapters before or two chapters after.”

The person I was talking to knew exactly what I was getting at. I’m sure there are lots of people identified as “scientists” who share my passion for such questions. It would just be nice if there were more of us!

Attic, part 3

Sitting in the courtyard at lunch break, turning the key over in her hands, Jenny pondered it with care. She was so lost in contemplation that she didn’t hear Josh come up behind her until he exclaimed, rather loudly, “Nice key!”

Jenny nearly jumped in the air. “Jeeze”, she glared. “You nearly scared me to death.”

“Sorry,” he smiled, clearly not sorry. “What’s that? Finally found the key to my heart?”

She just shook her head in disgust. Josh was cute, but there was no getting around it — boys simply did not mature as quickly as girls. For the crime of liking the male half, it seemed she was forever doomed to the company of geeks and morons. Oh why couldn’t she like girls instead, like Chloe? Life must be so much more pleasant for Chloe. Besides, that might be a way to get through to Mom — finally something Mom would really have to notice. The thought made her smile.

“Ah, starting to appreciate my fine sense of humor, I see,” Josh grinned.

“No, you dork, I was just thinking how great it would have been if I’d been … oh never mind. You wouldn’t understand.”

Josh shrugged. He’d learned long ago not to try to follow the convoluted path of Jenny’s thoughts. “So, what’s with the key?”

“I’m trying to figure out what it opens.” She continued to regard the key thoughtfully.

“Looks like a pirate key to me,” Josh suggested.

“It’s called a skeleton key,” Jenny explained impatiently.

He grinned at that. “Why would anybody want to lock a skeleton?”

“Can you please be serious for five minutes?” she asked. “This is important.”

“Sorry,” Josh replied. “Serious is against my nature, but for you I am willing to make an effort. Why do they call it a skeleton key anyway?”

“I think it comes from the shape of the keyhole,” she explained. “Round at the top and kind of flared out below — kind of like the shape of a skull.”

“Oh, right,” he said. “You mean like the keyhole in that old wooden box in the school library — the one they supposedly found in that time capsule forty years ago. I remember Mr. Flanders told us in class it was the only object in the capsule they could never get open.”

The two of them looked at each other, then they both looked at the key. When Josh looked back at Jenny he saw that she was regarding him with the sweetest smile.

“You are a genius!” she exclaimed. “I could kiss you.”

Josh felt a very complex mix of emotions. He was sure that later he would think this was a very good moment, but right now he felt way out of his comfort zone. He knew he was supposed to say something here, but for once he was at a loss for words.

Jenny was too excited to notice. “Hey,” she smiled, even more sweetly, “would you like to go on an adventure with me to open that box?”

Faced with a concrete task, Josh once again found himself able to focus. “Well,” he said, “you do realize it would involve breaking into a locked glass case, tampering with school property, and probably violating about a dozen school regulations and at least one state law.”

“Will that be a problem?” she asked.

“I don’t see why,” he smiled. He wasn’t sure, but he had a feeling this whole crime thing was going to be a positive step in their relationship.