Monday, 22 December 2014

An Obscure Conan O'Brien Reference

When I did that Toronto-based political survey a couple of weeks back, I noted that it asked you if you were male or female despite having previously asked if you if you believe there are more than two genders. I find the question "What are you? Male or female?" to be a little bit offensive, but usually I think of that offensiveness being rooted in an ignorance that will require another generation of humanity to stomp out. When you've already taken note of the fact that many people do not identify with that binary asking people to slot themselves into one shifts a bit from ignorant towards asinine.

I take online surveys just for fun somethings. I am signed up to more than one survey service where they supposedly pay you miniscule amounts to take surveys. They will often ask for your gender and give you two options, so I get this question a lot.

Am I male or female? Well, people who know me probably have a pretty strong opinion on what the obvious answer is. If I don't like answering the "M or F?" question then it's more because I have an issue with the question on principle than because it's actually a tough question for me to answer. If I picked female a few times, or picked another option when actually offered more than two options, it was only out of disrespect for the test makers.


I know I have no intention of transitioning from male to female or from male to something else. On the other hand, Julia Serano's hypothetical offer for $10M to transition - a thought experiment that makes most people realize how deeply they identify with their assigned gender - is something I would snap at were it available for real. The reason I won't start living as a female is because I don't feel strongly about my gender, not because I'm decidedly male.

Even moreso it is because I like to go unnoticed, and I have the sort of body that would be tagged as a male body even after thorough surgery and hormones. People would see me on the street and mentally check off "Woman who used to be a man" or "Man dressed as a woman" right away. I'm not exactly inconspicuous as I am, but that is counterbalanced by my male privilege - I get to be ignored because of my maleness in a way that women don't. Ten million dollars would buy me more right to be ignored than being female would cost me, though, because I'd get to just withdraw from society.

This is an idea I don't really know how to explore. Because I don't always identify with myself, this question is particularly hard for me to approach. I did some digging online about how to think about your gender but that pretty much turned up a bunch of infantile "Are you male or female brained" quizzes. I recall hearing positive things about Kate Bornstein's "My Gender Workbook" so maybe I should look into the updated 2013 edition of that.

I'm not even sure why this matters to me. I'm going to keep being "daddy" and "he" and "sir" regardless of the outcome unless millions of actual dollars are on the real table. I don't have to be a man or a woman to think or feel different ways - I fall two or more standard deviations out on so many scales that there is no need to frame it another way. But perhaps it's worth looking in to. It probably couldn't hurt me to learn more about myself one way or the other.

Tuesday, 16 December 2014

More Career Planning

We had another career planning talk. This time it was from someone who had a very interesting and long career instead of someone with a Human Resources background. I appreciate the perspective of actual wisdom, but the whole thing still just bothers me.

The message of this talk was very much that you have to take control of your own career. That's fine advice in a way - it's real advice for the real world. But on the other hand, the fact that people can say that and not identify the problem with it is dumbfounding.

Here is a simple question: Is putting a priority on advancing your career correlated with competence in your career? I wouldn't be terribly surprised if the answer is yes - for example a person whose career is important them might find mentoring and education opportunities that not only look good on a resume but also build actual competence. But those are things you check completely apart from the goal of career advancement. People who are determined to win a race are likely to be faster because they probably train, but you judge the winner by who crosses the finish line first.

We have a system that selects for a criterion that may be unrelated to the ability to do the job. Everyone agrees with this, but they don't think it's a problem.

If you ask people why it isn't a problem, they'll have an answer for you. Many of them will be convinced that this actually is an important factor in success. You want motivated and ambitious staff who are looking to impress. I just don't believe this true. I'm pretty sure that much better than that is a person who sees their current position as a thing worthy of doing unto itself. Others will say that there is no alternative - that obviously people who try to advance their careers are going to have more success advancing their careers and it must be so.

In a limited way this is true. Every system can be gamed, and a person who is ultra-talented at career advancement is going to do better at career advancement than people who are ultra-talented at actual careers. But we should be striving to not make that the easiest road. Ideally, the best way to get a job would be to be good at the job, and conning people into giving you the job would be only for people who are particularly talented at conning. Shouldn't we see an employer offering courses on how to succeed at their own interviews as a symptom of a sickness?

And no one seems to think there is any cost to this system at all. That no one who doesn't care about career development manages to make it into senior management just doesn't seem like a problem. After all, they think, anyone could put in the effort to learn how to walk the walk. Like they say, "take charge of your career" not "be the sort of person who is really very interested in taking charge of their career." Who would be interested in the opinion of someone who was fundamentally driven by a desire to solve problems and get things right instead of by a desire to appear important?

For me, though, the problem is that we are hearing someone talk about career development at all. Is that really what people are interested in doing with a branch meeting? Oh wait, yes it is.

On some issues I'm a genius to the edge of being prophetic, on others I'm just the odd one out. I don't care at all about career development and sitting through talks about it makes me a little sick as I contemplate what a broken system we have. But this is really what people want to hear about. Our culture is a culture of ambition. I'm not better than that, I just don't fit in.

Thursday, 11 December 2014

I Just Can't

Here is CIA director John Brennan on the recently released US Senate report on torture:
"We have not concluded that it was the use of EITs (enhanced interrogation techniques) within that program that allowed us to obtain useful information from detainees subjected to them. The cause-and-effect relationship between the use of EITs and useful information subsequently provided by the detainee is, in my view, unknowable."
Okay, so apparently before I say it was bad that they tortured people, I had better be damn sure that torturing people didn't result in anything useful. Otherwise, that would make me the monster, right?

Sort of like how if a police officer kills a black man, before we go condemning the killing, we'd better be absolutely certain that the black man didn't do anything that might have made the police officer nervous, and hadn't done anything bad in the past.

Imagine, for a moment, that one of those people who was tortured by the CIA would have otherwise gone on to be the next Hitler. What then?

This is honestly what passes as a reasonable way to think.

Monday, 8 December 2014

Retirement Planning

I signed up at a Liberal Party of Canada 'supporter' so that I could vote in their leadership race. I think I voted for Deborah Coyne, though that obviously doesn't matter at this point.

Anyway, they send me emails, mostly soliciting donations. The other day I got an email asking me what my opinion was on five big issues that will form the Liberal platform for the election about a year from now. One of the questions was about what the government needed to do to help Canadians save for retirement.

I've got some pretty strong feelings about retuirement schemes. I use the word "scheme" for a reason. Basically pensions are Ponzi schemes. They pay out the investors from new capital paid in by new investors. With a sufficiently high interest rate they might escape ponzi land and actually start funding themslves, but the whole reason why we are approaching a looming crisis in the field of retirement is because interest rates are so low to begin with. With interest rates as they are, saving is just kind of nonsense and pensions don't have a magic wand to get around that.

Pensions are certainly more reliable than most ponzi schemes, but that's only because people are obligated to put money into them, either by law or by their employer or union. Ponzi schemes can work for a long time if people don't have a choice but to dump more money in. To make them work forever, though, you'd need to keep expanding the number of people paying in, or expanding the salaries of people paying in, so that they could keep floating the people who paid in before.

We are not experiencing a population boom, we are not experiencing a salary boom. Pensions are in big trouble.

The survey asked what I thought should be done about it and gave me a number of equally futile options. The problem is that we have made pensions obsolete with low interst and stagnating population growth. People who are joining the workforce now have to bear the burden of paying into the ponzi scheme that is going to collapse before they ever get anything back out of it.

So I checked that box marked "other" and told them the real solution to retirement. It's called gauranteed income.

Too many seniors live in poverty, but too many young adults live in poverty and too many children live in poverty. These are not really different problems. The problem is that we live in a society that can easily produce enough food for everyone to eat and people still go hungry. We live in a society that can easily produce high tech gadgets for everyone and yet some children get to look on with envy at their peers from their own low social station. With live in a society where we are letting infrastructure crumble while we have a massive unemployment rate. Sure, things need to be fixed and sure there are tons of people desperate for work, but the work can't be done because despite the fact that there is enough of everything to go around, we still have to ask "Who is going to pay for it?"

For all of history that I'm aware of people have worried about jobs being automated or technology otherwise running people out of gainful work. At times I think this made more sense than others, but the current incarnation of it is completely insane. Major media outlets publish scare pieces about a future where robots have taken almost all the jobs.

