Thursday, August 15, 2013

Gone Home: A Signpost, Not a Destination

I have trouble with empathy in games.  And in movies.

Sometimes I apply it wrong.  I refused to finish Shadow of the Colossus largely because I resented being expected to give a shit about the 'hero' or his damsel, and I resented being asked to torture what I perceived to be innocent animals (I also fucking hated its controls, world, intro, direction finding).  I will not be playing Castle Doctrine not because of its treatment of women (which I seriously have issue with) or its glorification of paranoia, but because the first thing I saw on visiting its website was a long, detailed change log focused on a mechanical discussion of beating pit bulls to death with crowbars.

Sometimes I don't apply it at all.  I laughed my way through Black Swan and only realized after that it wasn't a comedy.  I want Jim and Pam to fall into a well that is on fire.  I would rather watch YouTube videos 'refuting' Tropes Vs Women than be subjected to another Quantic Dream abomination.  I think Ferris Bueller is an entitled brat.

I demand characters earn my empathy, to prove that they are worth my time and my energy.  Simply existing, simply having struggles, is not good enough.

I tell you this so that when I tell you Gone Home made me feel for and with its characters you understand my full meaning.


Gone Home is environmental storytelling boiled down to its purest essence.  It is an hour-long exploration into what can be done with indirect storytelling.  I don't know if I've ever seen a game do this kind of storytelling this well.  There are some that come close, like System Shock and Cargo Commander, and a lot more that look (even more) like blunt instruments in comparison (BioShock and The Last of Us).

The excellence in crafting is, well, excellent.  Admirable.  Needs to be aspired to.  The house is evocative, creepy and convincing.  By the end of the experience I understood the parents without a single piece of direct characterization.  I grasped their struggles and mindsets and desires, all from a few scattered notes and books and pictures.  It was marvelous, realizing that I was being steered into feeling empathy and disdain for characters not only fictional but completely unseen!  Not only are they not shown, you are never even directly told about them!  Even in the sister's audio journals, she never specifically characterizes them.  There is no exposition of them as people, and there shouldn't be.  The language is natural and convincing in a way that is rare enough in literature, never mind games.

The game describes itself as being barrier-less, and that's true.  Moving through the house felt natural, organic.  As I moved forward, so did the experience.  I always knew where to go, because there was only one way to go.  And that, I think, is where my issues with it begin.  Gone Home is, essentially, a passive experience.  There is no player agency, beyond whether you choose to continue engaging with the experience or not.  It is interactive in the same way that Call of Duty or Mario is interactive: you move forwards through it, see what has been placed for you to see, and then you are done.  You cannot change the experience.

I will say, now and explicitly, that there is nothing wrong with this.  Gone Home is a game, and it is art.  That is not, to me, up for debate.

And yet I found myself yearning for barriers.  The closest thing to what I would call real 'gameplay' is right at the very start you must find the key to unlock the front door.  When I began exploring the house, I moved things around, played with them, examined them.  I piled toiletries in a running sink.  I searched for play, but found narrative.  There are very, very 'lite' puzzles around finding combinations and keys, but they exist to pull you through the narrative, as they should.  I wanted to feel accomplishment and failure, not just empathy.
I think, at the end, Gone Home is absolutely a game, but it is also only part of a game.  It is a game like Crackdown: an excellent, engaging and superbly crafted exemplar of how to do one facet, a critical facet, of interactive media.  But it is not a holistic experience, at least not for me.  I experienced a nice, well-written and gracefully handled story of teenage love and alienation, that dealt with gender issues and sex in the way that games need more of.

And yet I am lingering upon threads not tied off.  Why was there blood on the bathtub? Who was Oscar, and why did he want to come back? Why is it called the "Psycho House"?  What were the secret passages built for?  When the story reveals its sweet, prosaic ending my immediate response was, "Yes, okay, that was nice, but what about the interesting stuff?"  My willingness to engage diminishing with my interest with the characters.  I wanted my brain to be engaged, I wanted to feel accomplishment, I wanted to play.  The beautiful thing about games, the thing that makes me love them as a medium, is that games alone can make me really feel like I earned the narrative, that I am part of it and I can touch the narrative in a way that I never could in a book and that there is more to it than what I placed in front of me by the creators.  Gone Home uses the tools of games to tell me a story about a stranger's family.  I am a non-participating observer, a ghost in someone else's house.  I am not part of it, I cannot touch it.  It is excellently told, and it is a good, important story for a game to tell, but I still enjoyed it in the way that I enjoy a movie or a book, not in the way I enjoy a game.

