Monday, December 24, 2012

A Talmudic Shipping Problem

We don't do Christmas but I do encourage my kids to take advantage of Christmas specials. So when ThinkGeek offered a 20% discount on orders over $100 my kids knew they had an opportunity. 

It turns out that working out what you might want is quite tricky. This is because ThinkGeek has clearance items like Giant Inflatable Robot Fists that apparently no one other than my son wanted. But they eventually did it and their cart looked like this.


They came to me to enter credit card information.

"OK but I need to know what I am taking out of each of your bank accounts?"

"Well, just what each of us paid for what we wanted."

"Yes, but what about shipping? That's $42.84 to Canada. What are each of you paying for that?"

"Well, we will divide it by three."

"Then your 8 year old sister, who is ordering one Hair Bow and a few Guitar picks will end up paying $14.28 for that alone when her stuff only cost $3.98. You need to come up with something fairer."

And then the problem ensued. What was fair? They would allocate the shipping costs using some other dimension. 

Child No.1 argued that they divide it on the basis of the number of items ordered. Child No.2 argued that they divide it on the basis of the price paid. So they did the maths. This is what they came back with.


Well, Child No.1 was shrewd. While dividing on items had her pay much more than Child No.2 for shipping it was the better deal. It was also better for Child No.2. However, the amount for Child No.3 was still above what I would have regarded as fair. So they proposed to use the price-based cost allocation.

"I'm still not sure that is fair. Your sister is order very light weight things. Surely they don't contribute as much to shipping?"

"Well, how will we tell? We don't know what ThinkGeek is doing."

"You'll have to work that out."

So they went back and decided to look at what it would cost to ship each of these separately. For Child No.1 it was $29, for Child No.2 it was $31 and for Child No.3 it was $6.95. It turns out that weight was a consideration but there was some fixed component for each order -- perhaps for the box. The two eldest then tried to assert that the original $1.67 allocation to their sister was fair.

"But is she really causing that amount of cost? What happens to shipping if you just leave off her order?"

With a sigh, they went back and did that run. It turned out that it made no difference to shipping cost.

"So shouldn't she pay zero then?"

"No, she is still getting a benefit of sharing our box. What is more, she is getting a discount. That wouldn't happen if not for us."

"Then how much should she pay?"

"She should pay an amount equal to the discount she is getting. She should pay $1."

"But that means you two get her discount. Why should you get all of that?"

I argued, on Child No.3's behalf, that she should only have to pay 50 cents and she should share half her discount with her siblings. Child No.1 dug her heels in and argued with Child No.2 who want to accept the deal. 

That took a little while but eventually they came back and argued Child No.3 should share 50 cents of her discount and contribute 50 cents towards 'the box.' While it was the same as the previous accepted deal, it was better argued so I accepted that.

Many will recognise this as a classic cost allocation problem. Eventually, with prompting, the kids ended up with a solution that was in the 'core.' This is something that Talmudic scholars had discovered centuries ago

It was then time to finally order the goods. Unfortunately, this negotiation (and maths exercise) had taken too long. By the time it was resolved an hour or so ago, ThinkGeek had ended their promotion. The discount and an important basis for the whole exercise was gone. It turns out that this was one of those time sensitive negotiations but we didn't quite know it. Another lesson to accompany the maths and social choice of the day.

I persuaded the kids that they might be better waiting until December 26. There was argument over that. I fear this issue will last all week.


Sunday, December 16, 2012

A Fear Tolerant Equilibrium

Like everyone else, it has taken me some days to even begin to process the tragedy at the Sandy Hook Elementary School in Newtown, Connecticut. There is a part of me that wonders if we ever will but then again, evil things have happened before and somehow life goes on.

In thinking about this, I kept coming back to the strangeness of what Americans find acceptable and how different the experience is for those who come from many other countries, like me, from Australia. Let me provide a story that illustrates this. 

