Resource entanglement problems and the problem of elegance

Category : Games, Meta-Thinking, Productivity, Rationality · No Comments · by Sep 22nd, 2015

I have a problem for you:

Suppose we want to maximize our combined number of X and Y products over 10 days, and each day we can either:

  • Get 3 copies of X if Y<7, otherwise get 4 copies of X.
  • Get 2 copies of Y if X<5, otherwise get 3 copies of Y.

Over 10 days, how should we structure our choice to obtain the maximum number for X + Y?

If you have a strategy bent, then this problem will be a bit of fun, and a bit more complex than it seems at first. This is a type of problem that strategy and resource management games depend on often – when multiple resources have growth patterns that are co-dependent, simple rules can give rise to unexpectedly nuanced problems. Even better, the formula is pretty modular and simple to tweak, so it’s easy to introduce variations.

I call these type of problems resource entanglement problems, since their hallmark is multiple valuable resources with co-dependent growth curves. This type of problem rely on straightforward goals and rules to attract new players and keep those players with unexpected depth. The high ratio between depth and complexity of rules is a hallmark of good game design.

But I’m not here today to talk about game design.

 

These  problems are not always hypothetical. Resource management is a real field of study, and even outside of business there’s plenty of tradeoffs in everyday life. Consider a classic: time vs. money. With money, we can purchase services to save time. With time, we can put additional effort into making money. Since we value both time and money, we find ourselves in an intriguing cycle.

But there is a trap. Elegant optimization problems are fun to think about, but elegance does not correlate with necessity. Elegant problems grabs our attention but may distract us from more important problems. For example, resource management problems are often much more trivial when the ultimate value of one resource is removed. What if hypothetically, we were to demote our value of money? How much does money mean? What about time? These problems risk sounding senseless initially, but depending on the person may have surprising answers.

If you find yourself working on some intricate problem, perhaps the first thing to ask is what you can demote.

What is Luck?

Category : Design, Games, Mathematics, Meta-Thinking, Rationality · No Comments · by Sep 22nd, 2015

Richard Garfield, the designer of Magic the Gathering, defines luck in his ITU Copenhagen talk as “uncertainty in outcome”. I think by modeling human reasoning as Bayesian, we can come up with another fruitful, if not a more fruitful, definition.

Suppose I were to take out a quarter from my pocket and ask you to guess my next twenty flips. You perceive the heads/tails probability to be 50/50 with high confidence, and so your accuracy on my first three flips, which turned out to be all heads, is very heavily luck based.

Now suppose that my next fourteen flips are all heads. At this point, you will be quite certain that the game was rigged, and your heads/tails probability becomes 100/0. Indeed, your next three guesses are correct. Curiously, at this point in the game we no longer perceive luck as being involved.

In Bayesian speak, our 50/50 distribution is our prior belief, and 100/0 distribution posterior belief. Note that we consider the prior (no pun intended) to be highly random, whereas the latter not so much. Wikipedia defines random as “the lack of pattern or predictability in events”, which suits our current purpose. We will roll (pun intended) with it.

Now another example.

Suppose I leave right now to catch the next bus to work. The bus arrives just as I get to the bus stop. How lucky!

Now suppose I tell you that I have memorized the bus table and had been stealing glances from the wall clock while talking to you, cutting our conversation short when it’s time to leave. The bus arrives just as I get to the bus stop. Not very lucky, but pretty calculating.

This example is insightful in two ways. Firstly, to be perceived as lucky I don’t have to intentionally make a choice. As long as the outcome benefits me, I seem lucky. Secondly, we can make things seem less luck-based via additional information. My new prior (which is my posterior after memorizing the timetable) was good enough to reduce randomness. What appears to you as random may be fairly predictable for me. Randomness can be subjective. In fact, it often is. The stock market, weather patterns, and even the search for a good romantic partner can be predictable for one and random for another. Thus, a definition of luck necessarily takes subjectivity into account.