Let's put this clearly: In the not too distant future we will be able to produce everything we need to survive plus a huge amount of other stuff just for fun with human beings doing next to no work. This is what we call a crisis.

All the stuff we want. Don't have to work. Crisis.

The crisis, of course, is that a very small number of people will own all of the machines and everyone else will be left to rot. Basically, the crisis is that the rich might one day no longer need the poor.

If that's the crisis then there is an easy answer, and it's not a big clever idea, it's probably one of the oldest ideas out there: kill the rich. The rich may one day not need the poor, but the poor have never needed the rich.

I'm not really an advocate of murder or of revolution. At this point I'd be willing to strike a deal with the very rich. We will cut the cord to their balloon economy and let if float away. They can busy themselves increasing the numbers in their bank accounts as if they were high scores in Joust, and we will give them pretty much whatever stuff they want. It will be hereditary, they and their families will simply be rich forever. But in exchange, they aren't allowed to mess with reality anymore. No more saying what can and cannot be done with land, who gets to live in what houses, what infrastructure projects get funded, which drugs get researched, and so on. We can afford this deal. Frankly, if others want to join them, we can afford that too. We'll make the ticket an economics degree - get one and you too can have all the stuff you want but you aren't allowed to decide how anything works. If you have an economics degree and you don't think this is a good deal for you, I'd love to hear why.

That's not going to happen, but gauranteed income is a real solution. If everyone could afford to live the kind of life that we can afford to give everyone then we could put retirement schemes to rest. Instead of being the society that is worried it will break it's work-until-you're-65-and-we'll-let-you-live deal, we could be a society that simply offers a you-get-to-live deal.

For those of you wondering and who didn't bother too sift through the information I dropped to get the clues, I came out of the Toronto Star survey as part of the Post-Materialist Left. Who knew?

Thursday, 4 December 2014

What Kind of Torontonian are You?

Someone forwarded me a quiz, hosted by the Toronto Star, that places you on a rather nuanced political spectrum. It has eight categories to sort you into:
  • Post-Materialist Left
  • Anti-Establishment Left
  • Social Democratic Left
  • Laissez-Faire Left
  • Faith and Family Right
  • Heritage Right
  • Libertarian Right
  • Steadfast Right
Those who know me can probably guess which of those I fit into pretty easily, though I can see it coming down to two. For each category you can get some information like the proportion of survey participants who fit into that category, the average age of people in that category, the ratio of males to females in that category. The ages are pretty old, with the youngest average age being 36. I guess that just says something about who reads the Star.

I fit into the youngest, poorest, most female of the categories. It told me I was least like the category that was the oldest, wealthiest and malest.

Now, I had to lie a few times. At one stage it asks you to rate some different things against one another and I lied and said that taxes weren't important to me. Taxes are important to me, but I assumed that it would interpret me saying that as saying I want taxes to be lower. I want them to be higher and more progressive. And that's not just to pay for more programs, just all other things being equal we should raise taxes.

But the weirdest thing about the survey is that one of the statements for you to agree or disagree with is "There are more than two genders." Then after you go through all the questions it asks you if you are a man or a woman. Come on! I think it would be really neat if it determined which options to give you based on your answer to that question. If you pick "Strongly Agree" then it asks if you are a man or woman, if you pick "Slightly Agree" or "Slight Disagree" then it asks Man, Woman or Other. If you pick "Strongly Disagree" then it gives you 20-some choices. I would have done that, it would have been a lot of fun.

Anyway, I like doing surveys and I like be fitted into categories I've never been fitted into before. If you'd like to take it here. It is definitely directed at Torontonians, though, it's not really very global.

Tuesday, 2 December 2014

No Sleep

My baby's and toddler's don't-sleep-until-after-midnight and wake-up-at-five tag team  has me so exhausted I can't read most of the time, let alone write. I'm still coding, strangely, I guess that uses a totally different part of my brain. Right now having anything to say is too lofty a goal for me, so I'm going to slumber for another few days at least, I think.

A few thoughts until then:
  • People actually refer to people with read hair as 'gingers' as in the phrase 'annoying bearded gingers are ruining sitcoms.'
  • Chris Rock's summary of race relations in America: 'There are no race relations. White people were crazy. Now they're not as crazy.'
  • I now use single quotes instead of double ones, apparently.
  • Final Fantasy Tactics is awesome. Speedrunning Final Fantasy Tactics looks insanely intolerable.

Friday, 21 November 2014

Further Levels of Abstraction

Since Monday I've been coding plenty but I've added virtually nothing to the game. Instead I'm just been raising the level of abstraction of everything.

Now instead of having a function that goes through a lot of different if statements to figure out what your characters should do next, I have a function that runs through an array of functions that each check whether you should do a particular thing. The array is passed an object that has an order property that tells the array where to put it in the chain.

So now instead of getting to a statement that says, "If you've bought the Stairs feature then check if you should go down stairs," that check is simply never performed and getting the Stairs feature inserts that check into the array of things to check.

I'm just about to implement a similar approach for rolling for treasure. When you start a new game each enemy you loot will just give you the coins. When you learn items a function will be added to the array beforehand that rolls to see if you should get an item instead.

There are a few more options in my working version, but mostly they are just options to buy things that were already in the game - like buying the feature that your character will automatically return to town when their inventory is full and things are marked for sale.

Also, I saw a sign in the elevator in my building that had instructions to buy tickets to the christmas party. It said to pop the ticket money into an envelope with your name and phone number and put it into the appropriate place. I was honestly baffled for a split second while I tried to figure out why they would have said to "pop" money into something when they clearly should have said "push."

Thursday, 20 November 2014

Maddening Javascript

Does this look right to you:

function (x) {return function() {}}(i)

Last night I ran into a problem that I didn't quite know how to solve. I've recoded features so that they have multiple stages contained within them. For example, instead of having a separate feature for each rarity of items, I have a second feature, Items, that you can buy all the ranks through. First I recoded it so that the stages were linear - the feature kept track of which stage it was on by use of an integer - then I decided that I should redo it so that it's non-linear. This is all in preparation for adding a town with upgradeable buildings, so you can see how I would want to have multiple choices of upgrades at the same time.

So when you click a feature I need the game to bring up a menu, and I need to create that menu by running through the stages and seeing which ones are currently available so it can add them to the list.

The game has only one menu object. If you have a menu open and you click another thing that opens a menu then the first menu will disappear, that's because it's actually the same menu that is just relocated and drawn. To create a menu you have to pass the menu an array. Each element of the array has to either be a string or an object. If it is a string then the string is appended to the HTML of the menu. If it is an object then the game creates a div and sets its innerHTML to the name property and adds an event listener that runs the Func property on a click.

So I looped through the stages of the feature in a for loop and whenever I came to an available feature I pushed two things to the array that would generate the menu. First I pushed some text that describes the upgrade and its cost. Then I pushed the object to make the menu, which has a name of something like "Buy this" and a Func of function() {} where i is the variable I'm looping on.

When I did this, the menu came up correctly and it correctly offered to let me buy common items. However, when I clicked the option, it bought legendary items instead.

Because the function that I attached to the menu was defined inside the same function where the loop was happening, when it went to pull up that function it did it within the scope of the function that created the menu. That means that instead of using what i was at the time when that menu option was created, it used what i was now, after all menu options were created, which is the last stage on the list.

At this point I actually just got up from my computer and walked away. The logic of passing functions to functions has occasionally caused me problems, but I actually just couldn't think of what I should do about this.

Once my head was away from the frustration of the situation and into the cold air, the answer was clear, and not that challenging. All I had to do was make a function that returned the function and it would fix the value being passed at that moment. As long as I actually execute the function that I'm passing i to, the value will be locked in at the time of execution and the game won't look back to see what i is when the menu item is clicked.

The resulting code has the look of ln ex, but it does its job.

Anyway, yes, I'm working on a town with upgradeable buildings, the primary purpose of which - in it's initial implementation - will be to get a guildhall so that you can learn a class and then get class abilities.

Monday, 17 November 2014

Yes It Is!

On the advise of commenter Chris I have decided to leave making sprite sheets for another day. I made a couple finishing touches now I have it for you.

Click Here For Fun.

I've twice now called this an "early alpha." I don't think it's riddled with bugs, or at least not crash bugs. But it is very feature-light. I'm sharing it now for two reasons:

  1. There are a lot of things I could be doing in terms of further development. I'd like to hear about what I should be doing and get ideas from people.
  2. I have started about a dozen browser games and abandoned them all before I had any kind of product. I sort of committed myself to putting something out there.