From 2010 to 2011, we lived in Brookline MA. This is a fairly prosperous community with a very strong public school system. The strength of that system attracted residents who cared about the education of their children and that, in turn, fostered a community around those schools. One of the aspects of that community were regular meetings between parents to discuss issues. We hosted one of these meetings, which is why I was at it, amongst Grade 7 parents. The attendees discussed many things but one topic for conversation was "rules for where your children can have playdates." As it turned out, this is not something we had thought enough about to really have rules but I guess we implicitly had them. And I can't remember what rules emerged in the discussion except for one; the very first one mentioned. "Well, I don't allow my kids to go over to a house that has a gun." There were nods all around in broad agreement but to my partner and I, our jaws dropped. 

This was a level of experience that had never occurred to us. We had simply not thought that there might be a gun in people's homes anywhere, let alone Brookline. But as it turned out there were. And I guess our initial reaction was that that sounded like a pretty good rule and we should probably adopt it.

It didn't take us long to start to wonder more about this. First of all, how do you know? Do you like ask the parents if they have a gun and then implement your rule accordingly? How does that discussion work? 

Second, what precisely was the issue with the gun in the house? The first thing that I thought about was that it wasn't safe. The kids might play with it and it is safe to say that is a bad idea. But actually it wasn't clear that was the issue the other parents were worried about. The guns were usually locked away because, after all, the house had kids too. What the other parents seemed to be worried about was the type of person who would have a gun in the house. But I didn't know what to think about there either. I mean there are so many things that I might not like about other parents and having a gun is not necessarily at the top of the list. What would I be worried about? Were they violent? Were they too scared? Did they have a strong protective streak? Or was this a sign of mental instability? Something did not sit right about screening on guns. After all, some of the weird views parents express at these parent meetings gives me much more pause!

In the end, we left the US and moved to Canada where there is no need to have a 'gun in the house' policy so it became a moot point. But the whole experience was a wake up call as to how different it is in the US.

At some level, the US seems more tolerant of living in a fearful equilibrium. It seems obvious to so many outside the US, that it is better to keep guns tightly controlled, if only to keep them out of the hands of the mentally unstable that time and time again, the reaction to events where guns have been in the hands of the mentally unstable and done harm has led to more gun control rather than less. For instance, when 35 people died at the hands a single assailant in the town of Port Arthur Tasmania, the conservative Prime Minister, John Howard, instituted strong controls (although not a prohibition) on semi-automatic and automatic weapons. Moreover, realising that stopping future sales wasn't enough, engaged in a buy-back scheme  to remove 600,000 existing weapons from the public hands. Think about it, this was expensive costing half a billion dollars and requiring a 1 percent tax on all income. (The scheme actually had a statistically significant effect on both gun related homicides and suicides). Here is Howard's response to the Newtown tragedy.

But what remains true is that there is no 100 percent protection. Someone determined and calculating can do terrible things as the Norwegian 2011 massacre demonstrated. That led to serious policing reorganisation but gun control was already tight. Interestingly, it did not lead to a weakening of gun controls.

Why do I say that is interesting? Well, it is worth considering the baseline argument in the US underpinning the right to bear arms. It comes from a belief that guns and gun proliferation actually deters gun crime. The quintessential case would be a mentally unstable person opening fire in a public place only to be cut short by gun carrying citizens. Better still, and this applies less to the mentally unstable, a would be murder would be deterred entirely. The point here is that the fear of armed crimes fuels a baseline argument for more gun ownership. In that respect, it is as much a symptom as a cause of that fear.

But how does this relate to the particular problem of protecting school children? One thing that gun control advocates and detractors appear to share is that school children should be protected from gun crime. The gun control method is to remove the guns. This won't prevent calculated criminals from getting guns but it may well prevent the mentally unstable ones from so doing. One of the things that came with the Australian gun laws was very strong monitoring of gun ownership

What is the alternative view? The idea is that if there were more guns at hand, a gun criminal entering a school could be either deterred or stopped in their tracks. Now, for the mentally unstable, it does not seem plausible that deterrence is the issue. What about a gun-led response? 

This is tricky on a number of levels. First of all, it is not necessarily an issue related to gun control at all. For instance, regardless of whether there is a right to bear arms, you could permit certain forms of security in schools. You could have guards or even arm teachers in some way. The point is that whether you choose to do that is unrelated as to whether you control guns elsewhere; although the need would be related. 

