Showing posts with label I was told there would be no math.. Show all posts
Showing posts with label I was told there would be no math.. Show all posts

Thursday, May 24, 2012

RISK Legacies and Diablo III

Playing more RISK Legacy. Got my name on the board. Friggen Finally. The game is continuing to update, and now there's a faction of mutants on the board. Figures that we'd end up nuking each other before we managed to put the world capital on the board. I'm still 1/7 amongst four of us, so I'm still doing worse than average. Grr. Barbarossa is up to three signatures now.

Also? Playing Diablo III. Having a great time playing it, it's a wonderful game etc, etc. Don't intend to elaborate on it much, except for this bit of inspiration. Naturally it gets me thinking about... math. Yeah, who didn't see that coming? Allow me to elaborate.

Diablo III has numerous monsters that spawn other monsters. As long as you stand around like an idiot that portal device will keep summoning imps, or that doom bat nest will keep popping out doom bats. Pretty cool and all, except there's a part of me that wants to just stand around, waiting for them to spawn enemies for me, and then just kill those enemies. The sweet EXP without having to go running about and all. It's a case of cross incentives because pretty obviously what the game wants you to be doing is running about and all, killing other, more varied things.

How do they solve this? Generally by making the enemies spawn at a slow enough rate that it's quicker just to blow up the nest and go searching. (And that's not terribly slow, given the nature of the Diablo games). In Diablo II at least (I haven't checked this in Diablo III yet; having too much fun killing things) when a Fallen Shaman would resurrect a Fallen, the already killed monster would grant you no more experience.

How would I solve this? Math. There are ways to sum up infinite series of numbers that (so long as they're smaller htan one) gives you an actual number when you're done. Image!It's a geometric series, and I think you can get how it works by looking at that picture. So this is how I'd set up my monster generator. The generator itself is worth a certain amount of EXP. The first monster (or wave of monsters) would be worth 1/2 that amount, the second 1/4th and the third 1/8th and so on. Then, when you finally get sick of the diminishing returns and blow up the monster generator, you find that it's worth the sum rest of the square. So the experience gains for that monster and it's spawn are fixed at a given number no matter how long you have waiting, and thus you're pushed to kill the thing quicker and be on your way.

There's a problem with this setup; if you bury the mechanics in combat text (by the by, do I need to mention this is a strictly video game setup? Board game players would get bored entirely too quickly having to do all that dividing.) Anyways, what was I saying? Oh yeah, if you bury the mechanics where only careful parsing and some Science! will dig it out, your players generally won't, and might end up getting frustrated. "I stood there like, all day and still only got a measly 2000 exp!" It goes against that interface design stuff I was talking about.

Thursday, January 19, 2012

Hey Kids! What time is it?

Time for more Axis and Allies blogging!

Yes, we do go to this particular well quite often, thank you very much for asking. But today is gonna be different, because this time, we played Axis and Allies Revised!

I expect at this point, some people are asking, "What's so different about Axis and Allies Revised, as opposed to Global 1940?" If this is the case, you probably haven't played both of them, and I'm glad to offer my services as one of the players, assuming you have a free weekend or two, and a large surface area on which to put the 1940 board.

The major differences, other than board size, include fewer rules and abilities for Revised, a later starting date (1942), with Panzer divisions poised to parade victoriously through Red Square, Japan more or less ascendant in the Pacific, and fewer nations. 1940, in a historically accurate but otherwise misguided move, also includes France, however in most iterations of that version Germany at the least takes Paris on the first turn, dooming them to well-deserved irrelevance.

For the first time in a long time, we managed five players, but since I'm too lazy to give a nom de blog to any of them, I'll be referring to them as the countries played. Havoc Jack commanded the Imperial Japanese forces, and in a stunning departure from normal roles, I was in charge of the American armed forces.

Having made that long prelude to the actual meat of this post, I find again that I should've taken notes if I wanted to do a proper blog about it, and probably have done it in two posts, if only to boost my count. At any rate, starting from the end, the Allies were victorious due to having mostly locked down Germany; the Japanese forces were nearly poised to backstab Russia however their forward bases (one of which was provided by me, necessarily or not) could not have produced enough to cause too much devastation before Germany went under.

Some other items of note from the game:

After Germany successfully invaded Egypt, the UK attempted to take it back, and failed miserably. This temporarily led to them losing both India and much of Africa, however they were able to offset it somewhat by taking Norway and by the US launching an early invasion of Africa.

Japan did well on its early assaults, however as tends to happen they lost most of their ground forces. Had they more land units to take and hold territory they may well have wreaked more havoc then what they did manage.

In a spectacular bout of bad rolling in one round, Germany, rolling for 10 tanks attacking at 3 or less, managed a single hit. While they did win the battle in the end, due to at best average defense from Russia, it's still worthy of a mention.

The US didn't get nearly as much action as they could have, I probably could have just gone straight for Europe and had better results, especially vis-a-vis Japan's poor showing in terms of infantry.

Germany did a fairly effective job of protecting its air force up until near the end, when it was found that owning Denmark does NOT protect the Baltic sea from being invaded. Which it shouldn't really, given that here Denmark is grouped into Western Europe. When this was discovered, the Allies could have gone for the quick victory and taken Germany, which at this point was covered by only a single fighter, however we allowed a redeployment. Instead an attack was launched at most of the German air force, which happened to be unprotected by infantry, and actually succeeded in taking the territory.

Anything else? Oh, right: I don't like playing as the U.S., especially in this version. They hardly ever get any of the epic die rolling you can expect from the Eastern Front.

Also, when in doubt, buy infantry. I saw two examples of what happens when you don't, an example of why you need to do so, and, full disclosure, one minor counter-example. (To be fair, I wasn't expecting Germany to launch a more or less all-out air assault on the Royal Navy, but that's because I wouldn't do it.) WARNING: That link is to TVTropes. Go through at your own risk.

Monday, January 9, 2012

Design blogging: The Zombie Game

All right! We're back in action in 2012! Okay, enough of that, tonight we're going to be live-blogging our design meeting on one of our games, currently titled "The Zombie Game". Whatever merits we may have as game designers, coming up with good titles is not one of them. The idea for this game came about after watching the movie "Zombieland", and a discussion about why military forces always seem to be unprepared for zombies.

The premise of the game is such: zombies have overrun China, and the other powers of the world are attempting to end the threat before it becomes uncontainable. Why China? Mainly the large population to be zombified and government censorship to prevent the news from getting out. The playable nations are the U.S., India, Russia, and the Arab League, a loose and probably unfeasible coalition of Muslim nations. We originally included the European Union but discarded it as they don't have much viable territory on our game map, plus their military response would be pretty anemic anyway. (Havoc Jack adds there's some doubt it will exist by the time the game is published.)