This is an idle game, not a carpal tunnel syndrome game. That doesn't mean that it has no interactivity, but when you start, you are not missing the thing to frantically click on, it isn't there.

I have tested this on Chrome and Firefox. I have no idea what crazy things it might do in other browsers, but working on that cross browser compatibility is about the least fun thing I could imagine doing with this project, so that might be a long way off. It also unapologetically uses LocalStorage and other contemporary browser stuff. If you are using a less than modern browser, I have no idea if it will run.

Anyway, don't expect to get a huge amount of play out of this, and bear in mind that I most likely will blow up your save game at some point in the future.

If you want to blow up your own save game, you can open a console and type in:


And that will do it for you.

Enjoy and send feedback, either through comments or email or just by talking to me because half of you know me.

Heinous Error - Still On Track

Ten days ago I said I was going to release an "early alpha" of an idle game today. This post is not a post to say that I am going to delay that release, but it is also not a post doing the release. I really do plan to make another post this very day on this very blog releasing it.

But I'm not quite there yet.

The one thing I'd like to fix before I get it out requires a little bit of fiddly graphics work, but I think I should have time to get it done this evening. Frankly, if I understood more about how browsers work and how they cache images I might know that I don't have to do the thing I want to do at all, but I'm going to go ahead and do it anyway, because I'm pretty sure it can't be worse, and could be quite a bit better.

Imagine you have an image on your screen which is going to change fairly frequently from one thing to another. One way to do that is to change the image every time you want it to change. Another way is to make one image which is twice the width of the two images, and simply reposition it within an element that cuts off the excess.

I started by doing it the first way, and I want to redo things so that it works the second way.

There are two reasons why I want to do this. First of all, it's possible that the size of the combined image is smaller than the combined sizes of the separate images, but it doesn't seem very possible that its larger. Worst case scenario it is literally no easier to save than the two images side-by-side, best cast it seems like the compression can do better with a larger image than with two smaller ones. Now I'm not actually very familiar with image compression, and I'd almost be surprised if someone couldn't, as an exercise, come up with two very particular images whose sizes added up to more than the sum of their parts for any given compression scheme, but generally my understanding of image compression is that the more uniform the image, the better it compresses - a solid white image is going to compress beautifully, for example. Well, these images I am saving have a lot of white space, so hopefully the compression can do something with that.

Secondly, though, if you download one big image then you get one big image once and just hold onto it for the entire time you run the game. If you swap between images then you need to get one, then the other, then the first one again. As I said, I don't really understand how browsers cache images, but I do know that when I was actively running the game and changed one of the image files the image on the screen would not change, but if it later swapped to it, it would change. That means that at the very minimum every swap between images means a check to see if they have changed with a hash or something, and at worst it means downloading the image all over again.

I looked down the images I am working with and the largest one I have so far is 7KB. That's not really very much, but what if people like the game and share it with their friends? What if this time next week fifty are playing? And if the game swaps that image onto the screen on average every minute? Well, that's 500MB a day. Google doesn't actually publish the limit on accessing info from their free drive accounts, but I read someone doing a test on it that suggests that this might start brushing up against the point where they notice. I do plan to pay for web hosting in the near future, but I haven't actually started doing that yet, and I don't want to get Google upset at me.

For the code this will mean only minor alterations, but for the actual images this means I have to open them up and paste them together. That probably happens after bedtime, so don't expect to see the game up until about 10:00 or 11:00 EST.

Wednesday, 12 November 2014

Saving the Game

I mentioned last week that my big goal before sharing my idle game project was to put in saving. I'm working on it, and encountering three challenges.

First, figuring out a way to sensibly convert the information into a string. Local storage will let me store strings, so that's what I've got to work with. I don't just have a series of numerical values to store. It's not just number of widgets produced, number of each widget producing thing bought, and a bunch of booleans for upgrades acquired, Instead I have names of things that are generated as the game goes on. I don't start knowing how many things I need to store or what kind of information I'll have attached to each thing. I can obviously do whatever I want with strings of course, but this is the kind of fiddly real-life stuff that I hate doing. String manipulation is awful.

Second, I don't want to lock myself out of doing different things in the future. If I add another stat to the game, add new features or add another gear slot or something like that I don't want to have to delete old saves. Usually this is accomplished by adding new things to the end, but I don't have a well defined "end" to add them to.

Third, local storage, as I understand it, is usually stored per domain. Because I'm currently hosting things on google drive, that means I'll be sharing my local storage with everything else on google drive. I don't think this is a really big problem, but it might be a problem in a way I'm not aware of. Maybe it's time I get around to registering or something of that sort.

Anyway, one of the takeaways is that this is going to have the most hackable savegames since Candy Box 2.

And, as there always is, there's a lot of executing, finding out I missed a semi-colon, putting it in, executing again, and being alerted to yet another missing semi-colon. That's a constant. Strangely, though, the last few days have been full of instances of things actually working. I type in a bunch of new stuff in several different places and run it and it works exactly how I wanted it to.

It's like I'm getting better at doing something by practicing.

Monday, 10 November 2014

Cookie Clicker Beta - Grandma-Type Boosts

We all know what I'll call Grandma-Type Boosts, boosts that you unlock by getting 15 of an object that double the effectiveness of grandmas and give you a type of grandma among the grandmas on your screen. In the beta these have a neat change:

I really like this. Something Cookie Clicker could use more of is things that interact with one another.

Well, naturally I had a spreadsheet going, and I noticed that the value I was calculating for my buildings wasn't matching their actual output. This affected only those buildings with the grandma bonus, so I was fairly sure the grandma bonus was not doing what it said.

I tried adding in the bonus before other doubling multipliers, but that didn't work. After a few experiments I resorted to looking at the code. The game computes the cookies per second of each object by adding up the number of doubling upgrades, raising two to the power of that, and multiplying that by the base value of the object. How do grandmas fit in? Well, if you have the upgrade then it multiplies the number of grandmas by 0.01 and then adds that in with the doubling upgrades. But that doesn't increase the CpS by 1% per grandma, that multiplies the CpS by 2 to the power of 0.01 per grandma.

That means that 50 grandmas don't give 50% more, they give about 41% more. On the other hand, 200 grandmas give four times as much rather than three times, and 300 grandmas give eight times instead of four times.

I don't really have a way to know whether Orteil meant for grandmas to do what the tooltip says or whether Orteil meant for the tooltip to express what grandmas do. But since grandmas give this bonus to all objects except for cursors and themselves, this basically means that the bonus from grandmas is exponential rather than linear, every 100 grandmas doubles your overall output, each grandma is a 0.7% increase.

We know that the cost of grandmas, like other buildings, increases exponentially as well, so this doesn't get too out of hand. Since each grandma gives 0.7% more cookies per second, but each one costs 15% more, the marginal value of each grandma decreases by 13.5%. That means that if it took you one minute to save up for a grandma, the next one will take 14.2% longer, about 68.5 seconds. One hundred grandmas later, all other things being equal, you'd have to wait about 407 days to save up for the next one.

So this isn't going to ultimately make a huge difference, but if you consider the difference between getting 14.2% compound interest and 15% compound interest, you'll know that as the numbers get bigger you'll start noticing a big difference. Because that difference is ultimately translated back into cookies to spend on a resource with an exponential cost, the total will only end up being a little bit higher.

Still, it makes a big difference to the relative value of grandmas and prisms as the game goes on, and that's kind of nice since grandmas are so key to the plot of Cookie Clicker.

Friday, 7 November 2014

Cookie Clicker Beta - And Big News!

I've been playing through Cookie Clicker again for the last month or two and I am thoroughly at endgame. All I have left to do is accumulate 400 cursors and harvest up a total of an octillion cookers. That will take another couple of months, I think.

In the meantime I decided to check out the beta build, and I have to say it's pretty exciting. Building prices and production values have been redone. There are new buildings; not just slapped on the top at even higher cost, but in the sequence. Factory and mine are switched, and - no spoilers - you don't go straight to space from there.

I don't know what the revision to the legacy system is, but there is something to it, so I'm racking up my trillion cookies to see what happens. It's got a legacy button in the upper right corner that has a progress bar to a trillion cookies to show you how you are doing. I am looking forward to ascension, even though it's probably a really bad idea to do it at one trillion.