Second, can it work? What would the plan be to defend a school? Should all schools in the US receive some combat training plus drills and contingency plans? That sounds expensive but what is interesting is that those who fear gun crime and believe counter-force is a response do not appear to be advocating this. 

More likely is that trained security professionals are installed in the schools. Now I have had a taste of this. In Australia, my kids attended a Jewish day school. These schools received bomb threats and so there was always some security concern. There were security guards but they were not armed. The basic idea was that if there was some agitator, they could be dealt with. Perhaps if a bomb were being delivered there may be a little more warning. That was the idea.

One day some parents became concerned that that wasn't enough. So they moved to train more parent volunteers in hand-to-hand combat. As it was put to me, the logic was two fold. In both cases the logic was flawed. First, we were told that the security guards were low paid and so we couldn't expect them to really risk their lives for the children. Better to have parents there. Well, that was already wrong. If you believe the incentive issue for the security guard, it was even worse for the parents. They were parents of other kids. Did people really think that was better protection for their own kids? If I was the parent out there, I can tell you that it wouldn't be. In any case, as we have seen recently, teachers -- also low paid for what they were asked to do -- did have the motivation to protect the children.

The second argument was that with clearly visible parent volunteers (they would wear jackets) a would be criminal would see this and, if they are intent on doing damage, go to another school. While this argument was one that worked for one school it seemed to me to be morally abhorrent. You want to train parents in protection to get the crime to move to harm kids in other schools? That didn't work for me.

I wasn't alone amongst parents though of thinking that visible security was not what we were after. Yes, there were risks but living in a way that reacted to and acknowledged very low probability fears was not going to work.

The point, however, is a stronger one. When there is a non-zero probability of a gun related attack on schools, there is no way of countering that perfectly. You could put security into the schools but there is actually an incentive issue there, there is certainly an economics issue and there is an issue of the allocation of security strength. The last thing an education system needs is an arms race on protection. After all, the goal would be to be the most protected school in an area. That is a race to the bottom.

The alternative to all this is more guns in the community to prevent crime where-ever it might spring up. But the same issue -- you cannot eliminate fear -- remains. Israel which comes as close that situation as anywhere has not been able to stop terrorist attacks within its borders. 

In any case, this is a digression. To the rest of the world, gun control is natural and obvious. Many in the US, were surprised when Rupert Murdoch tweeted as such two days ago. I wasn't surprised. He is an Australian and to non-US people, gun control seems obvious.

The question is why isn't it so obvious within the US. It could be a bad equilibrium. There are so many guns that it is (a) impossible to do anything about it and (b) that level of gun ownership leads to others wanting to have guns. 

But I think there is also a tolerance for living in fear that exists in the US that doesn't exist elsewhere. To gun control opponents, they would rather live with the fear of another person with a gun potentially harming them and have that fear be acknowledged by a delegation of control to deal with that person themselves. This is the idea of putting safety in their own hands. They fear other people and also fear no other person can protect them. 

To gun control advocates, they fear those with guns. This was the reaction of the Brookline parents. They fear that gun owners cannot be relied upon to be responsible. The vast majority are. So they often favour outright bans rather than the more intrusive licensing and regulations that other countries have put in place. In other words, they shy away from a nuanced response to gun control in favour of blanket bans. But those bans only last so long as someone invents around them. 

The US is tolerant of fear. In this case, it manifests itself in lax gun control laws. But it also appears to lie at the root of other policies where the US differs from the rest of the world. Not having universal health care, comes with the notion that there it is alright for people to live in fear of a personal health crisis. And airport security perpetuates the fear of terrorism. In each case, the argument that something might be doing just because there will be less fear in the population does not win in the political process.

For the rest of us, last Friday was one of those days that reaffirmed our choices not to live in the US. We just can't understand it.

Wednesday, December 5, 2012

High-Level Storytelling Design

Introduction
I recently started to play the demo for the upcoming adventure game Primordia. I really like the art-style, the setting, themes and the characters (perhaps with the exception of a somewhat annoying companion). Despite this I am finding myself not being that engaged when playing it. The main reason for this is that the game is in a very traditional point-and-click form, which means that it is mainly all about solving puzzles. Despite some good design and an in-game hint system, its gameplay back-bone is holding it back.
Note: This does not mean that Primordia is bad game though, more on this in the end notes.