Gameplay is similar to the Axis and Allies model, with specialized rules for the expansion of zombies and event cards which do things like add random zombie outbreaks around the world.

With the basic explanations out of the way, let's talk about the changes that are being made after our few initial rounds of playtesting, with random excerpts whenever.

First things first: we got rid of the U.N., or at least the game version. As its purpose was more or less similar to the actual U.N. (i.e. condemn Israel and the U.S. and give diplomatic cover to random dictators) it was an unnecessary mechanic and the only reason we could find for keeping it in was to continue to make fun of them. Since we don't need the game to do that it went.

We also removed the oil purchase mechanic we borrowed from the game Powergrid, which mirrors a basic supply and demand function, raising the price as barrels are purchased from the market. While it is admittedly an awesome mechanic, it adds unnecessary complication to the game. With any luck we can get it back in the game later on.

...insert distraction by Youtube here.

Okay, back. Decided to test out various battle scenes. After about 50 test battles against five zombies, it was determined that three tanks are the minimum necessary to have a decent chance of winning a battle. Two infantry and two tanks both only managed to win one battle out of 10, three infantry managed two of 10, and the three tanks won nine of 10.

Last but not least we worked up some notes for national abilities, although these mostly haven't changed much. Still happy with the Arab League having martyrs, although it could be likely to get us in trouble with someone. Being able to take out zombies without fear of losing troops to make more zombies is quite useful, IMO.