And on the idle game front, I've put together a pretty decent first approximation of my latest project. The thing it doesn't do, though, is save your game, so it needs a little work. Fortunately I am going to actually have a few hours to myself in the near future, so I hope to get that done and unveil the "alpha" Monday after next.

I've already shared the version I have with someone and they remarked that it was like a real game, so I'm a little excited.

Wednesday, 5 November 2014

Habit One - Radically Alter Your Entire Worldview. Do It Now.

There is no piece of advice in the "Habit One" section of the Seven Habits of Highly Effective People that couldn't be seen as a piece of good advice. If you are interested in learning about the habits, I can save you a lot of time. Here is a summary:
When something happens, choose to act in a positive way instead of letting the thing that happened dictate your reaction.
Yeah, that's all you have to do, just be positive about things all the time. Now, he clearly differentiates his approach, which he calls proactivity, from simple positive thinking. He thinks you should be clear and honest about challenges. You know, positive thinking but don't be unrealistic in your positivity - positive thinking but everyone but me is dumb.

And that's it. The chapter certainly has examples of people who were positive and who did pretty well. He makes a lot of reference to Victor Frankl who manages to not only survive but flourish in a Nazi death camp by choosing how he would act in the face of the terrors. That's an inspirational story of a person who didn't let even the worst circumstances dampen his spirit.

First, let me complain about positivity. We are talking about a Nazi death camp here. We really don't know how many positive thinkers were killed in these camps precisely because they were positive about their experiences and thus threatening to the people running the camps, and for all that Covey writes about how inspiring it is when someone faces death with dignity, those people still end up dead. Covey may have a fantasy land afterlife story in which things work out okay, but that's just make believe. Face death with as much dignity, indignity, happiness, sadness, courage or dread as you like, one day the universe will be as it would have been if you had done the other. Nothing persists forever.

Now that I've vented my generalized negativity, let me say something bad about the book specifically. The advice really is to just do this. Like, "Hey, did you know that no matter how bad things are, you still get to decide how you react to them?" Yes, I did realize that. I'm sure that some people don't realize that, but reading it in a book isn't going to help.

The book is called the seven Habits of highly effective people, so you'd think it would include some kind of habits in it. Maybe a hint as to what behaviours you could engage in to acquire these habits. Here is Covey's list:

  1. For a day listen to your language and the language of those around you and see how often you say things like, "I can't" and "If only"
  2. Think about a situation you are going to encounter and how you could approach it proactively. Then do that.
  3. Identify a problem you have, figure out how you can use the advice of chapter to work on it. Do that.
  4. For a month, just be the way I say to be in here, maybe you'll like it?

My friends used to chant, "do it! do it! do it! do it! do it! do it!" very quickly as a kind of alternative to "come on." Aside from number 1, that's what Covery's got. He's got "Come on! Just be proactive already!" and that's all.

In my first post about the book I compared self-help books to fad diets, and this is really helping with that comparison. The chapter is long on things that are supposed to leave the reader feeling inspired and short on mundane approaches to acquire a new habit or skill. The advice basically covers this problem off itself. Since the advice is to be proactive instead of being acted upon, why don't you be proactive about being proactive instead of being reactive and waiting for something to come along and make you proactive?

Is there a point to a book of advice that begins with the advice to pull yourself up by your bootstraps?

Tuesday, 4 November 2014

Shouting at People

I sometimes post on here about how I essentially make a sport of arguing with jerk and morons online. It's half-in-jest, I do treat it like a sport but my anger that someone on the internet is wrong is all too embarrassingly real.

What I don't do anymore is go after people for the way they've chosen to express themselves. At least, I hope I don't do that. We live in a world with a lot of different people and they express themselves in different ways. If someone has an idea to get across then I'm interested in the idea, not in how they tried to get it out there. Sometimes if I honestly misunderstand someone I will explain what it was about their expression that caused the misunderstanding. Sometimes when someone is attracting a lot of anger because of how they chose to express themselves I'll give them a hint that their manner of expression, and not their content, is the problem.

What I don't want to do is say, in the words of Voltaire, "I agree with your opinion but I will fight to the death the way you said it." If someone wants to hire me as a communications consultant, that's fine, but otherwise I can let them say what they want to say without providing my unsolicited advice.

Which brings me to a person who expresses things very differently that I would. They swear at people and laugh at people. They call people names. When someone says something stupid, they are a lot more likely to say, "Hey, that's stupid" than I am and a lot less likely to try to break the whole issue down to make a rigorous point.

I don't enjoy reading posts by this person, I often feel they've been mean, I sometimes feel they are escalating the conversation into a fight. I am also very glad they are doing it.

Philosophy is, apparently, the malest, whitest subject you can study, and I am definitely a philosopher. Sure, I'm a problem child of philosophy, a rebellious one, but if my discourse exists in opposition to philosophy then it is still defined by philosophy. I turn logic and fallacies back on the people who use them, but they are still fundamentally the things I deal in. I talk to other people from within a very narrow set of rules about how we are supposed to talk that excludes the ideas of a huge number of people.

So while I may be tempted to think, "Oh, don't get angry, that's not the most effective way to win out in this situation," I am really trying to impose my own internal process on that person. In reality people say and do things that make sense to be angry about.

When I read this commenter's posts, I find myself put off by their manner of expression. But at the same time I stomach that manner of expression long enough to get the point they are making, and they have some very good points. It's nice because it makes me more confident that when other people are being jerks I'm not dismissing them simply *because* they are jerks, but rather I'm able to see past that.

It's good practice to not try to police other people's tone when I should be trying to understand them and address what they are actually saying. And sometimes using a different manner of expression allows someone to make a point that they just never could have made if they wrote and spoke the way I do. I like hearing other people's ideas.

Monday, 3 November 2014

Back to Our Darker Purpose

I started playing Our Darker Purpose again. This game definitely has some things going against it from my perspective, but I really do like it a lot. I was watching a bit of youtube video of someone who is much better than me playing it, but his analysis of items and perks was pretty lacklustre, so I thought I might as well write some stuff since that's what I do.

So if you wanted to read a criticism of someone you don't know's perk-weighting heuristics about a game you don't play, you've come to the right place. More incredibly, I basically agree with what he said, and really I only take issue with the fact that a comment he made at the end revealed that he believes what he believes for the wrong reasons. This has got to be very important.

The particular comment was that life perks are not very good. In Our Darker Purpose each time you level up you get to choose between two perks. There are three perks on the list that give a flat 50 life with no other effect. You begin the game with 100 life, so 50 might seem like a lot, but the youtuber in question said that these perks weren't very good, and he was right.

In most RPGs increasing your health is very good and often its even priority one for people interested in endgame play. What are the factors that make health so good?
  1. Getting one-shotted or stun-locked out. If you can take more than your maximum health from a single attack or can be stunned long enough to lose your maximum health while not in control, you are living in a constant binary alive/dead state. This is not desirable for long term survival. Having enough health to live through an attack gives you leeway to increase your mistakes allowable from zero to more than zero.
  2. Avoid overhealing. If you can get healed for a huge fraction of your maximum health at a time, then more health means less healing waste.
  3. Starting fight as maximum. In many RPGs you are always going to heal up to full using some essentially renewable resource before each dungeon, boss, or fight. The lifespan of your lifepool is much shorter, so you use maximum life over and over.
What makes Our Darker Purpose different? Nothing does enough damage to one-shot you. Overhealing is something you can almost always avoid. You don't get restored to full health. Maximum health allows you to carry more health from one floor to the next if you are at full, but for the most part it's just health.

In Our Darker Purpose you have to see your life total over the course of the entire game. You start the game with 100 life and three drinking boxes which restore 20 each. That's 160 life to work with. You can get more in various ways, but each time you gain life you add that to the total life for the game and each time you get hit you subtract it off. There are no resets until the game is over.

So when the youtuber said that health perks aren't great, I tend to agree. Having 50 more life to play the game with is a good thing, but it doesn't compare favourably with most other perks like doing 20 more damage or moving faster. But then he said something that was very wrong. He said that maybe if you had a Doctor's Note it would be worth it because it would require fewer juice boxes to heal up again.

It really doesn't matter how many juice boxes it requires to heal up that 50 life, because it's still gone once it's gone. If your juice box value is up to 50 then you can recover that 50 life for just one box, but that's still one fewer box to spend in the rest of the game. It's gone and you aren't getting it back. Juice box value is unaffected by your life total, so unless it gets up to the point where you are going to have overhealing problems, a high juice box value does not make the 50 life perk better.

