Monday, June 11, 2012

Gridiron Solitaire #9: Difficulty

I made some adjustments to game length about six weeks ago because I wanted a single game to last no more than 15 minutes. And it worked, but there was collateral damage in that the game became easier.

I want Gridiron Solitaire to be challenging. Sure, I will add at least one "newbie" difficulty level at some point, but I'm developing a challenge. I don't want people going 15-0 and sailing through the playoffs every season. That would be gratifying, at first, but then it would get boring quickly. Instead, if you go 12-3 in the regular season, that's a hell of an achievement. And there will be seasons where you go 6-9, and you'll need to try and improve your team in the offseason mini-game.

In theory, that's what will keep people playing.

What had happened with the shorter game length, though, was that I was winning every game, some easily.


If you remember, Big Play presses are key to the game on defense. In most cases, it allows you to be dealt another card, and it's also an additional card slot. The number of BP presses you get, though, mean that they have to be rationed. You have to make tough decisions about when to use them.

In the shorter game, the CPU had 1-2 fewer drives a game. That meant that BP presses, relatively, were suddenly in abundance. That meant I was stopping drives much more easily, and suddenly dominating games.

Well, that had to be fixed.

At first, I thought it would be easy--just reduce the number of Big Play presses allotted to the Human player. Problem solved.

That created a new problem, though. The minimum number of BP presses allotted per half went all the way down to five (if you were on the road, playing a much stronger opponent). That number was so low that instead of forcing strategic decisions, it actually reduced them.

Bad design.

So instead of taking the simple way out (which really wasn't "out" at all, because it caused other problems), I needed to look at difficulty as a whole.

Here are the inputs that affect game difficulty, both offense and defense:
1. clock runoff per card match
2. yards gained per card match
3. chances of triggering a text-based event
4. number of cards needed to stop a CPU drive
5. allotted Big Play presses
6. CPU playcalling A.I.

In isolation, each one of these factors is very manageable (at least, it is now). In combination, though, it can get pretty nasty.

The overriding factor to remember is that game length at 15 minutes must be preserved. This is an easy problem to fix if I could just make the game length 20-25 minutes, but I don't want the games dragging. It seems pointless to put several years into making this game just to bore you (yes, I know--I've been doing that in writing for almost a decade now--rim shot).

So what I needed to do, basically, was get the CPU more drives per half (and make it harder to stop those drives) without making the game itself take more time to play. That meant I could only make very minor adjustments to #1 (clock runoff). That also meant #2 (yards gained per card match) was basically out as well--if I gave fewer yards per match on offense, then I would need to take less time off the clock (unless I wanted games to be 14-10, and I don't).

#3 (chances of triggering a text-based event) could be tweaked at will, but I like the balance that part of the game has right now.

#4 (number of cards needed to stop a CPU drive) is certainly a way to make the CPU more powerful on offense. Moving that upwards also meant I could correspondingly increase the base number of BP presses (#5), which gives the player more options when deciding how to use them. That's good.

Even after those adjustments, though, the game didn't quite feel right. I was just too dominant on offense. Which brings us to #6 (CPU playcalling A.I.).

Yeah, I know. Playcalling A.I. in a card game?

Yes, actually, and it's very important. If you call a running play in the CPU chooses to defend the run, you lose a card slot. That's a big deal, because you have one fewer card slot to make matches with.

I thought the playcalling A.I. was decent, but to make offense for the human player more difficult, it needed to be better. Actually, I originally thought it was decent, but had become less satisfied as time went by.

There's a balance at work when it comes to the CPU A.I. it would be fairly simple to just track the last X playcalls made by the human player, and adjust the CPU playcalls accordingly.

The problem with that, though, is that if somebody wants to run the ball on every down, I want them to be able to do that and at least have some chance to win. Maybe not a good chance, but a chance. So instead of tracking the human play calls, I wanted to create an A.I. that would intelligently factor in game score, time, and field position, and make playcalls accordingly.

Nasty without knowing you personally, in other words.

The first pass, like I said, seemed decent, but this morning I decided to take a look and see if I could make it a little saltier. And I did, because I found a few places where the logic was easy to improve. Reducing your chances of having that extra card slot by even 15% can tip a game toward the CPU, and take you out of your comfort zone.

I played again after testing each of these changes in isolation, and instead of trouncing the CPU, I won a tense game 24-21--at home, against an opponent that was roughly my strength.

That's what I want.

Site Meter