At the same time we have currently been in the middle of going over some design thinking in our upcoming Super Secret Project. We have been trying to evolve the type of high level design we have used for our previous games and in that process encountered a few problems and come to a few intriguing insights.

The problems I had with Primordia and the issues we have had with our own project are closely related and deal with the high level design used for games focusing on story-telling. This sort of design is what this post will be about. I will start by going over the basic problems, then cover more recent advancements and finally outline our own approach.


The Immersion Conjecture
Since the middle of the 90s or so, the image of adventure games as the kings of videogame storytelling has slowly dwindled. Instead they have given way to more action oriented titles and nowadays most of the major storytelling efforts lie in the action-adventure genre. What has happened is that the puzzle-centric design has been replaced by one where some sort of core mechanic makes up the bulk of the experience.

I think neither of these approaches is a good way to properly do storytelling in a game. The problem with both are that they have a strong focus on the competitive aspect of games. In both of these designs the main goal is not about being immersed but about beating challenges. I have discussed this to great lengths in the paper The Self, Presence and Storytelling. The points important for this discussion are the following:

  • Challenge-oriented games have a core design which I call "black box design". This means that the main goal for the player is to intuitively figure out the game's underlying systems and to beat them.
  • When the focus is on a system of a game, it detracts attention from, or even directly contradicts, its fiction. As a result it diminishes the story aspects of the game.
  • The main focus of  games with storytelling should instead be on creating immersion or, more precisely put, a sense of presence. This is done by having a strong continuous input-out loop between the player and game.
Before going into high level approaches that focus on immersion, the normal adventure design need to be discussed. 


The Puzzle Approach
This approach is pretty much how all of the classic adventure games are built. In essence, they are made up from a set of interconnected tasks that need to be completed. In order to get to A you need to B and C, C requires that D and E are done and so forth. The entire game basically becomes a big puzzle for the player to solve.

This approach has its root in the very first adventure games ever made: Adventure. The game started out as a mapping of a cave system that the author, William Crowther, had been part of exploring. When making an interactive version of it, various puzzle elements, partly inspired by D & D, were added. Apparently the author did not find the virtual exploration of the caves engaging enough on its own. Something more was needed, and the puzzle elements was added to fill that void; a decision that would go on to influence the coming decades of adventure games. (I wonder how different history would be if Crowther had added some Dear Esther-like narrative instead!).

The reason why this approach is so successful is because it makes it very easy to weave an interactive environment together with a story. The puzzles always give the player various tasks to do which provides motivation to go forward. More importantly it serves as a mean for the player to become part of the game's world. It makes it meaningful to converse with characters and it forces players to understand how the virtual world works.

This comes as a cost though. Because the focus is on constantly providing riddles and quests for the player, the game must have a story that support this. There must be a reason for the player to question characters, ways to provide clear goals, plenty opportunity to set up obstacles and an environment that support clever puzzles. The result of this can be seen very clearly; most adventure game are either some variation on mystery/detective story or a classic, fairytale-like, grand quest one.

On top of this comes the problem discussed in the paper, namely that the constant scrutinizing of the game's world eats away on the player's make-belief. It is simply not possible for players to let story-engagement be their main focus. If they fail to stay in a puzzle solving mindset the game will refuse them to advance. This often leads to the somewhat weird situation where playing the game with a guide is more enjoyable than playing it the proper unguided way.

These problem have been known for quite a while, and in recent times some games have popped up that try to do things differently. I will now discuss the most widely used, and most successful, alternative.



The Linear Plot Approach
The basic premise for this approach is to craft the game like a normal non-interactive story. One then looks for parts were it is possible to insert some sort of player interaction and add these to the otherwise passive experience. (This is not how would go about creation such a game exactly, but it describes the type design quite nicely.) The first game I know that did this was Photopia, and it used it very successfully. It is widely regarded as a highly rewarding and emotional experience. The approach has been more popularized by Fahrenheit, which unfortunately got a much more negative response. More recently the approach gained a lot of success in Telltale's adaption of The Walking Dead and here this approach have really showed its advantage to a bigger audience. I think it is by far the best usage of a linear plot design done so far. To The Moon is another, and different, example that also uses this approach to great effect.