Of course there are perks that are just plain bad, so generally I would say that I take a life-up perk once a game. It's not the worst, it's just not really very good. But that has nothing to do with whether you have or have not found a Doctor's Note.

Friday, 31 October 2014

Scattered Thoughts About Jian Ghomeshi

Since I have no idea who reads this, but I'm sure someone I don't know does, I will briefly who Jian Ghomeshi is. Ghomeshi is a well known Canadian who gained early, though brief, fame with an a cappella band and later became involved with CBC, Canada's national broadcaster. He co-founded the radio show Q in 2007 which has become a very popular show for CBC and, as I understand it, has been syndicated to the US. So firing him was kind of a big deal for the CBC.

But that was what the CBC felt they had to do when allegations of sexual violence came to light. Ghomeshi tried to get out in front of the allegations by hiring a PR firm and writing a lengthy post on Facebook that said that he was going to be falsely accused of things. When the next day he was accused by three anonymous women, and then the next day it was eight, it strained credulity to believe this was really a conspiracy against him. Now women have started putting their names and faces to the stories and his PR firm has dropped him, so it's manifestly unreasonable to believe his version of events.

So Jian Ghomeshi likes to hit women. This is done, according to him, as part of some kind of consensual sexual activity, and I think it remains to be seen how much he believes that, but it certainly doesn't remain to be seen whether that is true - it is not true.

I have a few scattered thoughts about this:
  • When I read Ghomeshi's facebook post, I thought he'd have to be a real sociopath to write that if he had actually sexually assaulted women. I feel like I can probably stand by that.
  • This and other recent events are bringing a lot of attention to how hard it is to come forward when someone has been violent towards you. Lucy DeCoutere, one of the women Ghomeshi has assaulted, said "I thought I'd be destroyed." This is a great conversation to be having. It's staggering to me that people don't understand how difficult this can be, especially when the person you would be accusing is famous and well-liked.
  • People at the CBC knew about this before the last few weeks. People who knew Ghomeshi knew about this. The CBC did not fire Ghomeshi because he likes to beat up women, they fired him because the public was going to find out that he likes to beat up women. From their perspective this makes sense - his public image is a product that they sell. I also don't think the is a moral high ground in firing people for doing terrible things when they aren't at work because that's just sweeping the terrible under the rug. But what did they do? Who talked to Ghomeshi about this? Did any of his friends, family or co-workers who knew say anything?
  • It doesn't seem likely Ghomeshi picked this up at the age of 36. More stories are probably coming.
  • Don't lie to your PR firm. Why hire a PR firm and lie to them?
A lot of people jumped to Ghomeshi's defense immediately after he posted his facebook explainer only to retract and apologize later. None of these people should have doubted that Ghomeshi is capable of sexual assult.

About one in five men - and about one in seven women - are abusive to domestic or sexual partners. I would bet most of us know at least one person who we are really sure would never sexually assault anyone. You know, someone we really, actually know rather than a radio host we feel like we know. There are some people who just don't seem to have aggression in them in that way, or who just show too much empathy to believe that they would be so cruel to someone. I don't think it's impossible to judge other people's character.

But there is a very good chance you don't know which among your friends, classmates or colleagues makes up part of that approximately 17% of people. What you can know is that one-in-six is too many people for them not to be around you all the time. It's too many for you to not have that classmate or that co-worker or that friend. It's really too many for your to not have those classmates and those co-workers.

When we hear that someone has been accused of a sexual assault, we'll be tempted to think, "Oh, not them," but we should remember to think, "If not them, then who?" because we know this is going on all around us and a staggering proportion of the population is involved. If you think no one you know is an abuser, stop and remind yourself that that almost certainly isn't true.

If we lived in a society where only 1 in 1000 people committed domestic abuse then it would be plausible that you actually don't know an abuser, that you don't say hi to an abuser in the morning and that you never go get coffee or lunch with an abuser. But we're a long way off from that.

Thursday, 30 October 2014

Combat System

I mentioned that I'm trying to bring World of Progress into reality, but living up to contemporary idle game standards - that is, you will actually play the game rather than simply letting it play itself. What you won't do is control any of kinds of actions you normally control in an RPG - attacking enemies, casting spells, and so on. Instead, you'll control strategic choices like what gear to equip and what area to adventure in and let the minutiae of dispatching endless hordes of monsters to your able avatar.

I've been trying to work out a combat system that I'm satisfied with. The goals are:
  • Many Stats with very different effects so that there are lots of different stats to use on gear
  • No Stat Too Obviously Powerful so that picking stats on gear isn't too boring
  • No Weapon Class Obviously Better so that you don't feel like you should always use a dagger
It's not really easy to come up with a formula that does all of this and I'm open to suggestions. I can really see how game designers struggle with this kind of stuff. Once someone has developed the world you are living in - we're rolling d20s to see if we hit, or 'block' pushing 'miss' off the hit roll table - you can start figuring out how to weight the different parameters.

But when you start with different parameters, it's not so easy to just jump in with a formula. I don't want to make everything multiply by x over x + y or having everything add x% because that's what makes different stats really boring - stats will always do the same thing an once you've determined the appropriate difference between x and y or the appropriate ratio between x and y you've solved the whole system.

I have the advantage of being able to make the damage roll system extremely quirky, but I want it to make some intuitive sense even if no one will really ever see it. The basic problem I have is that things that add damage make fast weapons better, so unless I subtract as much damage as I add, fast will be better than slow. The typical thing that makes slow better is attacks that use weapon damage but not weapon speed - usually ability that have cooldowns and I don't have those.

I suppose the solution is staring me right in the face - implement abilities with cooldowns. Maybe until then I just have to accept the use a dagger paradigm.

Tuesday, 28 October 2014

Seven Habits

I'm reading The Seven Habits of Highly Effective People. I won't go into the backstory here, but I feel like I'm in a position where I ought to read it so I'm making an effort to do so. One of the things the author does early on is that he asks you, as a reader, to share what you've learned from the book within 48 hours of reading each part. He explains that you will pay a lot more attention and get a lot more out of the book if you know you are going to have to tell someone else about it later. You'll force yourself to avoid skipping and glossing over points that you know you might be asked about.

I'm sure he'd bristle at the suggestion that this is a devious promotional trick, since his entire philosophy is to eschew devious promotional tricks. For what it's worth I think he's probably sincere in his belief that this will help the reader learn. Of course I bristle at the suggestion that I can learn anything by reading his book, and I don't think I read things any differently when I plan on telling someone else about them anyway since when I read things I generally actually read them in the first place. All that aside, though, I've got a blog where I talk about things I'm thinking about so I'm basically doing what he told me to anyway.

Two basic things strike me about the book:
  1. Covey's central thesis - that in order to be happy and feel fulfilled you need to put your internal life and your character above your external presentation of yourself and your image - is pretty reasonable
  2. Covey is a sweltering idiot of the highest degree
In Covey's defense I will say that the odds that I was not going to think the author of a book titled "The Seven Habits of Highly Effective People" was a superlative moron were extremely slim. The deck was substantially stacked against him if it was his goal to have Humbabella think, "Yeah, that guy isn't stupid on an inhuman scale."

But in his not-at-all-defense, here is a quotation:
uniquely human... animals do not possess this ability... "self-awareness"... the reason why man has dominion over all things... separates us from the animal world... basic nature of mankind... man has the freedom to choose... uniquely human... imagination... conscience... independent will... even the most intelligent animals have none of these endowments... they are programmed by instinct and/or training... they can't take responsibility... can't change the programming... they're not even aware of it... unique human endowments... this is why an animal's capacity is relatively limited and man's is unlimited... if we live like animals... we too will be limited... our unique human endowments lift us above the animal world... our uniquely human potential... nature of man... as human beings we are responsible...
This odious mass of staggering idiocy spans pages 74 to 78 of the 25th anniversary edition I have my hands on. I'm not sure what would drive someone to average saying "unique(ly) human" once a page for five consecutive pages, but presumably it has something to do with that person's free will or their nature as an instance of "man."

Of course that's a side note. Covey may be personally mired in some kind of Christianity-based magicthink about human exceptionalism but though that makes the basis of his theories suspect, it doesn't change whether or not he's basically right.