Gone Home is good, and interesting, and well-made, and worth the money and the time.  But for me it is not the end of the journey to great narrative in games.  It is a signpost, a reminder of what we need to do as we push the medium along.  Art pointing the way to Art.  It tells its simple, touching story and then it is done.  The promised mystery deflates into the story of a family grappling with disillusionment, hope, detachment and coming-of-age and as the credits roll the first thought is, "I've seen this before."  The way a story gets told has been pushed, but not the story itself.  I don't want to observe this story again.  I want to live it, experience it for myself, and have to grapple with these issues myself, not listen to someone tell me about them.  That is where the magic of games is.  They make you, the player, the consumer of the medium.  That someone can share with me what it is like inside their own story.  Instead I feel like Gone Home's main character, unable to touch what has happened, only to look at it, passive and uninvolved.

But it's still gotten me thinking, and feeling, and engaging in the conversation, and I will remember it every time I think about or deal with storytelling in games, and maybe that's enough.

Saturday, May 25, 2013

Game AI, Analysis Paralysis and Buridan's Ass

This post stems from reading this article over on io9 about the philosophical paradox of Buridan's Ass as applied to modern computing and a conversation I had on FB after sharing the article with my thoughts thereupon.  The article does a good job of summarizing the paradox, but I'll re-summarize here in case you can't be arsed to follow the link.  Essentially, a 14th century philosopher named Buridan proposed that a deterministic agent would get 'stuck' when presented with two equally attractive choices of the highest priority.  The example that was used to mock him was that by his logic if a starving donkey were placed equidistant between two piles of hay it would starve to death because it would be unable to decide between the two piles given that they were equally attractive.

This is, clearly, bunk.  At least as applied to animals.  Right?  Well, sort of.  There's a related concept called analysis paralysis (it's almost as much fun to say) which basically says that given enough inputs it's possible to freeze up and be unable to reach a decision.  I don't think animals suffer from it much, being a little more pragmatic about stuff, but humans do.  A common example is in sports where the split-second decision making required is overridden when a player spends too long weighing options.  Or, in a more relatable example: every time I use Netflix.  Seriously.  Every time the wife and I go to watch a movie we spend about half an hour delicately stepping around the fact that I have a lot of trouble watching anything I perceive to have an insufficient quantity of explosions, spaceships, facepunching or Luc Besson (yes, I'm aware these criteria imply The Fifth Element is my perfect movie and no, I'm not averse to that conclusion) and the fact that she would prefer to watch movies in which the plot is more differentiating characteristics than "Jason Statham has hair in this one."  There are too many inputs and too many criteria, so decision making takes a long damned time.  However, when I'm just putting a movie on for background noise it takes about thirty seconds.  Mongolian Death Worm?  That can't be bad!  (Spoiler alert: yes, yes, it can.  So bad.  Not good-bad.  Bad-bad.)

So where does that leave us?  Well, it means that agents with sufficiently complicated or overwhelming inputs can get stuck and be unable to reach a decision.  This would probably be a bad thing for game AI, right?  So let's talk about that.

Before we go further, I should point out that I am not an AI programmer, and my experience with AI is by osmosis of working with and around it and the AI scripting I've done myself.  So it's possible I'm about to wander off into Really Wrong Land.  I mean, I doubt it.  But it's possible.  I guess.

Alright, decision paralysis.  That's what I'm calling it for the rest of this post, bee-tee-dubs.   So, any kind of paralysis in AI is something devoutly to be avoided, right?  I certainly think so.  Game characters getting stuck is a pretty egregious bug.

So how could we reach a situation in which an AI agent is caught by Buridan's Ass, or analysis paralysis?  Well, the conclusion I reach is that you kind of can't, not if you're writing your code properly?  Why?  Because Buridan's Ass assumes that it is possible for two things to ever be of exactly equal priority, which is not something built into AI, just because of how code works.