What makes this approach so effective is that it is much better at keeping up the narrative momentum. When using the puzzle approach, it is highly likely that players will get stuck and taken out of the experience. With the linear plot approach this happen very rarely since the game is so focused. Right before it is time to give the player control, the protagonist can pretty much explicitly state what is needed to be done without it feeling out of place.

What I find striking about this approach is the very strong scenes that the games let you take part in. Heavy has the basement capture and self-mutilation scene. Walking Dead has the staircase stand off and mercy killing scenes. By having a very strict and controlled path throughout the game, it is possible put the player inside very specific scenes that would have been hard to set up in other kind of games.

Another big advantage is that it allows for a lot more diverse stories, as there is much less pressure on building everything into a puzzle structure. The approach has focus on the presence building qualities of the game medium instead of the competitive (black-box) aspects. Games like Photopia and Walking Dead clearly show how effective this is and there is probably a lot more that can be explored here.

Of course all is not well with designing a game in this way. There are some areas that are really problematic. The main issue is that there is not really much interaction, especially when it comes to building a sense of presence. The basic premise of the approach is just this, so it is really an intrinsic fault and not that interesting to discuss. However, more subtle, and intriguing, problems arise when it comes to picking the actual parts where the interaction happen. Two main issues arise here.

One is that it is very hard to have some sort of consistency in interaction, partly because activities can be so diverse and partly because they happen so rarely. Heavy Rain went the route of QTE's and the result is not that good. While there are some really good scenes, as a whole there are just too many arbitrary button presses. Walking Dead does it a lot better with having a few types of more intuitive input, such as aiming a cross-hair and mashing a single button. But the infrequent usage and not always clear functioning makes this problematic still. Dialog usually work better, but that interaction lacks a tight feedback loop instead. (However, an interesting way in which both games try and make this more immersive if by having a time-limit and banging on about how every choice has consequences).

The other issue is that much of the sense of exploration evaporates. Whenever players are given a space to explore it is very confined and static. The cause of this is that the game always need to make sure that you can go back into "cut scene mode" after an interactive section is over. There is a bottleneck that needs to be reached with very specific requirements met. This means one has to be very careful about moving characters, changing the environment, and so on, in order for the next cut scene to feel coherent. There is also the problem of keeping the quality of characters when starting a less controlled section that lack the tightly polished look of a cut scene. This means only so much can be done with characters during these more open sequences. Finally, because you need to have some overall unity in the control scheme, any open sections can only have the simplest of input. Usually only movement is allowed and the rest handled by some sort of menu like system (basically like a point-and-click game). In the end interaction during these part come off as clunky and contrived.

There is also a big problem when it comes to production. Simpler games like Photopia and To The Moon do not suffer so much from this, but in a game like Heavy Rain it is very evident. Because much of the game is not actively played but passively watched , the need for high quality cut scenes is a must. It needs to be made sure that the player can be engaged when the presence-feedback loop is weak or completely missing. This means tons of assets, which in turn requires the game to be planned far ahead. For instance, Heavy Rain had the complete script written before the production started. And then all motion capture and voice recording needed to be done before gameplay could be tried out. When it comes to making the actual game there is little room for change and iteration, and one basically has to stick with the script. This is a big disadvantage for interactive media as much of the real good stuff can come from unexpected directions.

While linear plot design gives a better sense of flow in the narrative and a more coherently immersive experience, it still feels lacking. The main problem is that there is so much interactive down-time and great loss in the feeling of exploration. There needs to be some other way of doing things. For our upcoming Super Secret Project we wanted to try a different route and craft an experience where you play the whole time.



The Scene Approach
The design that we have come up with is something I will refer to as the "Scene Approach". The basic idea is that you give the player an area, a scene, where they are free to roam. When appropriate players are able to leave and enter the next scene. Each scene should have a strong focus on some form of activity and/or theme  and be self contained. Moving on to the next scene should be evident, either by a very simple interaction (e.g. opening a door), some form of activity (e.g. starting a generator) or by reaching some sort of state (e.g. waiting for a 2 minutes). The same underlying base mechanics should be used throughout the game and interactions should behave in a consistent manner. The wanted end result is to have an experience where the narrative flows throughout the game, but retains a tight interaction loop and a strong sense of agency. It is basically about taking the better interactive moments from the linear plot approach and stretching them out into scenes with globally coherent interaction.