So is he basically right? Well his basic idea is that if you want to be effective you should live by the "character ethic" rather than the "personality ethic." You should live by your values rather than live to give off a good impression. An easy example is that if you want to be trusted, you should be trustworthy rather than try to convince others they can trust you. The impression others get from you will flow from the truth of your actions.

Yeah, I think he is basically right but with some important caveats. First of all, his idea of "effective" seems to be some kind of monstrous hybrid of contentedness and material success that makes no sense. Second, he thinks that those values you should live by are the same for everyone and flow from "natural law." So he's right as long as we accept that he is a dictionary-perfect imbecile.

On the other hand, this book was released in 1989 and has since sold 15 million copies and was named one of the 25 most influential business management books by Time in 2011. I wouldn't exactly say that the intervening years have been good for "character ethic" or bad for "personality ethic." They haven't been good for valuing productive capacity as much as production. If this is such an influential business management book, why are businesses evaluated on metrics like quarterly percentage change in profits, which represent the very height of the personality ethic of looking good without any substance?

80-some pages into the book I would say that pretty much every good idea he is presenting has fallen further and further out of favour in the mainstream and every bad idea he contrasts those with has come into ascendency. Like most self-help books, the point of the book appears to be to make the reader feel good for a couple of weeks after which they can go back to the miserable life they were leading before. Maybe they can pick up another self-help book.

Of course nothing Covey could write could possibly be as sickeningly moronic as the foreward to the 25th Anniversary edition. Here's a snippet:
As I reflect upon some of the exceptional leaders I've studied in my research, I'm struck by how Covey's principles are manifested in many of their stories. Let me focus on one of my favourite cases, Bill Gates. It's become fashionable in recent years to attribute the outsize success of someone like Bill Gates to luck, to being in the right place at the right time. But if you think about it, this argument falls apart. When Popular Electronics put the Altair computer on its cover, announcing the avent of the first-ever personal computer, Bill Gates teamed up with Paul Allen to launch a software company and write the BASIC programming language for the Altair. Yes, Gates was at just the right moment with programming skills, but so were other people - students in computer science and electrical engineering at schools like Cal Tech, MIT and Stanford; seasoned engineers at technology companies like IBM, Xerox and HP; and scientists in government research laboratories. Thousands of people could've done what Bill Gates did at the moment, but they didn't.

You know, I went to a casino and put down five grand on 33 on the roulette table. I won. Now you may say that was just luck, but just think about all the people standing around that table who could have done what I did but didn't. If you want to read some real galactic idiocy, it's Jim Collins who delivers, rather than Stephen Covey.

Monday, 27 October 2014

I Got Very Distracted There

This last week I've been spending all the free time I could find coding something I've meant to make for a long time - a reimagining of the classic MMO Progress Quest. Progress Quest is the original idle game, predating Candy Box and Cookie Clicker by more than a decade. But Progress Quest was truly an idle game. There was no way to interact with it once you selected your name, race and class and rolled your stats.

The choices you made didn't matter except for an oversight that made it ideal to have your strength be as high as possible and all other stats be as low as possible. Your character fought monsters, completed quests, progressed through the story, and got new equipment, all without you clicking a thing.

For a long time I thought about making a Progress-Quest like game, and now in the age of idle games, the time has finally come. I've started making a lot of idle games in the past, this is probably the farthest I've gotten on one. I'm hitting the wall now in that I'm really not sure what the mid-game should look like, so this one might be headed for the heap soon too, but maybe not because what I've got so far is actually pretty neat. All that practice coding javascript has really paid off.

What I really want to brag about is an incredibly dumb thing that will, I'm fair sure, cause most of the population to say, "What does that mean?" or "Why does that matter?" and will cause the vast majority of people who understand what I'm talking about to say, "Yes, of course that's how you do it." But I felt good that I thought it up anyway.

Something that always bothered me about the code for Cookie Clicker was a section where it checks whether you've gotten certain achievements. Essentially, it looks like this:

if (count>100) award_achievement(1);
if (count>10000) award_achievement(2);
if (count>1000000) award_achievement(3);

And so on. Every time I look at that I just don't like how even after you've got achievement one, every time it goes through that code it checks if you should get it, then if you should it calls the function which checks if you already have it and then returns nothing. Now evaluating if statements shouldn't be taxing the processor cycles of a contemporary computer, but I just don't like the fact that its doing it. It's more about aesthetics than about the actual wasted effort.

The solution to this problem was way too obvious for it to have taken me so long to think of. Each talent in my game has a lock function. All of those functions are added to an object. When it comes time to check if talents should be unlocked, it runs through all the properties of the object and executes each function. If the function returns true then it both unlocks the talent and removes that function from the object so it is never checked again.

Depending on how javascript works this might be a straight-up worse solution than the put-it-all-in-a-list way. After all, I have no idea how hard it is for javascript to go through the properties of an object in a for-in loop.

But of course my way has another advantage. The check to see whether to unlock each talent is with that talent in the code, so if I want to change it I know where to look and I don't have to go to more than one place to cover different cases.

So I'm happy I did it. And I'm happy to report to you, my readers, that I definitely have some code written and there is really a possibility I will not leave it to rot.

Tuesday, 21 October 2014

Statistical Ties

This post is essentially just me being angry, though if you don't have a foundation in statistics, I might have inadvertently put some content in as well.

Not too many years ago the media got wind of something called "error" in polling. It turns out polls don't necessarily accurately reflect the population! But that's okay, the media got wise, and now they understand and responsibly report on margins of error in polls.

Something you will hear in the news often is the phrase "statistical tie." By that, the reporter will mean that two people are within the poll's margin of error of one another. So, if the poll gives an accurate result within 3%, 19 times out of 20, then a "statistical tie" might be 37 to 40 or 33 to 36, or something like that. If the poll is only accurate within 3%, then 3% apart is basically the same thing.

This doesn't have the properties we normally look for in an equivalence relation, though. If 33 is basically the same as 36 and 36 is basically the same as 39 then isn't 33 basically the same as 39? That's called transitivity, and it's a property we expect to find in any relationship that tells us when things are the same. Obviously it doesn't work here, so we might suspect something more is going on.

The idea that 36 is basically the same as 39 is fantastically dumb. Calling it a tie is nonsense. If the margin of error is plus or minus 3%, 19 times out of 20, that doesn't mean that within that range all bets are off. We could also calculate a 90% confidence interval, and a 50% one. The 50% one would be a lot tighter.

But even if everything within the range was equally probable, that would still mean that there was only a one-in-eight chance that the candidate that polled at 36 actually had more support than the candidate who polled at 39. That's hardly a tie.

Let's also remember that the numbers we are seeing are rounded. If "within three" makes two numbers the same, it's a bit problematic that one of them might actually be 35.9 and the other 39.1.
And if overlap of a margins of error meant equality then we should actually be doubling the margin. That 33 might be 36 and that 39 might be 36. That's a tie too!

Two numbers that are half of a 95% confidence interval apart from one another are actually pretty far apart. The one that polled lower is unlikely to be higher than the one that polled higher. There is no "statistical tie," statistics allows us to calculate the actual chances that each is higher and the answer is not anything like 50-50.

The media presentation of margins of error is one of those we-learned-something-and-know-we-are-worse-informed scenarios. For people who don't actually understand statistics and math, a far more useful understanding is to see the numbers in the polls, and assume that the difference between them is the actual difference, but keep in mind that polls get things wrong sometimes.

Monday, 20 October 2014


It's October, so supergreatfriend is playing spooky games on his Saturday night stream. One game he played is Harvester, a 90's point and click adventure set in a small town in the 50's. This game seemed really bizarre, so I dounloaded a playthrough of the game from and gave it a watch.

There are a lot of "horror" games out there in that there are games that try to scare you. Harvester is a real horror game in that it is absolutely horrible to experience. The entire point of the game seems to be to make the player feel extremely uncomfortable. To do accomplish this it uses themes covering everything from incest to cannibalism to emotionally unstable people left in charge of nuclear weapons. Lots of gore, lots of deranged people in a 1950's small town.

While playing someone asked supergreatfriend what this game was rated. But, as he said in reply, this game was made in the 90's. You didn't get games rated then, you just made them and released them. I find this game a very interesting look into a time before game ratings. For all of the "adult" content you see making its way into games - sex and violence and whatnot - you don't see games like this. This is really over the top.

