Clash of Clans and the Prisoners’ Dilemma

July 18, 2014

I have started playing, recently, the online game “Clash of Clans”. Clash of Clans has the option of “donating” troops to other clan members. Troops donated stay in a separate area (so they do not take up area for one’s own troops), and also participate in base defense (as opposed to one’s own troops, which are offensive only). In short, being donated-to makes both one’s offense and one’s defense stronger. However, donating troops means paying the cost of training them and reaping no benefit from it.

Does we have the pay-off matrix: assume paying the cost of troops is -1, and the benefit is +2 (it has to be bigger than the cost, since players do build troops for themselves with even less benefits):

Donate/Donate: 1/1
Don’t donate/Don’t donate: 0/0
Donate/Don’t donate: -1/2
Don’t donate/Donate: 2/-1

What I love about this is this is a massive experiment with prisoners’ dilemma on more-or-less average people. As expected, one sees both equilibrium: clans where hardly anyone donates, and clans where everyone donates. In the clans where hardly anyone donates, there is still some reciprocity: (some) people will try to donate “back” to people who donated to them. Since in practice the cost-benefit analysis turns that way, it is sometimes worthwhile to donate even for a .2 chance of a reciprocation, which allows the loop to be fed.

There are reputation effects (the number of troops one donated and one had donated to appears where everyone can see it), which would be assumed to improve the donation rate. However, from my anecdotal experience, being in two clans, the most distinguishing feature is “do you know these people in real life?” Clans made up of people whose reputation effects extend beyond the game are in the good equilibrium. Since I’ve joined the Facebook-employee-only clan, my life has been much better.

I started thinking that Facebook is like that too. In situations where you can help a colleague, where the benefit to the colleague would be disproportional to one’s self, we encourage that kind of thinking. Facebook is in the good equilibrium of the dilemma!