Is this really possible? The moments in the linear plot approach have been carefully set up and are normally extremely focused and contained. Is it really possible to recreate this in a more open environment and without any cut scenes? The scene approach cannot possibility recreate every situation found in a linear plot game, but if done correctly it should be possible to come pretty close.

The first requirement is that the levels need to be designed in such a way that players are rewarded and driven towards behaving in certain ways. For instance, in early designs we tried to give tons of freedom in what players could do, but much of this freedom resulted in actions that went against the narrative. This is negative freedom. Instead we have tried to limit actions into "what makes sense for the protagonist to do" and do so without breaking any sort of consistency. This is positive freedom. The goal is then to eliminate the negative freedom and maximize the positive one, which is very simple to say but have proven hard to do in practice.

Even with a neatly designed scene, all is not set. There is still the problem of communicating the goals. Early on I thought that it was just a matter of having an interesting enough environment and players would partake in the activities provided. The problem is that the larger the environments become the harder it is for players to figure out what is of interest and what is not. It is also very easy to loose ones sense of direction and become unsure of what to do next. This problem is even more severe now that we pulled back on the problem solving focus. Players are not in the mood for constantly looking for clues but are instead focused on soaking up the narrative and having an immersive experience. This is how we want them to be, and should thus not be something that hinders progress.

To get around this, we have had to made sure that the larger a scene is, the more clear and obvious your end goal becomes. Also, any activity in a large area should always be optional unless it is closely related, both spatially and conceptually, to the object or state that makes the game progress to the next scene. Whenever the player is required to carry out some activity, the scope of a scene need to be decreased. The greater the freedom is in terms of possible actions, the less actions must be compulsory.

The scenes themselves are not the only problem though. A perhaps even greater concern is how to connect them. At first I thought this would not be a big issue and that you could get away with pretty loose connections. Problems arise very quickly though, the main being that the experience simply stops making sense for the player. There must be some sort of logical connection and narrative flow between each scene. If not it becomes increasingly harder for player to figure out what they should be doing. This means either lowering the degrees of positive freedom or to have more set up for each scene. The first option gives something like Thirty Flights of Loving and the second is basically to use the linear plot approach. We do not want to do either, so having clear connections is a must.

This results in an a sort of curious conclusion. One of our goals in storytelling is to rely as little as possible on plot in order to give an experience with a strong sense of agency. However, in order to provide as much positive freedom as possible, it is essential that the scenes are put together in a very tight and engaging fashion. In other words, on a scene level there is a great need for a strong plot in order to have as little plot as possible in the actual scenes.

In turn this limits what kind of scenes that are possible. Now that the connections need to make sense, it is not possible to simply fill the game with scenes that lends themselves very well to our core mechanics. So far we have to been able to pull this off quite nicely, and we are slowly wrapping our minds around these concepts.


End Notes
This is not some final verdict on how to improve upon the adventure game genre. It just summarizes a bit on the design direction that we are taking for our next game. Nothing is final yet, so I am not sure how it all will turn out in the end, or how much of the above we will be actually using. This is at least our current thinking and what we are working on now.

Also have say few ending words on adventure games in general. It might sound in the beginning like I loathe traditional click and point games, but this is not the case. I have enjoyed playing a lot of adventure games, and using puzzle approach for high-level game design is a very valid one. The best adventure games really take advantage of this, for instance Monkey Island and Broken Sword. These games are made in a way that makes the design really works and creates a really memorable and unique experience. However, for some games, like Primordia, my main draw is not to have this kind of experience. In this game I am more interested in exploration and getting immersed in the world. The classic puzzle design does not do this properly and I feel as if my experience is not as good as it can be. Primordia is still a good game and it uses the setting nicely to create some interesting puzzles. But it feels like they could have taken a lot of the game's essence and packaged into a form that would have delivered it much better.