Let me be clear, I do not recommend you download and watch this game, and I certainly don't recommend you play it - it looks like it would be really dreadful to play. But even though I'm not recommending it, I thought I would relate the fact that I watched it. Harvester is now a thing that has happened to me.

One final note: I'll say nothing about how awesome or incredibly stupid the ending is. Who knows?

Thursday, 16 October 2014

Clicker Heroes - Dora and Boots Mimzee

My hypothesis is that treasure chests appear 1% of the time. I ran an overnight test and figured a result as extreme as mine was 70% to occur by chance with a 1% hypothesis, so I feel pretty good about my guess. If you want to run your own test bear in mind that while the game is closed it farms up gold and monster kills for you but does not get chest kills, so you can't close and reopen the game if you want to get an accurate count.

Treasure chests give 10 times as much gold as normal monsters, this is a lot easier to test.

So 1% of the time you meet a monster who gives 10 times as much. That means that an average monsters gives 109% of the gold that an "average monster" gives.

Dora gives you 20% more treasure chests per level up to a maximum level of 50 while Mimzee gives 50% more gold per treasure chest. 20% more treasure chests would mean we get 1.11 normal monsters of gold per monster instead of 1.09, a 1.8% increase. 50% more gold from chests would mean we get 1.14 normal monsters of gold per monster gold instead of 1.09, a 4.6% increase.

But these two ancients combine better than other ancients. Each level of Dora you have makes each level of Mimzee better and vice versa. If I had one ancient that gave me 5% more gold per level and another that gave me 2% more gold per level, then with ten levels of each I would have 150% times 120% = 180% gold. With Dora and Mimzee 10 levels of each means getting treasure chests 3% of the time and getting 60 times the normal gold from those chests, which means getting 254% of the gold I would normally get.

This gets even wackier at higher ranks. If I invested 25 levels into Mammon and 25 levels in Dogcog I would have 125% extra gold from Mammon and effectively 100% extra gold from Dogcog for a total of 4.5 times as much gold. With 25 levels in both Dora and Mimzee I get 7.46 times as much gold. When you get both to 50 a 5% and a 2% ancient would give you 7 times as much gold. Dora and Mimzee gives 27 times as much.

Whats more, while Dora has a maximum level Mimzee does not. Suppose you had maxed out Dora but didn't have Mimzee. That would give you an 11% chance of treasure chests. That gives 199% of "average monster" gold per monster kill. Buying one level of Mimzee would increase that to 254%, at 27.6% increase. Once you have maxed out Dora, you can regard Mimzee as an ancient that gives 27.6% extra gold per. Since I advise buying Mammon at 5% per level, you can imagine what I think of Mimzee. Is it worth paying summoning cost plus 1275 souls to get a supercharged gold providing ancient? Of course it is.

But level 50 Dora may seem a long way off - I'm not particularly close to having level 50 ancients myself. What's the break even point where Mimzee becomes better than Mammon? When Dora's level two of course! Naturally you have to pay the price of the second ancient is a price to pay, but fortunately by the time Mimzee is level 8, Dora is also better than Mammon.

Mammon is a class above both Dogcog and Fortuna, and starting at ancient level 8 both Dora and Mimzee are a class above Mammon as long as you have both. I also think they are a class above all the other ancients as well. Honestly, Mammon is pretty good compared to his brethren.

I made a complicated three dimensional spreadsheet to determine how to level up Dora and Mimzee, but that was just to detect any anomalies. Basically you are increasing the amount of gold you get from treasure chests which is a (1 + x) × (1 + y) type function, so you know you know from my multiplication post that you want to keep x and y a fixed distance apart and in this case that's one. You also want to buy up Dora every time you buy up Mimzee and vice versa because buying one up makes the other one better and makes it worth buying up too.

So I replaced that spreadsheet with a really simple one that treats Dora and Mimzee's levels as a single dimension that goes up together. Here is the sheet. It works the same was as Mammon did. You can change the initial cost - remember to include the cost of summoning both - to figure out when you should buy in, and you can use it to determine when it's a good idea to buy up the next ranks.

Wednesday, 15 October 2014

Clicker Heroes - Not Mammon

There are a variety of ancients that give you gold in different ways. Fortuna gives you a small chance of getting bonus gold for each enemy. Dogcog reduces the cost of heroes which is effectively getting more gold since once you get to endgame levels are the only thing to spend gold on. Dora gives more treasure chests, and Mimzee gives more gold from treasure chests.

Amazingly, all of these are far worse than Mammon.

Now that's not actually true. Dora and Mimzee together are better than Mammon because their effect multiplies. Thus it shouldn't be a surprise that their individual effects are worse than 5% gold per level. I'll get to them in the near future, but today Fortuna and Dogcog have some explaining to do.

Fortuna gives a 0.25% chance of getting ten times as much gold from each monster killed per level. It costs the same as Mammon and has a maximum level of 40. That means with 40 levels invested Fortuna gives a 10% chance of getting ten times as much gold. Since that monster would have given you one times its normal gold without Fortuna, that means the bonus is nine times the gold of a regular monster. That's 90% extra gold. For 40 levels. If that doesn't sound right, imagine you were able to continue to buy levels of Fortuna. At level 400 the chance would be 100%, so Fortuna would just give 10 times gold for all monsters. That's a 900% bonus. A level 400 Mammon would give a 2000% bonus. This is a specific instance of the general rule that crit is always bad. Fortuna is critical strike chance for gold earned.

Dogcog gives 2% off the cost of heroes each level for 25 levels. That's effectively 100% more gold for 25 levels.

Since each of these is worse than Mammon on a per-level basis, it should be obvious that Mammon is always better. Since Dogcog arrives at a better maximum effect in fewer levels, it should be obvious that Dogcog is better than Fortuna when you average everything out. But like I said in my discussion of Mammon, when you are multiplying, the question is not so much whether to get it as it is when to get it. Also, from my post about fixing your intuition about multipliers, we should guess that number of levels you put into Mammon and the number of levels you put into these lesser ancients should be fairly close - closer than the vast superiority of Mammon would suggest.

My next ancient costs 250 souls to purchase. At that price, I should buy into Fortuna for 19 levels at 1415 souls. With that number of souls, the correct number of Mammon levels to buy would be 31, almost 32. That's a 12 or 13 level difference between the two ancients. However, the final level of Fortuna - level 40 - should be bought at 4107 souls. With that many souls, you should be buying the 49th level of Mammon. After that point, if you were allowed to continue to buy levels of Fortuna, the difference between your Fortuna and Mammon levels would remain at about 9.

Dogcog works a little differently. Because it reduces the price of heroes by a fixed percentage that adds up, each level is actually more powerful than the previous one. The first level reduces costs from 100% to 98% which means you effectively have just over 2% more gold. The last level reduced costs from 52% to 50% which means you effectively have 4% more gold.

Because Dogcog gets more powerful with each level, it make sense to max him out much sooner. The first level of Mammon, with a summoning cost of 1, is worth purchasing at 15 souls. The first level of Dogcog is at 51 souls. By contrast, the 25th level of Dogcog is worth purchasing at 1081 souls, while the 25th level of Mammon isn't worth purchasing until 1360 souls.

That probably sounds insane. Why would you wait longer to get a total of 125% more gold than you would to get 100% gold for the same cost?

There are two facts that go into answering this question. First, remember that we are thinking on the margin. The 25th level of Mammon increases your total gold production from 2.2 to 2.25 which is only a 2.3% increase, while the 25th level of Dogcog is a 4% increase. Those numbers assume you already bought the ancient to 39. Second, remember that these numbers only tell you when your production increases by buying that ancient, they don't comment on how much it increases or whether that is the best way to spent your souls. Clearly it is better to spend your 325 souls to get 125% more gold than it is to spent them to get only 100% more gold.

This serves as a reminder of how to use the Mammon Spreadsheet. The spreadsheet doesn't tell you to buy Mammon, it tells you when to increase your levels of Mammon assuming that you've already decided that Mammon is the ancient for you.

And this is the real problem for Dogcog and Fortuna. Since each ancient costs more to summon than the last, these two are holding you back from buying other ancients while providing a capped benefit that is actually quite low. Right now I could summon Dogcog and buy it up to maximum level for 575 souls. Doubling my gold for 575 souls is a good idea.

But instead of doing that I could buy Argaiv and buy it to the level. Then, in the future I could continue to buy them even higher without dropping another 500 souls for my next summon.