Monday, May 16, 2011

Markov Chains

Today we're going to talk about gaming theory. What we're going to do is try to solve games, or small portions of them. Some games can be solved completely. This isn't necessarily true with other games; either because they're computationally too difficult to master, or because there are elements which can't easily be reduced to equations. By and large though, I'm not interested in completely solving games; when you have a computer that will play the game for you then necessarily you're not playing the game, which isn't an outcome I'd like to end with. So I'm only going to attempt to solve bits of games.

We start with RISK. If I take one soldier and attack one soldier, what are my odds of winning? Two dice are rolled, one attacking and one defending. this gives us 36 possible outcomes:

Every (vertical) pair of dice gives you one possible pair of rolls. Each of these pairs has the same chance of occurring, and each one defines a winner on that roll. As ties go to the defender, everything on that center line (and everything below it) constitutes a kill for the defender, and everything above it a kill for the attacker. So your gladiator has a 15/36 (about 42%) chance of winning, and a 21/36 (about 58%) chance of dieing gloriously and pointlessly.

So there you go; pure math has taught you the same thing that you knew instinctively about 30 seconds after playing your first game of RISK. And it only took several times as long. If you're so inclined, you can work out similar dice arrays for 2v1, 3v1, 2v2 and 3v2 battles. It'll take you a while though. But you'll still be left with problems; what happens if you have seven attacking five? It won't be over in just one round, so you'll be left with a new problem. And you can't exactly map out a dice array to number that. Well, you could, but it'd get incredibly large and complicated. So to do things properly, we'd have to resort to the math.

No no, come back! I promise I'll only describe the math! Please?

The solution is to use Markov chains. It's a way of diagramming out these sequences of probabilistic events. Here, let me show you one:

Russian Roulette; a classicer example there isn't. Every time you spin your chamber you've got a one in six chance of finding the bullet with your name on it. As long as you don't, you stay in the alive state, once you do, you transfer to the dead state. Once you're dead, you don't go back to the alive state. Unless you're Hindu. And right. But back on track here, you can set up a matrix with representations of your states and the probability of transfer from one to the next, and use that matrix to answer questions. Questions like "How long will I keep spinning this damn revolver before something interesting happens?" Or more germane to the blog, questions like "If I invade Siam, will I win the battle and how many guys will I have left over afterwards?" That's the sort of answer that can help you win games.

So get out your graphing calculators and-- Just kidding. I won't make you do any of the math. The short version is that the numbers work out the same for most values of attacking and defending; you're favored on the attack when you're rolling all three dice, and that you want to hit single unit defenders as often as possible. In general, you'll lose one unit for every defending unit you kill when they're rolling two dice. Oh, and bring as many armies in as you can manage so you don't get pushed below three dice.

Again, these aren't that useful of revelations. You probably figured most of them out on your own playing the game. I mean, attack when you are strong where he is weak? That's out of frikken Sun Tzu. The really useful one is the losing one for one bit. I mean, I get that impression playing the game, but I only trust my impressions so far. So having actual numbers helps me plan that sort of battle accordingly. But the theory ought to give more interesting results in a different context. Say, Axis and Allies.

Talking with Barbarossa we discussed two hypothetical battles tonight.

1) Russia uses it's transport to sneak attack Germany: Battleship bombard, infantry, tank and fighter against three tanks. Who wins? How many units die?
2) Germany attacks a British cruiser and battleship with two subs, a fighter and a tactical bomber. What are the odds that Germany gets out of it without losing any air units?

And on and on. The major conflict of the game is based on stretching your resources as far as they can go without bursting them. (Oh, and storywise a little altercation called the Second World War) So if you could make and solve a matrix for these battles you could figure out much more precisely your odds, and hopefully give yourself an edge in future games.

I say that generally, because so far my attempts at building an algorithm have come to naught; there are vastly more potential game states with a given number of Axis and Allies units than with the homogenous RISK units.

I'll let you know if I figure anything out.