[Plug: We're hiring engineers and eng. managers. Please contact me on FB with further questions or resumes.]


Thoughts on Warrants

June 30, 2014

Warrants (and similar things, like indictments at preliminary hearings) rely on the concept of “probable cause”. The definition of probable cause varies, but in general requires for something to be more probable than not — or in terms of Bayesian probability (which applies probability to states of mind, not just to repeatable experiments), higher than 0.5 probability. Do our warrants actually obey this ruling? This is a fairly simple test — at least 50% of warrants handed should, eventually, result in evidence leading to conviction[1]. Do they? Hell, in less than 50% of cases does it lead to an indictment[2]!

Since warrant judges hand out a lot of warrants, we can decide to actually measure and automatically disbar judges whose warrant rates fall significantly below 50% rates (e.g., using p values of 0.005 would correspond to having a pretty high Bayesian prior that judges are “good”). The criteria could simply be — “of all warrants handed out where the case has ended, how many convictions have there been” (so any cases still in trial would be eliminated from consideration). After doing this for a while, we can update the Bayesian prior, periodically, to how many judges actually get disbarred by this.

In a perfect world, we would also apply this to convictions — however, since convictions are handled by one-offs (jurors), it is hard to place blame for overturning convictions. However, at least for warrants and non-grand-jury-indictments, this allows a process of automatic continuous improvement of our standards, avoiding the “judges and police co-operate to come up with lots of warrants” problem.

[1] Technically, since conviction is “beyond reasonable doubt”, this is a lighter standard than the true standard of actual guilt. However, based on the “better a hundred guilty people go free…” (Benjamin Franklin) standard, reasonable doubt being >=1% probability, the effect should be minor.

[2] http://www.insurancejournal.com/news/east/2014/06/27/333106.htm


Minimum wage, efficient markets and BATNA

May 5, 2014

[I keep writing the same content over and over, and wanted a canonical place to put it.]

Wages for low-skill labor is not a good market because of differing BATNAs. The BATNA for the marginal employee at an employer is “starve to death”, the BATNA for a marginal employer is “be slightly less efficient”. Minimum wage is designed to work around the BATNA issue, and so there is an optimum level for the minimum wage. Lobbying will tend to keep the minimum wage below that level, and so in general, increasing the minimum wage by a little bit is usually a good idea because it brings up closer to the optimum.

This is a better formalization of the argument typically given as “give people money, they’ll spend it and more jobs are created”. The naive approach to the formalization of this argument ends up being a broken windows fallacy, with the usual counter arguments available regarding opportunity cost. Otherwise, this argument supports raising minimum wage arbitrarily high, and so proves too much — why not raise minimum wage to $1M/hr?

Phrasing it as regulation around BATNA problem shows that there are two ways to solve it: we can keep regulating around the BATNA, with the usual limitations of regulations (e.g., the structure of flat-until-minimum wage will mean that workers who are “worth” minimum wage + $0.5/hr will, because the BATNA is still there, will be making minimum wage). An alternative is to regulate the BATNA away by making sure that people have a different BATNA — in other words, a social safety net. The simplest and easiest social safety net is Basic Guaranteed Income. If we had BGI, we would not need minimum wage, and we would make it easy for businesses to pay employees exactly what they are marginally worth — no more, no less — with no further regulation.

Me, personally? I think instead of regulating the market to work around the BATNA problem, we should fix the goddam BATNA problem (I know, call me crazy). If the BATNA for the marginal employee is “have to subsist on Basic Guaranteed Income”, we won’t need minimum wage laws and all the complexity that comes with them (especially around tipping and enforcement).

If it were up to me, we would be teaching about BATNA is grade-school, because it’s a concept that does a lot to fill the gap of supply-and-demand in understanding how economics works.


GPS Navigators, morality and the human utility function

April 2, 2014

GPS navigators used to be simple. You plug in the desired address, they calculate the quickest route. At some point, many started getting a feed of traffic information, so that they can route against big jams. Still pretty simple.

Enter Waze. Waze hyper-micro-optimizes for traffic conditions, using other users as roaming sensors and, probably, complicated AI on the back-end to predict what route would take how long. This means Waze learns from experience how fast people drive where, under what conditions — and, as far as I can tell, takes all this information into account. This means that on a residential street that is constantly being speeded to, Waze will learn that it is a fast path, and will start directing drivers through it. Drivers who are using Waze, which means they want to get to their destination as fast as possible.

There are a lot of valid reasons to want to get somewhere fast. Maybe you scheduled a meeting. Maybe someone is having an emergency. Maybe you just want to cuddle your kid before she goes to bed. Waze does not care. It tries to get users to their destination as fast as possible, no matter which residential streets they speed through. It has no concerns for safety, either the driver’s or pedestrian, neatly divulging itself of all responsibility by “just suggesting”. What if a nice street starts being higher-up on the Waze paths? And this lowers property values? Waze has no concerns for that.

I’m not picking on Waze especially. Their only fault was that they took the optimization criteria that all GPS navigators use (find fastest path) and used superior sensors and superior algorithms to implement them better. Whoever wins the “navigator wars” would have had to do at least as well, so in that sense, there is nothing special about Waze except hiring smart people who made good decisions.

But this does show how AI moves forward: smart engineers optimize the hell of whatever target function they are given. At some point, it starts having real costs that humans would understand, but an AI would not care about because the AI cares about optimizing the target function. The only way to solve it is to figure out what humans care about in terms computers can understand and make sure that any AI takes those into account — even if it is not smart enough to self-modify, it can do plenty of damage without it.

In other words, the Friendliness apocalypse, if we include not just existential risk but also a general raising of human risk factors, is not in some nebulous future until we figure out self-modification. We are in the middle of it, and we should make sure that we take it into account when building AI — even if that AI is limited to “just suggesting things”, because humans are suggestible, and have learned to trust computers’ suggestions.


Public letter to Congresswoman Jackie Speier, CA14

April 16, 2013

Dear Congresswoman Speier,

I have already called your office, so I am sorry if this is redundant, but they did not have an answer for me. I am sending you this message because of my concern about HR 624, the “Cyber Intelligence Sharing and Protection Act”, also known as CISPA. It appears that it would be up for a vote in Congress soon. I am worried for my privacy, as well as for the privacy of other Americans, were this bill to be passed. This law violates due process by allowing private companies to hand data to the “government” even when they are under contract to not do so, without any court order. I am sure most people working for Federal agencies are good and honest people, but this allows one bad apple to grab whatever data they need for whatever private means they have with no judicial oversight. It also allows private companies to hack into computers as long as they believe “it is necessary” — in essence privatizing law enforcement, again without proper judicial oversight.

In the wake of the tragedy in Boston, the US must, of course, be ever-vigilant against threats. However, laws like CISPA, making our country more surveiled and less free, are essentially give terrorists what they want — to terrorize us into hurting out essential freedoms.

Thanks,
Moshe Zadka


Babies — a guide

April 13, 2013

Some people have asked me to summarize the collection of links I posted about baby development. Here is my unauthorized summary. There are links to the original resources throughout the post.

A lot of the following information is based on, or inspired by, the Educaring philosophy as put down by Magda Gerber and taught by RIE. Educaring philosphy is based on trust in the child to initiate development, giving children safe areas to explore in an uninterrupted way, involving the child in all child-care activities, observing the child and responding to her needs and being consistent when limits are concerned. The central theme is respect for the child as a whole person in his own right.

When babies are born, they have one mode of communication — crying. Therefore, a lot of what parents do in the first few months is dealing with crying babies. The blogosphere, unsurprisingly, reacted with a wealth of information to the question “what do I do with a crying baby?”. The basic newborn care advice — check diaper, burp, and feed — only goes so far. If your baby is not giving you hunger signs — clenched fingers and fists over chest and tummy, flexed arms and legs, rooting, fast breathing or sucking noises or motions — feeding might stop the crying even if it is not the best idea.

After those, comes the “unexplained crying”. “Unexplained”, of course, is not a fact about the crying — it is a fact about the parent. Babies have feelings too and need to express them.

The diagnosis of “colic” as long stretches of unexplained crying is giving way to the concept of “PURPLE” crying. PURPLE stands for “Peak” (of crying) “Unexpected” “Resists soothing” “Pain-like face” “Long lasting” (several hours a day) “Evening” (also known as “the witching hour”, around twilight). Apparently all mammals go through their own equivalent of PURPLE crying, the human animal between 2 weeks and 3-5months.

Listening to the crying, being compassionate without trying to stop it, is important. Crying is a form of communication. When we do want to soothe the baby, CALMS1 is a popular approach. [C]heck in with yourself, and connect with your feelings — you want to calm yourself before calming the baby down. [A]llow yourself to take a breath and relax. [L]isten to what your baby is trying to tell you. [M]irror — empathize with the baby’s feeling, voicing his emotions as best you can. [S]oothe your baby. It is OK if the soothing initially makes the crying harder — the baby might need to voice the hurt feelings first. Sometimes, the end result of this approach is to “hold the baby through the tears”, being calm and letting the baby cry as long as she needs to. When soothing a baby, pick a tactic (singing, bouncing, etc.) and stick to it — switching tactics is a bad idea. Repetition, repetition, repetition. There are reasons to be wary of the “5S”.

Parents need to understand that sometimes the baby will cry, and this does not mean they are failing as parents. Unfortunately, that is exactly what attachment parenting is teaching.

Second only to crying in the amount of energy parents spend obsessing about is the baby’s sleep. Nursing kids to sleep does not make them sleep longer — putting them to sleep earlier does. Althought not too much earlier, and not too soon. Wait for them to display sleep signs, and put them to bed then. Babies’ “long-stretches” of sleep start from 3 hours at newborn, through 4 hours at two months, 4-5 at 4 months, 6 hours at 6 months and by 1 year old, 80% of babies sleep through the night. Routines, especially at 4 months and beyond, are useful for helping babies sleep. Babies are woken up by hunger, dreams or discomfort. Some babies fight sleep, and need to be helped there. SIDS is mostly a risk while sleeping, follow AAP recommendations to reduce risk: put babies on their backs to sleep, use a firm sleep surface, room-sharing but no bed sharing and keep soft objects and loose bedding out of the crib.

A distant third is how children play. Even babies can do independent play as long as they are placed, carefully, on their back until they have learned to roll to their tummies. It is OK if the baby does not “do” anything — just kicking their legs and staring is fine. The area, of course, must be safe — a no-“no” area, where everything possible is permissible. It is OK, and even good, to stay near the child and observe — but even if they seem frustrated, not to help them (this is like giving someone the solution to a riddle). Babies are perfectly capable of entertaining themselves this way. Babies can start having play-dates early on — if we believe them capable, if we are attentive to their moods, make it into a routine, and are patient with them. As always, observing them in quiet is important. Tummy time is important developmentally. Start slow, get down to your baby’s level and provide entertainment while the baby is on his tummy. Avoid having tummy time right after feeding, or when the baby is upset. Keep it calm and quiet, so the baby is not scared by what she cannot see. Be patient — the baby will eventually want tummy time.


Parenting Resources

March 4, 2013

Like any normal (read: insane) new parent, I have been reading a lot about babies online. Below is a reading list of sorts. I do not agree with everything here. Some of the things I do agree with, I still do not follow. It is not unbiased (there is a definite NVC/compassionate parenting bias). It is not complete — if you have more resources, please link in the comments!

Compassionate parenting posts

Crying

Play and activities

Sleep

Feeding

Sites


Follow

Get every new post delivered to your Inbox.

Join 304 other followers