So I think that perhaps a better definition for luck is “when apparently unpredictable outcome offers high utility”. In Bayesian speak, when an outcome of good utility occurred despite a prior that doesn’t favor it. We should note too that utility, which is subjective too, also affects our perception of luckiness. In a bet with 90% chance to win one million and 10% to loss one million, the winner is still declared pretty lucky. Our perception of utility is biased. In the case of loss-aversion, sometimes the bias is advantageous.

Prior and utility are both extremely malleable, and a variety of cool insights arise (a.k.a. this is an insight dump where I stop being good at explaining things):

  1. Extremely complex conditions gives rise to priors of similar quality to everyone. In guessing the 567,890th digit of pi, everyone starts on the same prior.
  2. In fact, if the universe is deterministic, the reason that statistics and probability exists in the first place is because events are too difficult to predict. In that case, there would be no true prior other than “X certainly will happen”. Our predictions will necessarily always be approximations and guesses (a guess that can only be exact if it also states that “X certainly will happen). If the world is deterministic, probability is a summary of what we don’t know.
  3. Depths of gameplay may arise from a sufficiently complex condition that allows continual optimization. A first card drawn from a nicely-shuffled deck is complex because shuffling is complex, but shallow because we don’t hold any information that can visibly optimize our prior. A card drawn during the middle of the game is complex not only due to shuffling but also due to a significant number of cards already in play; however, this draw is less shallow because we can use the cards in play to optimize our prior if we wish. When we are down to the last dozen or so cards, the draws are actually deeper because we now have very concrete information to optimize from.
  4. When you meet people who to you seems perpetually lucky or unlucky, you should strongly suspect your priors.
  5. Knowledge on probability, statistics is very valuable.
  6. Knowledge about how to improve your priors is extremely valuable. It’s a prior on how to change your prior when you see rules. See factors of correctness. A hidden value in Bayesian models is actually a value or a prior on confidence (the resilience your priors are to change). The phenomenon illustrated in factors of correctness might point to variability of the of underlying prior on confidence. It seems like more research should be done in that area.
  7. Disguising depth through luck allows new players an excuse to feel better. It’s a desirable feature of design.
  8. The best estimation for probability is set in stone, so our versatility (once we have a good prior) comes from selecting our situation such that the most likely outcome yields optimal utility. Something like betting on heads on a rigged coin or timing our leave for the bus.
  9. Complexity is a gradient scale but has very different design properties on different logarithmic scales.
  10. To artificially add luck to anything, create a situation where everyone has the same starting prior. (i.e. dice roll, coin flip, atmospheric pressure).
  11. For fun (not for profit), to make yourself more “lucky”, put yourself in situations where unsuspecting high utility situations may occur, without much probability of low utility situations. This might explain why people who are more curious finds more pleasant surprises.

On finding and being ok with mistakes

Category : Meta-Thinking, Rationality, Reflections · No Comments · by Sep 20th, 2015

Elon Musk caught my attention when he said something to the effect of “successful company fix mistakes fast, while unsuccessful ones denies that the mistake exists in the first place”. There’s an assumption that “you will make mistakes, no matter how hard you work” that is rather refreshing.

Over break I made a pretty big mistake of being enamored with an unfeasible research plan. I had an idea that my instinct told me was going to work, and assumed that it is indeed going to work for at least a month. To make matters worse, over the month many chances to question the idea has came up, but I avoided taking the difficult route each of the time because 1.) I didn’t want to face the possibility of losing the idea and 2) I assumed that things are probably going ok and everything will magically solve itself.

The reason I caught up to the mistake early was because I forced myself to work on the plan for 2 hours a day. If I didn’t do that, it’s conceivable that I would have caught the mistake close to the due date of my proposal.