Honestly I can see myself getting Dogcog about three ancients from now, but I have other priorities in the mean time. Probably getting Dora and Mimzee together is a far better way to increase my gold production.

Tuesday, 14 October 2014

Always Simplify

When explaining the math behind Mammon in Clicker Heroes, I noted that we can convert extra gold into extra damage by raising four to the power of one over the logarithm of 1.07 to the power of 25 with a base of the increased gold.

In excel or google spreadsheets, if you are storing the number you want to convert in cell X, that is

= 4^(1/LOG(X,1.07^25))

But logarithms can be neatly simplified in a number of ways. If x is the value to converted and c = 1.07 to the power of 25, the formula in this case can be simplified as follows:

Now I can set cell Y as:


And my formula is, instead


It's pretty easy to not simplify things when you have a spreadsheet doing all the work for you anyway, but calculating one constant to raise things to the power of is much better than doing all that work each time. I could be shaving literal millionths or billionths of a second off the processor time.

Don't forget to comment and thumbs up if you read this blog to see examples of simplifying logarithms!

Friday, 10 October 2014

Fixing Your Intuition - Multiplication

Yesterday I wrote about Mammon in Clicker Heroes and I made a spreadsheet to calculate how many levels of Mammon you should buy based on how many hero souls you have in the bank. I opened with a comment that because Mammon multiplied through your production, he would always be worth buying at some point regardless of how bad his cost-to-effect ratio was.

Thinking back, I'm not sure this is entirely intuitive to everyone but I feel like it should be. I'm not entirely sure this post is going to be helpful to anyone - maybe people already have the right intuition about this kind of thing - but I feel like it's worth talking about a few mental shortcuts that you can use when you are analyzing numbers because it seems to me that probably a lot of people don't have the right intuition about multiplying things together.

Anyone with a passing interest in numbers has probably observed at some point that if you have two numbers that add to a fixed sum and you want to maximize their product then you want to make the two numbers as close to equal as possible. Suppose you have ten points to divide between x and y and they are multiplied together to get some kind of result. The best you can do is 5 and 5 to multiply to 25. 4 and 6 gives 24, 3 and 7 gives 21. That's a fairly simple observation.

Suppose, though, that you have ten points to divide between x and y, and the are multiplied together to get the result, but y is only worth half as much as x? I think intuitively some people see this situation and think that in this case you would put more into x than y because it is worth more. But multiplication is commutative. If you multiply x by half of y that is the same as multiplying x by y and then taking half of that, and the same as mutiplying half of x by y. The answer is still to make them equal.

When we are multiplying things in video games, though, we are often not actually multiplying x and y, we are adding two percentage bonuses. Suppose you have 10 points to divide between x and y and each gives a percentage bonus to the same thing. Again, the best is to divide the points evenly. 1.05 times 1.05 is 1.1025, while 1.04 times 1.06 is only 1.1024. It's a tiny difference that would be bigger if the numbers weren't so small.

In this case, if y is half as effective as x, we aren't directly multiplying x by y anymore, so it isn't the same as if x was half as effective as y. If we add x% to our result and only half of y% to our result, then the best we can do is to put all ten points in x and get a 10% bonus. If we add split the points 9 and 1 then we get 1.09 plus half a percent which is only 1.09545.

But unlike the result above, this does not extend upwards to infinity. Suppose instead of 10 points to distribute we had 200 points to distribute. Now the best we can do is x is 150 and y is 50. This gives us a total of 3.125. Changing it in either direction lowers our result to 3.12495.

How about when we have a million points to divide? Now the correct distribution is to put 500050 points into x and 499950 points into y. No matter how many points we put in, the correct answer is to put 100 more points into x.

More generally speaking, if you adding points to x gives you a% more per point and adding points to y gives you b% more per point, then the optimal value for x is:

Notice that if a = 0.01 and b = 0.005 then this is y + 100 which is just the result we got above. You don't necessarily need to memorize this formula, but the important thing to realize is that no matter what the difference between the effect of x and y on the outcome, if they each give a percentage bonus, then the ideal way to divide points between them is to keep them at a fixed difference from one another depending on the effect they have. So if y is half as effective as x that doesn't mean you put half as many points in, it means you put a constant number fewer points in. If y is one one-millionth as effective as x then again, the answer is to keep them a constant value apart.

As long as the number of points you have to divide is below that constant, you should put all your points into the better option. Once it exceeds that constant, you then divide the remaining points evenly between the "better' and the "worse" option.

This should make sense intuitively if you think about it the right way. Basically by adding percentages we are multiplying 1 + x by 1 + y. If x and y are small then those 1s make a big difference. As they get large that starts to look a lot like just multiplying x by y at which point the commutativity of multiplication kicks in.

Mammon, as I discussed, was more complex, owing to the fact that his cost scales up as you buy more ranks and his effect doesn't provide a linear percentage increase.

So there are three takeaways to this post that you should use to adjust your intuition about numbers if your intuition doesn't already work this way:
  • When you are multiplying two things together, don't be fooled if one of them is only a fraction as good as the other - they should still be kept equal to maximize the result
  • When you are getting percentage bonuses from two different sources there is a threshold up to which you should invest in the better one and after that you should invest equally
  • While for things that have additive effects the question is usually "Is this good or not?", for things that have multiplicative effects the question is always "At what point is this good?

Thursday, 9 October 2014

Clicker Heroes - Mammon

Summon ancients is a pretty enticing thing to do in Clicker Heroes. Odds are you should be saving up a huge bank of hero souls before you even get into summoning anything more than a couple of level ones, but hero souls are boring and ancients are fun.

Some of the ancients seems really bad, some seem really good, and then there are the ones that don't really seem that good but that you know must actually be good. Mammon is that last kind.

This post is drastically long for its subject matter, so I'm using a break. If you don't want to read a drastically long post about how I derived the results, you can scroll down to the header that says, "Results" and you'll find out how many hero souls you need to have in the bank before Mammon is worth buying.

Wednesday, 8 October 2014

Wanting the Best for your Children

A story has been in the news about a couple who had a child through insemination with donor sperm. The company that provided the sperm had profiles on donors and allowed the couple to choose the donor. A mix up with a digit ended up meaning that they got sperm from donor 380 instead of 330. The couple is suing the company over the mistake.

That story makes a lot of sense and seems entirely uncontroversial. You wouldn't think it would even hit the news. If that company had a history of making such mistakes I could imagine it, especially if these mistakes were all-too-common in the industry. That's news. But one company making a mistake that results in one couple's child having different DNA than they had hoped and the resulting lawsuit seems pretty run-of-the-mill to be a story with international interest.

But the couple is white, and they live in a neighborhood that is entirely or almost entirely populated with white people, and the donor sperm they were mistakenly given was from a black man.

This is a pretty dramatic way to discover that you were impregnated with the wrong sperm, I'll admit. I'm sure this is not the first time that a delivery room has been shocked by the skin color of the baby, but in most cases the mother would at least have an inkling that it was possible. I can understand feeling extremely angry and even violated and a law suit is predictable.

But of course to have a lawsuit against a company, generally they have to have harmed you in some way. If a company made a mistake that broke your arm you could quantify the harm in a dollar figure - you might have missed work or incurred expenses as a result, you could even place a value on lost leisure. What is the harm in having a black child instead of a white one?

Well, in America I think those harms can be quantified to some degree. Trayvon Martin's family probably has something to say about the harm that comes from having your child be black in America, as could the families of the many other black men who've been killed because someone thought they looked dangerous or like "thugs." And that's just addressing the most obvious and shocking of the problems that visible minorities have. The harm of being discriminated against goes from being murdered to being less likely to be promoted all the way down to getting a dirty look from a stranger.

It's simultaneously offensive and undeniable. There is a tiny bit of irony in it as well. The couple in question is a same sex couple - how many parents have thought, "Being gay is fine, but I wouldn't want my kid to be gay because other people are prejudiced." Rarely has that phrase been uttered replacing "black" with "gay" but the logic is the same.

In a way I'll be very interested to see the outcome of this case. Imagine a court actually rules about how much money someone is owed for the harm of having a black child. Imagine someone analyzed in monetary terms the amount by which America undervalues the lives of its black citizens.

If that happens and we know exactly how many dollars a couple "loses" by having a black child instead of a white one, I wonder, who will America's black citizens sue?