Monday, December 21, 2009


It's funny, you come up with a big fancy tool like a genetic algorithm, and half-way into analyzing the data you start getting confused about the output. I mean, it's obvious that if you run a simulation, and one ability wins 90% of games, that you have a problem. However, it's getting harder to quantify when something is really so good it's problematic. For example, what results would you expect if one ability had a 5% advantage over all other abilities? A 3% advantage? A 4% disadvantage?

i've taken to running what basically amount to calibration simulations to try to figure this out. Basically, instead of having a battle be long and confusing, I just simplify it as each person has a 50% chance of winning, plus or minus what they get from an ability, and pick a random number. I then run the algorithm with this as the fight routine, and see what the results are. One interesting thing I found: If one ability has a 5% advantage, you'll notice it under most detection methods. If one ability has a 10% advantage, and 3 other abilities have 5% advantages, you won't notice the 5% advantages.

The other thing I'm working on right now is somewhat of an equalizing algorithm. Basically, you run a genetic algorithm, and look at the results. If one ability is obviously stronger, you reduce it's power. If one is obviously weaker, you increase it's power. Then, repeat like 40 times, until hopefully you approach a steady state. I've tried it twice, and last time got results that can't be right. I am realizing that I didn't have a good measurement for "stronger" or "weaker," so right now am running a calibration to try to figure that out.

Blah, too much about computer simulations recently. Anyways, my hope is to try to get something reasonable by the time I go home for Xmas, so that I can playtest it with friends over the holiday. We'll see if that happens. If nothing else I might just abandon the GA simulation and switch to a straight out, each ability fights each other ability 10 000 times, and sees who wins the most.


“My main operating principal: Don’t take any shit from the zeitgeist.” – George Carlin

Thursday, December 17, 2009

More thoughts on points...

A thing I always wondered about: is it worth considering a psychological value when adding up points? Let's say you have a ogre, with a massive club. That is much scarier than a healer who regeneration and heavy armor. However, what if they are evenly matched? I sometimes wonder if the ogre with a massive club should be worth more, just because everyone is going to freak out when they see it. Does that make sense?

I guess to tie it a little more to my game: whenever I did playtesting, it was rare that anyone would give their character a boost to statistics. Everyone preferred something more sexy, like a special attack. However, I'm finding that often, the special abilities have been weaker than the statistics. The problem is, I slightly worry that if I weaken the stats so they do actually match evenly, then even fewer people will pick them. I mean, I guess that shouldn't be my concern, my concern should be what is actually even, and rather than leave a game ready to be unbalanced (as soon as a player really crunches the numbers).


“Your grandchildren will likely find it incredible - or even sinful - that you burned up a gallon of gasoline to fetch a pack of cigarettes!” – Paul MacCready, Jr.

Sunday, December 6, 2009

Exciting news and a new thought

First, the exciting news: I have been programming a genetic algorithm to test the relative strengths of each ability. Basically, a genetic algorithm is a computer simulation based on natural selection. In this, we start out with a population of 1000 random characters. Each one battles everyone else. If someone dies, they are replaced with a clone of the winner. After every 500 battles, we shuffle things up and do it again. I've been doing this sort of piece-wise, adding one or two abilities into the simulation each day. Anyways, the problem I was having was that almost always, I'd run the simulation, and a single pair of abilities would pop up as the best (such as "Power of the Fist" combined with "Greatweapon"). Then, after adding my 19th ability, I ran the simulation, and got major oscillations. Basically, there were about 8 or 10 abilities which would in pairs begin to skyrocket, until they had almost become the only ability, and then would suddenly decline, and a different set of 2 or 3 abilities would start to skyrocket, and so on. The basic meaning of this is that there is no best combination of abilities, and that even if a few appear to be good, they can often be beaten by the right pair. Some abilities didn't really get used much. I might try to tweak things, although to be honest, I worry about this less for two reasons. First, most of the weaker abilities are not well modeled in this simulation (such as archery weapons, or healing powers), and have non-combat uses. Second, if you have 10 abilities that are strong and 2 that are weak, effectively that means you have 10 abilities that you would choose from. If you have 2 that are strong and 10 that are weak, you really only have 2 to chose from.

Second, the new thought on my game: My game takes place in two world. The paradigm has always gone like this: in the real world, people are slow and tough; in the spirit world, people are fast and frail. This often leads to games where people really charge in in the spirit world, and sometimes nothing happens in the real world. What if I mixed the paradigms, and made spirit world people both faster and more robust. My thought is this: now, you can rush in and fight in the spirit world, but often before you have finished, things are already happening in the real world. I don't know, it's a thought. I'll test it out and see what people think.


“Looking back, I think it was more difficult to see what the problems were than to solve them.” – Darwin

Wednesday, December 2, 2009

Too long

Hey all,

Boy, grad school starts, and suddenly free time vanishes. I've been getting back into this recently. I had about a month where it really felt like I did almost nothing but work, then I had this eye of the hurricane kind of week where the planets aligned and I didn't have anything to do. I actually spent a Sunday sitting around bored, thinking to myself, "Okay, I used to have hobbies, what were they?" It's gotten me back into this.

I've rethought my back-story. It's a bit complicated. I wrote the whole thing up in detail and it was just over 3 pages. Basically, there is a fight over who becomes the next king after the old king dies. Balthazar basically wins by being the worst of any of the princes. However, because he is so terrible, there is an uprising. During the uprising (in part because of a failed assassination), Balthazar becomes paranoid of traitors, and creates a series of forced labor prison islands to lock up political prisoners, and anyone he suspects isn't 100% loyal. Eventually, he locks up all of the wizards in the kingdom, and forces them to study magic and produce things he can use to battle uprising. As time goes by, the wizards teach the other prisoners how to use magic, and everyone revolts, and takes back the island. Rather than try to reclaim the island, Balthazar basically curses it (long story, will probably explain later). All hell breaks loose, and basically former prison gangs reform in a fight for survival, all waiting until they can escape the island (when it becomes winter, the seas will freeze, until then it would be too cold and dangerous to swim).

I've gone back to computer simulations. A new thing I'm doing is testing what happens if characters have multiple abilities, using genetic algorithms. It's kind of surprising, abilities that didn't seem too strong before really come out when you can link it with another ability. It leaves me with that old question: how similar do abilities need to be, before that can be within an acceptable level of closeness? There are some real issues, for example, take regeneration. This ability allows characters to heal some number of hit points every turn, whether or not they are in combat. The question then becomes: should it usually lose to someone with a greatweapon (since that is a combat-only ability)? How much of an advantage should a person with a greatweapon have? Is there a way to account for this?

Also, it's kind of funny: these computer algorithms take quite a long time to program, and then it really feels like you can get most of what you want to know by running them once or twice. It feels, I don't know, almost anti-climactic. You write your programs under the idea of, "Gee, let's see, what can I do so that one simulation will give me all the information I need," and then when you finally run it, you're left with this feeling of, "This took me a couple hours to program. I should really run it more than just once." Funny how life works.


“Banking establishments are more dangerous than standing armies.” – Thomas Jefferson