Here's some lovely pseudocode to demonstrate a decision-making tree that is capable of being caught by Buridan's Ass:
if (food1 > food2) then eat(food1)
else if (food2 > food1) then eat(food2)
So you can see why the decision making would fail in the case of food1 and food2 being exactly equal: there's no case to handle that. And that's kind of bad programming.

Here's some example code you're more likely to see written:
if (food1 >= food2) then eat(food1)
else eat(food2)
This is more like what someone writing proper code would write.  It handles the case of both being equal by automatically preferring food1.  A more complex version might be to handle the two > cases separately and then add a random decision between the two if they're equal.

Of course, this is a super-basic decision making.  What if we having something a bit more complex?  Let's say the desirability of the food is based purely on distance and the agent should move towards the closest and interact with that.  This is a pretty likely example of how that might be written (again, not because it explicitly prevents this problem, but because it's the logical way):
desiredFood = foodList[0]
for each of (foodItem in foodList) do
    if (distanceTo(foodItem) < distanceTo(desiredFood))
      then desiredFood = foodItem
In this case, we can never get stuck simply because we are not evaluating all inputs at once and even if all inputs are identically desirable the first input considered (or last, depending on how you write your code) is the choice.  The idea of hysteresis covers this.  It can roughly be summed up as "inertia", but it's a term I was only recently introduced to and the Wiki article and/or a friendly person with a Comp.Sci. degree would probably be more help if you want details.

So at this point it seems that while you could encounter a situation like Buridan's Ass, you probably won't and if you do, it's probably because you wrote your code wrong.  And the reality is that except in cases like the first one, where there simply isn't a safety case, you can't introduce the problem of the AI getting stuck between two choices.