When I think back to my mistake, I saw a few surprising lessons. Firstly, up until the point I started procrastinating thinking about the idea,  I had done absolutely nothing wrong. It’s impossible to prevent a problematic idea from stealing your attention, so the only way to fix the problem would be thinking more or trying. On the other hand, since at the time we did not know a problem exists, the advice “fix mistakes fast” isn’t applicable here. Rather, we should try to confirm untested assumptions before depending on them. This often boils down to “testing assumptions fast”, since over time we rely on our assumptions more. Often, during this testing, we discover better answers.

My procrastination taught me that I should be extremely suspicious of untested assumptions with high stakes, and be especially alert to assumptions that my minds attempts to persuade me not to suspect.

Isn’t that natural, after all? We all want to be right, but given the complexity of the world, we are bound to make many wrong predictions.

Primary Source is Actually Pretty Great

Category : Education, Rationality · No Comments · by Sep 8th, 2015

I’ve been wondering about why I had such a great time reading Daniel Kahneman and Scott Alexander (of Star Slate Codex), and in the process I stumbled upon some important academic truths.

In many questions of more-than-trivial complexity, the closest we are going to get to actual answers is through scientific inquiry [1]. For this reason, in informed discussions, we have a license to reference these academic findings as if they were truths. In this way, while academic work don’t directly answer some of the most complex and important questions in life, they take us much closer.

But all those discussions are based on the assumption that academic work is conducted in good faith – i.e. the numbers are correct and faithfully represented, the conclusions are reasonable and substantiated, etc. A good analogy for the value of academic work is the U.S. dollar, as both are based on good faith. As the USD would be worthless without the backing of the government, research would be useless without the assumption of academic honesty (and this honesty is somewhat reasonably connected to faith in the research institution).

The insistence of relying on primary source exist for the same reason. With each quotation, some information is inevitably lost. Worse, as most work attempt to make a point, the results may be misunderstood or deliberately misconstrued. The outcome of using information distant from primary source is largely the same as using bad research: your points will be inaccurate. While the chain of references used in academic may still cause some deviations from initial references, the decay of quality is much slower that way.

One of the reasons I like Daniel Kahneman and Scott Alexander is that they present surprisingly useful conclusions but are able to back their conclusions with research. This is worlds apart from the status quo psychology and self-help books in terms of reliability.

I remember being drilled on the importance of primary source in seventh grade, then at least two or three times more in the course of my K-12. The claims never appeared to be backed up, and I soon began to see the practice as some of formality. But now I my views have come around.

I still wonder though, did the teachers or the educators know? Four years of college education certainly taught me little on the subject. Concerning how the importance of these concepts hinge on persuasiveness, the failure of the concepts to latch on to students is ironic.

[1] This article deals with research, but first-hand interviews follow’s the same logic.

Pure Land in Bullet Hell

Category : Art, Games · No Comments · by Sep 3rd, 2015

zen

A collection of mini-essays as a homage to Touhou scorerunners. Generalizable to shmups, and to a degree some other mediums. For the uninitiated, a taste of scorerunning can be found here.

I. Man vs. self

Shmups embody the essence of the man versus the self. In few other genres are one-coin clears so emphasized, and mistakes so obvious to the gamer. The score mechanic, a decoration in most genres, thrives in shmups. The score in no uncertain terms communicate to you the worth of your play.

Other games are like miniature gardens, shmups are like miniature mountains. Their towering difficulty challenges all that passes. Most don’t heed it and continue their way. Some do. They stop in their tracks, beholds the peak of the mountain, dream up a journey to the top, and dedicate a part of their life to it.

In 2008 Kuro, a score-runner in Perfect Cherry Blossom, posted a screenshot showing over 2500 hours of gameplay spread over more than 36000 sessions.

II. What do you want?

I had once considered scorerunning in Touhou. Not far into the attempt, I realized that in order to do what I truly wanted to do, I could not afford to seek high scores. It’s the first time I realized that I can’t want and get every lofty goal in life.

In April 2010, AM, a renowned virtuoso in the Touhou scorerunning scene, quit scorerunning to reclaim other aspects of his life.

III. Ability and wisdom