The reason for that is that AI decision making, at some level (maybe far down, but there), is binary.  It all eventually comes down to acting on a single input.  To continue our example, let's look at the hypothetical guts of the eat(food) function.
function eat(object food) {
   hungerLevel = 0
Notice anything about that function?  It only accepts a single object.  You literally can't give it multiple inputs for it to (heh heh) choke on.  If you tried this your compiler would yell at you, things would break in the game, and you'd generally feel a tiny bit dumb and hope none of your coworkers noticed because you know that if you caught them making that mistake you'd probably laugh or at least feel a bit smug and superior.

That's how people behave, right?

Now, that's how Buridan's Ass might crop up in a basic decide-between-two-things case, and how you can (and probably will) prevent it.  There are other ways that a similar problem can crop up.  Your agent might get into a state where they either receiving no input at all, or they're only looking for a very specific input that they'll never receive.  The other one is infinite state looping.  This occurs when switching between two sets of priorities and the signal to switch back is received immediately.

Let's use our hungry donkey example for that one.  Only now he's hungry and thirsty.

So, our donkey sees a bowl of water and a bushel of hay at equal distance and his hunger and thirst levels are maxed out.  So what happens?  Well, thanks to your properly structured decision maker, the donkey decides to go for the water first.  However, inside the "I'm going to water" state, you put an override clause that says, "I'm REALLY HUNGRY" that sends the donkey to food, and vice versa inside the "I'm going to food" state, thinking that the donkey shouldn't be going to one resource if the other is completely empty.  Now the two states will cycle infinitely because every time one starts, it hits the override and swaps.  Broken donkey, but the basic idea is sound.  The best way would be to not let that safety case fire if the current demand is completely at maximum demand-y-ness and some other condition is not met.  So the donkey might decide to go for water and not go for the food until it's thirst is completely (or mostly, or whatever) slaked.

So, in summary?  Buridan's Ass isn't really that big a deal for game AI as long as you're Doing It Right.  I honestly don't know that I've ever run into it in the real world, simply because the fact that your AI code eventually boils down to a function that can only accept a single input means you tend to instinctively build prioritization systems into your code.

Thanks to Jade, Paul and Gil for engaging in the original discussion and formulating examples, etc.

Wednesday, May 22, 2013

Existentialist Sesame Street Musings #1

I have to watch Sesame Street a non-trivial amount.  Here's a sampling of things that pass through my head as I do.

What Is Real?

Mr. Noodle presents so many interesting metaphysical questions. Is he a real human being, or some kind of construct of Elmo's imagination? He clearly feels emotions like shame, pride, responding to Elmo's crude taunts and praise at least at a canine level. Does the strange pocket dimension he appears to exist in continue to exist when the window closes, or are it and Mr. Noodle with it suspended into some kind of living non-existence? Why is he so unable to speak? Is that a function of being a mere construct (a construct that must be aware of the changeless horror of its existence) or if he is a man is he kept from speaking by the same forces that trap him in that fold of space adjunct to Elmo's World?


Ben Stiller is dressed as cheese and singing and there are Muppets attempting to feast on his dairy product flesh. Sesame Street looks into my very soul and presents a mirror that I might behold.

The Great Hereafter

When I get to Hell, the Devil will greet me by singing, "Elmo loves his goldfish, his crayon toooooooooo...."

Why Dan Brown Is Terrible

This month there has been a gross, even unforgivable violation of all that is right and just, and I cannot remain silent about it any longer. No, I'm not talking about the BC election, or even a certain Leafs/Bruins playoffs series.

I'm talking about the fact that Dan "Literarily The Worst" Brown has a new collection of words printed on bound paper that is for sale RIGHT NOW. I cannot call it a book, for nothing deserves that name that surely sets generations of grammarians spinning so violently in their graves the Earth's axial rotation will develop a measurable eccentricity.

Even now, as I string letters together to form communication, people who might otherwise be considered basically decent are giving him money and praise for committing upon my one of my favourite works of literature acts so vile the only adjective that springs to mind is "Westboro."

These people deserve to be pelted with rotten fruit and shamed publicly by their dearest loved ones.

Last week son and I were in Coles, as part of our weekly "father and son visit the library and the mall and give mummy quiet time" trip, and I had the misfortune to witness a woman actually playing actual money for a new, hardback copy of Inferno.  I had trouble not smacking it out of her hand with a rolled-up newspaper while yelling, "No! Bad! Bad representative member of the average reading public! Bad!"

Now, you might say to yourself that I'm overreacting, that people just want to read easy, digestible literature filled with plot points and events and things that happen and hey, at least it gets people reading, right?  And that's fair, that's perfectly acceptable.  I am not going to contest the shameless enjoyment of pulpy genre fiction, especially since it probably makes up the majority of my reading intake (there is a special place in my heart for the Gears of War novels, for example).

Unfortunately, that sentiment of "it's just genre fiction" is both bad for all the serious literature that happens to involve SPAAAAAAAAAAAACE and it's what's so pernicious about his work. At first you think that maybe this is something okay to read on the commute or the bus and maybe you enjoy it if you don't think about it to hard, maybe you even get a kick out of all the art history references, maybe it makes you feel smart, gives you little bits of trivia to smugly drop on people. But if you examine it, if you dig into the horrible, clumsy narrative, awkward dialogue, painful exposition, turgid descriptions, geographical gaffes and historical inanities masquerading as fact you discover you've let something dangerous creep softly into your life, like the slow erosion of personal freedoms in the name of ephemeral security, or a sloth who blames you for his divorce.

Of course, my big issue with Dan Brown, leaving aside the many technical problems with his writing, is that his work is presented and accepted as representative of facts and history. It is about The Da Vinci Code that he said, "Robert Langdon is fictional, but all of the art, architecture, secret rituals, secret societies, all of that is historical fact," when the book is filled with egregious errors of geography and language and promulgates blatantly false or misleading pseudohistorical ideas like the Masonic imagery in Rosslyn Chapel, or the Illuminati existing, like, at all.

If he were to say, "Yeah, I'm making all this up for the sake of a good story," then fine, cool, godspeed you merry gentleman. But he doesn't. And it drives me nuts.

One of my favourite authors and probably my favourite historical novelist is Bernard Cornwell. Not because he's The Best in the genre (that would probably be Patrick O'Brian), but because he 1) writes a great story, and 2) he shows his work. After every book he makes a point of explaining his research, his sources, why he made the decisions or chose the historical interpretations he did and, most importantly, explains what he changed and why. On more than a few occasions he's offered apologies to historical figures whose accomplishments he stole or whose names he villainized.

I don't need everything to be pedantically and slavishly accurate, but when an author changes something or misrepresents something, they should have the moral courage to admit to it, to explain how it makes the story better. Spreading ignorance helps no-one and when Dan Brown claims to be educating people and is believed to be doing so, then what he's actually doing is disseminating disinformation and promoting deeply flawed understandings of history.

I know this feel.

"It's Time To Stop Treating Dads Like Idiots" - from

The article linked talks about the author's response to the onesie pictured, and how this idea of mocking fathers is both prevalent and bad.  I agree.

I think I'm lucky in that I haven't had this kind of thing targeted directly at me, but it's very true that pop culture sets abominable examples for fatherhood. It's something I was aware of, even from a relatively young age (or so I remember). On the one hand you've got the completely and disgustingly incompetent Homer, the spineless and emasculated Ross, the well-meaning but useless father figure Disney loves to show (Aladdin being a prime example), the borderline abusive who is emotionally unavailable (Red Forman), the absentee and/or deadbeat and/or left his family to marry a hotter and younger woman and no longer has any interest in his child (pick just about any 80's movie), and of course the Actually Evil (Darth Vader). Even when fathers ARE competent (which is rare), they usually die or are otherwise made unavailable (Mufasa, Uncle Ben).

On the surface it might seem like that is changing, with the image of the still-cool dad with the baby carrier on his chest become more prevalent, but I still haven't seen one of those that doesn't come with a slight edge of mockery or tacit encouragement that being a "cool dad" means you still behave like a frat boy when the Overbearing Wife isn't looking. I saw an ad for a show about fatherhood that featured four dads sitting in a playground ignoring their children while drinking and smoking pot. Absolutely maddening.

That relationship with the wife can also be a pretty toxic message. Assuming she's even AROUND (I'm looking at you, Disney, AGAIN). Frequently wives and mothers are seen as the spoilers of fun and cleaners of messes who do all the "real" parenting while Dad learns Important Lessons and doesn't do much beyond delivering the occasional heart-to-heart at a critical juncture. Frequently this Dad Ex Machina kind of ending or plot point seems to make unimportant all the work the so-overworked-she's-bitchy mother and reinforce the message that fatherhood is not really something you do all the time.

Another example of this phenomenon of casually mocking fathers, to return to the original point of the linked article, is the meme to the right, of "fathers in the baby food aisle" that shows several men on their phones clearly getting their wives to guide them through purchasing the correct baby food. This picture really irritated me, and it's because there's a certain element of truth in it. The reality is that I do not spend all day, every day with my son and I am not the primary decision-maker on many child-related products, so I sometimes have to check with the wife before I get stuff. This notion that I am somehow failing or making myself worthy of mockery is frankly shitty. I can't deny that I sometimes feel self-conscious when buying baby products on my own, especially if I have to take a moment to find or decide between things and it's for exactly this reason. I have more than once gambled on getting the wrong thing before being seen to call for help because I KNOW that that's how the parents around would view me. So the danger there is that why try and be better, why risk failing when the reward is not education or support but negative reinforcement?

This is not, of course, to suggest that there is not an equivalent cultural phenomenon targeted at women. There is, it just applies its pressure and sets its examples on the other end of the spectrum. The difference, I find, is that there is also a cultural protectionism of mothers. You can criticize imperfection in mothering, but you can't mock just for trying. Fathers can be both criticized and mocked, and are. You're criticized if you don't get involved and be an active parent, and you're mocked if you do.

All of that said, though, the world is not entirely a carnival of feces and shame. As I said above, I'm fortunate in not being subjected to this on a personal level, and as my peer group is increasingly populated by parents I see how many fathers there who appear to be doing a great job despite the dearth of positive examples in the media. I suspect internet culture has a great deal to do with this, as resources like the linked-to blog proliferate.

I would also be remiss if I didn't point out that I had a pretty good role model for how To Be A Dad.  That's always a bonus.