The impressive players of the game are not always wise. In 2011, the Chinese Touhou community outed score-runner MSH when it became apparent that he had cheated to obtain world records. The ousting was a public one, as MSH had cultivated many followers at the time.

The truth is, MSH is a better player than you and I. He has the talent. But talent does not correlate with conduct.

Talent, creativity, persistence, perfectionism. Which ones make you nice, and which ones don’t? In the end, their score reveals little.

IV. Ruthlessness

My old replays have a certain degree of ruthlessness to it.

When I had a goal in mind, I would ignore other conventions of “good plays”, instead abusing safespots, neglecting score, and otherwise bombing enemy patterns on sight to reduce the difficulty of the run.

Legendary player GIL was known to exaggerate his handicap for already-difficult challenges in order to produce awe-inspiring replays. In some ways I was the opposite of that.

I noticed that recently I’ve been playing shmups less ruthlessly. But I actually liked my old style.

V. Wholesome

Great score improvements in Touhou are made in billions. For the first years of a game, the high scores tend to barely pass certain thresholds: 42 billion,  52 billion, 21 billion, 10.1 billion.

This is because the pioneers has no one else to look up to, so they ask: is 30 billion achievable? What about 50 billion? They plot up a path and inevitably achieve their first milestones. New challengers seek to beat the best score, devising their own improvements on top of those milestones. They don’t ask “is 50 billion achievable?” but “how do I beat the current world-record?” Thus, world-records have a tendency to grows slower after passing certain milestones.

Eventually, when the state of art is near perfection, someone comes along and asks “what’s the theoretical maximum? This is the case when coa reached a score of 1.00002 billion in Mountain of Faith extra mode, 0.1% away from the theoretical maximum of 1.0001 billion.

VI. Creativity

A good replay is largely about execution, but sometimes creativity trumps. In this way, scorerunning is a bit like an art form.

In the demo days of Subterranean Animism, a player named UnKnown started submitting replays with innovative strategies, and consequently besting the then-highest scores by huge margins. But he did this to his own replays too, submitting new replays under alias like “U.N.None”, “#unexist”, and ” ” (blank) that introduce innovations on top of his own.

From one of his alias, “tongrentang”, we could trace him to the Chinese scorerunning community. Perhaps some top Chinese players know of his/her identity. But the alias seems to suggest that in the end, who it is doesn’t matter.

VII. Finding pure land

To score-run in Touhou is to stand between life and death. Most Touhou games have a “graze” mechanic, which rewards players for hovering near bullets (so-called graze zone). Most high-scores have tens of thousands of grazes, meaning tens of thousands of intentional almost-deaths.

The graze zone is a harsh and hostile habitat. Imperfections must be purged. The replays discretely showcase the scorerunner’s ability to survive under hostility.

But the players thrive and rejoice under such hostilities. They chose it over the leisure that most media affords, and devote thousands of hours to exploring the world and reaching for perfection. It’s a strangely haunting vision of what the world can be – a place of discipline, self-improvement, tackling limits, striving for the seemingly-possible – a pure land.

VIII. Monuments never-ending

The hundreds of replays on the Touhou high-score board and thousands made in an attempt to reach it are made permanent by the advent of the digital age. Even as a mild shmup player, I can trace the thoughts of the players as they weave through the bullets and improvise under unexpected conditions. These players are no doubt fully concentrated, and the replays capture their thoughts across brief moments in time.

But to earn that privilege to be seen, studied, acknowledged, admired, you must surpass all others before you and ascend to the top. Even then, there is no absolute security. No perfect replays has even been produced, no one has ever done everything that can be done. As long as Touhou is played. The monument of these scoreruns will inevitably be replaced by the scoreruns of the next generation of challengers.

In October 2010, Jack attained 1.002 billion in Mountain of Faith extra, breaking coa’s theoretical limit of 1.001 billion. In the comments section, he conjectures that 1.003 billion is theoretically possible.