Thursday, May 23, 2019

Just end it

I have played Terraforming Mars a bunch of times over the past few weeks and I keep running into a consistent theme:  When the games ends on turn 8, I win, and when it ends on turn 12, I lose.  I think I was inadvertently taught that you have to plan on 8 turn games when I first started playing TM and that lesson has stuck with me too well.  No matter how often my games go long I continually find myself calculating the returns on infrastructure investments as if the game will end on turn 8 and I stop taking income cards on about turn 4.

My last game was an excellent example of this.  Amazon was playing as Tharsis and she had a ton of cities in play.  Her obvious game plan was to build up a ton of plant production and build high value greeneries adjacent to multiple cities.  She bought the Award for highest number of Greeneries, which seemed kind of crazy because she had no Greeneries at the time, but in retrospect makes sense.  If she managed to get the Greenery engine to work, she would win, and if it failed, she was dead in the water anyway.  Unfortunately for her plan the game ended on turn 8 so she had a giant pile of cities and only 2 Greeneries.  I had 5 Greeneries so I cashed in on the award and won the game handily.

Amazon consistently builds really powerful engines that peak on turn 12.  In our previous two games she built said engine, the game went to turn 12, and she won.  In both those games I built engines that sputtered out around turn 7 and I couldn't end the game in time so I lost.

I think that it the real skill in the game, the most critical thing for a high level player to develop, is a sense of how fast the game will end.  Figuring out which cards give the highest return on investment isn't complicated, but it does have one key variable you must supply - how many turns are left in the game?  If you stop buying income cards too early you won't have enough stuff on the final turn, and if you buy them too late you end up with no points when the game terminates.

Naked Man runs a game similar to Amazon's in that it peaks late, but he does it differently.  He buys huge numbers of cards early trying to save them up to snag Awards out from under people.  In a game that goes long he has lots of options for spending late game money and that pays off, but if the game ends early like this last one did he winds up with a bunch of potentially powerful but ultimately useless cards in his hand.  Keeping situational cards is great if they grab you 5 points from an Award, but having 12 bucks from your first two turns be wasted is a disaster.

You can only go so far though in planning.  The decision to keep late game cards and situational cards in your hand on turn 1 has to be made before you know anything about what your opponents are doing.  You can't guess how long the game will be at that point, and the choices you make are critical.  You can know the metagame of your group and how long they tend to play for, but you can't ever be entirely sure.  Some games the cards come up so one player plays Soletta, another plays Aquifer Pumping, and a third plays Steelworks, and that game is going to end on turn 8 no matter what you decide.  Other games have two people fighting over Jovian cards and another earning points directly with Physics Complex, and that game will take absolutely forever to finish up.

I find though that I continually plan on an 8 turn game without really looking at it properly.  I think this is currently the greatest weakness with my game - I need to get better at reading that, and be willing to shift my strategy if it looks like a particular end condition is going to take a long time to reach.  There is randomness, and I can't control a lot of that, but I am sure I can be better than I have been so I don't rely quite so much on luck of endgame timing to get me my victories.

Wednesday, May 22, 2019

Coal is bad

One of the things that irks me about Civ 6 lategame is that the modern buildings are really bad.  You can build a University for 250 production and it gives you ~6 stuff per turn.  Then you build a Research Lab for 580 production, and it gives you 2.5 stuff per turn, or 7.5 stuff per turn if you power it.  The problem is that even if you assume that powering it is free, 7.5 stuff per turn for 580 is a miserable rate... and powering it is NOT free.

To power it first you need an Industrial Zone nearby, and that IZ has to have all buildings built.  Then you have to get coal, and you have to feed in 1 coal / turn just to power the Research Lab.  The coal itself could be sold to the AI for minimum 10 gold, and burning the coal gives you a -.33 penalty to your Diplomatic Favour because you are creating carbon emissions and people hate that.  That Diplomatic Favour could be sold for 15g / favour, so each coal you feed into power costs you roughly 15 gold.

All this means that even once you build a power plant and a Research Lab you still end up paying 15 gold to get that extra 5 science.  That isn't good!  When you arrange for power and build the Lab and do all that setup you should get paid off, and instead you just end up with a trash building and the option to trade gold for science inefficiently.  Yuck.  If you value gold at the standard rate of 2 gold = 1 science, a fully powered Research Lab actually produces a net value of ZERO.  It costs a ton of production to make, and is no net benefit at all to your civilization once it appears. 

You can power buildings somewhat more cheaply by using oil or uranium instead of coal, but because oil and uranium are critical for military uses, cost more, and come much later this isn't much of a solution.

Now, you might decide that the only thing you care about is science, and so you will throw any amount of gold at it to make more science, but if this is your plan you should be buying settlers and slamming libraries and universities down, not building stupid Research Labs.  This definitely holds true for Stock Exchanges, which produce so little gold that you lose money by building them if you have them powered, and if you don't power them they are technically doing something, but it is so little that they should never be built.  Broadcast Centers actually have a use because you need somewhere to store music, but they are otherwise just as miserable as the rest.

One thing the designers of Civ 6 really wanted was to make climate change a big deal.  They initially aimed to do this by making rising oceans a huge problem but this has a flaw that we see in the real world too - nations each recognize that everyone else is pumping emissions, so they see no point in stopping their own emissions.  Local benefits and global costs leads to a tragedy of the commons.  The new strategy of putting in diplomatic penalties for CO2 emissions is a solid one, because you can sell that Diplomatic Favour for a lot of money.  It imposes a local cost, and that is one people pay attention to.

The trouble is that they ended up making all those late game buildings worthless.  The cost and penalties of burning coal are so high, and the benefits are so small, that you should just never bother and you should just run projects to finish off the game, selling all your coal to fund buying new cities or units.  It also means that you should spam cities in every spot you can to build the early buildings because big cities with lots of production run out of reasonable things to do.

The modern buildings need huge buffs to be competitive.  Obviously you can win games while building them - you can win all kinds of ways.  What I am looking at though is optimal play, aiming for the fastest and most efficient wins.  I also like the idea that when you unlock a new thing it should be *good*.  You should be excited to build it!  When I unlock Stock Exchanges I giggle because it isn't even clear I should build them even if they were free... and they are decidedly not free!

I ended up more than doubling the effects of the late game buildings just to make them have a solid return on investment and also be worth powering.  The Research Lab, for instance, went from 3 science base, 8 when powered, to 11 science base, 19 when powered.  When you look at those numbers they are HUGE compared to the earlier buildings, which is appropriate since the cost is also huge in comparison. 

My current theory is that buildings that cost 15 gold to power and produce 8 stuff are okay - this means that powering your empire and burning coal like crazy is a reasonable option but not required.  Doing so means you lose Diplomatic Favour because people hate your emissions and you have to buy (or avoid selling) your resources, but you do get a reasonable amount of stuff in return.  If you refuse to power via coal though you can still run an empire with more money and Diplomatic Favour to compensate.

I like the idea of powering buildings, and setting up infrastructure to create an amazing late game civilization.  But in order for that to work the numbers have to support it, and right now in the base game they just don't.

Tuesday, May 21, 2019

You are a trout

A little while ago my DnD group went into an arena battle in front of many spectators.  The rules were that each group could bring up to five members, but we only have four party members so that is what we went with.  Had we been really trying, we would certainly have found a fifth person to fill out the group, but we are slacking.

Our opponents were slacking worse than us though - they only brought 2 people.  2 Dwarven barbarians, specifically, who are really strong and tough.  They hit people with swords!

It turns out that being outnumbered and having a battle plan of 'hit people with swords' is not a good idea.

On the first round our bard turned a pile of coins into a bunch of summoned creatures to attack a barbarian.  The barbarian dodged the animated coins and bashed the bard for a little bit of damage.  Then the other barbarian charged me and his attacks bounced off my magical defenses, me being a wizard and all.  So far, little was accomplished by either side.

Then our monk punched a barbarian in the head, stunning him for a round.  Then I turned the other barbarian into a trout with Polymorph.  We then spent the next two rounds beating on the stunned barbarian, who kept being restunned each turn until he died.

Our party sat there, staring at the trout that used to be an angry barbarian, laughing. 

Eventually the organizers called the match in our favour, without us having to go through the embarrassment of beating the last barbarian into a pulp.

This is the thing that a lot of DnD folks call 'action economy'.  Our group got more actions than the enemies, so we won.  I don't think that is a useful description of the real problem though - the real problem is the way parties get more and more ways to completely disable opponents as they level up.  Getting lots of actions isn't a huge problem as long as your actions don't instantly win the fight! 

As your damage goes up, so does enemy hit points.  As your attack bonuses go up, so does enemy armour class.  This works to increase challenge while keeping the system working the same.  Unfortunately the spells that permanently remove a combatant get more and more powerful without any counter.  We also get more spells and ability uses so we can just pour on low level disabling effects if we want to.

Of course stuns and Polymorphs aren't the only effects we can rely on.  Later on that same day the two dwarves decided to get their revenge and so they jumped us as we were sleeping and attempted to kill us.  Our bard cast Calm Emotions, which made both the barbarians stop wanting to fight, and our druid cast Suggestion, making them think that it was a great idea to go away and not fight us anymore.

So they did.

It is nice to be tough and strong and all, but when a single failed save removes you from the fight completely it just isn't enough.

In Heroes By Trade I removed all combat effects that did things like this.  Combat effects are temporary, and while they scale up to do some pretty cool things they never have 8 hour durations and force the opponent to leave the battlefield!  I think DnD does have some advantage in terms of flavour, of course - people like having all kinds of crazy spells that you can use on a moment's notice.  Unfortunately it causes problems like this - encounters that should be epic and memorable become a simple matter of a single spell and a single failed save.

Thursday, May 16, 2019

Building so many walls

Last week I talked about how city defensive scaling in Civ 6 is a problem.  Cities get stronger as units get stronger, which is fine scaling, but they also scale so many other ways that it is extremely difficult for the AI to ever take cities once walls go up everywhere.  One thing I missed is that each level of walls also adds +3 to the city strength, which makes the situation even worse.  Instead of needing 3-4 melee units, which is enough at the start of the game, the AI would need ~60 melee units to take a modern city with full walls built.  That is too much.

This is an issue of systems, not just individual numbers.  You can't give full scaling off of a single value and then add on tons of other scaling systems too - things get totally out of whack.  A system where cities were super vulnerable without infrastructure but scaled by building more and more walls could work.  A system where cities scale by matching unit strength also works.  A system where both happens is a disaster. 

The problem is that taking late game cities is a brutal slog for the player, with sieges taking forever even once you have destroyed all the enemy units.  For the AI, sieges are just impossible and they can't win.  (If you have played recently you may have seen the AI take cities in the mid or late game occasionally - this is almost certainly because of a bug that can reduce the strength of cities to as little as 10, even if they should have a floor of 70.  Without the bug, the AI is pretty much hopeless.)

So if I want to make the AI a military threat in the mid or late game, I have to get rid of some of this scaling.  The easiest way to do this, I think, is to simply remove the additional Walls types that are available.  Ancient Walls gives a huge boost, no doubt, but even if I only remove Medieval Walls and Renaissance Walls, cities will be much easier to take.  I can also drastically cut down on the health bonus from Urban Defenses too.

But there is something else I needed to do too, and when I tried it the game felt so much better.  I removed the 'cannot attack if it has moved this turn' penalty from siege units, and the change was great.  When catapults are the best unit the AI can build it will spam them, and this always made it a joke.  Every turn it would adjust the position of the catapults, be unable to fire, and end turn.  No matter how many it had I would just burn them down without losses while it moved them around in circles desperately trying to find the perfect configuration.  However, when they could move and fire suddenly they were dangerous!  My walls took plenty of damage, and in the field catapults weren't good, but at least they did *something*.  If the AI could handle planning around siege units being unable to move it would be fine, but it can't, so I need to change things so it doesn't have to.

In the base game the established wisdom is that siege units are bad - just build more melee units and Battering Rams to smash down walls.  With this change, I still don't think siege units are amazing, but I think it is extremely reasonable to build a few.  I also hope that the dramatic reduction in city toughness will allow the AI to fight more effectively - it won't affect human players that much, but it should make it possible for AIs to conquer territory and put up a better late game fight because they just have so much stuff.

Now to play through another game and see how it all shakes out when taken together.  You can only theorycraft these changes so far, that much is for sure.

Thursday, May 9, 2019

Building a wall

In Civ 6 the early game is full of aggression and taking territory from other players is straightforward.  The AI, while it isn't perfect, has early game war reasonably figured out.  It gathers together six or so units, moves them to a city it wants, declares war, and bashes the city into submission.  This is a functional plan, and it regularly works, even against good players, assuming you start on a high difficulty level to give it a lead.

But when the late game arrives the world becomes stagnant.  The AI becomes nearly incapable of taking a city and it flails around bleeding off units and then gives up.  I wanted to look at the reasons for this a bit to see if I could change things so that the AI would be capable of capturing cities as the game progresses.

City defenses are determined by four things.  The strength of the best unit you have made, the strength of the unit defending the city, the walls the city has, and the districts the city has.  The first two scale throughout the ages - if you have warriors of strength 20, you get a city strength of 20.  If you have infantry corps of strength 80, the city they occupy has strength 80.  As such, I am mostly going to ignore that portion of the calculation because it works pretty well.  District and wall scaling is the problem.

Consider an Ancient era siege.  Warriors bash on the city, dealing the standard 30 damage each, because the city and the warriors have the same strength.  The city has 200 health, so if you get 4 attacking warriors you can kill the city in 2 rounds, with a total of 7 attacks.  (There is some extra complication with the city healing and also the city losing strength because of damage, but those roughly cancel.)  Those 4 warriors will be badly hurt after the fight, but they win.

Now consider an attack in the modern era using infantry.  The city still has 200 health, but it also has 400 health worth of walls that have to be beaten down first.  The city also likely has +6 to its strength because of districts.  The walls cut the damage of infantry attacks by 85%.  So if we assume the same group of 4 infantry attacking the city, they deal about 4 damage per hit.  After 3 rounds of bashing, all of the attacking infantry are dead, and the city has sustained about 40 damage into its 400 wall health.

So to attack a normal ancient era city you need 4 warriors to successfully defeat it.  To attack a normal modern era city you need *40* infantry to defeat it.  Even if you win the battle that kind of investment is ludicrous, and you will lose the game anyway trying to take cities at that rate.  You can improve that by pillaging some of the districts, but it is still absurd.  The AI simply isn't good enough at figuring out how to besiege a city to ever attack successfully in the late game.  It will just throw 20 units at the city, watch them die, and then beg for peace because it is losing the war.

Of course players take cities from the AI in the late game.  The easiest way by far is to use bombers because they deliver outrageous damage from afar.  When I develop bombers with strength 110 an infantry corps will still only have the city strength up to 80 (86 with districts, say), so I will deal 80 damage per shot.  3 bombers will level a city in 2 turns, and then I can just walk a melee unit in to capture it, and the bombers won't even take damage doing so.  That is still 4 units for a 2 turn kill, just like the ancient era, but the bombers can move and attack so efficiently that for a human, the modern era is the fastest era for war and capture.

Comparing modern warfare to ancient warfare is an extreme example, but the slide from AI threat to total lack of threat starts early, right when walls go up.  As the eras go by city health rises and the percentage of it that is walls goes up, and eventually the AI is helpless to attack you.  That said, I have never to my recollection lost a city with walls built.  You could lose it, certainly, if you just sit on one city at the start of the game and go straight for walls.  Eventually you would get out produced and out teched and walls wouldn't be enough.  But if you get a few cities up, and get walls up in the vulnerable ones, you pretty much can't lose a city again.  That doesn't feel right.

The trouble here, I think, is that city siege is built from the perspective of the player, not the AI.  Players who try to bash through AI walls quickly realize they need either swarms of ranged units, battering rams, or catapults.  You can't just beat through walls without taking hideous losses.  The AI, however, simply doesn't figure this out properly.  It wanders units around, correctly calculating that attacking the city is fruitless, but not knowing what to do about it.  It simply doesn't know how to defeat a well defended city. 

This situation leads to stagnation amongst AIs too.  Early empires shift about, but eventually people get up walls in their cities and then they all just sit there staring at one another.  Attacks are pointless, simply resulting in huge losses of troops for no gain.

The solution isn't to teach the AI about how to use air power - right now planes are extremely overpowered and if the AI reached them first and knew how to use them it would steamroll players without effort.  That isn't ideal.  Also this does nothing for midgame stagnation when the AIs all have medieval walls up and they can't hurt each other nor can they successfully attack a human player.

Cities gaining bonuses from districts kind of feels right - it means that building up infrastructure in a city helps make it harder to take.  Unfortunately it outpaces the attacker's abilities, and that is a problem.  Walls adding on health to cities seems reasonable, and walls reducing the abilities of melee units to attack feels okay, but the the end result is stagnation.  There needs to be an arms race, increases in the abilities of offensive units to offset increases in defence.  It should be a continuous struggle between offensive and defensive capabilities with neither getting ahead, but instead we have defence racing ahead of offence and never looking back.

Adding in a broad offensive power increase to offset the walls progression doesn't feel right to me.  I don't even know what that would look like, to be honest.  To let the AI reasonably take cities that are walled up would require huge bonuses, and would be a major project.  Deflating the stacking defensive bonuses is much easier though.  I have to think on how I would do this - flat out removing Medieval and Renaissance Walls is possible, as is reducing the power of Urban Defenses.  I could also pare back the bonuses that basic walls give so units do more damage.

Any of these changes are based on the assumption that defensive superiority and stagnation is a bad thing.  I suspect lots of people like having a wild and scary early game and then settle in to build an empire with no worries about invasion.  I get that, for sure.  However, I think the amount that defence outstrips offence is too high, and for my money the game would be more fun if I stepped in and tinkered with the progression so that taking cities was more feasible as the game goes along.

Monday, May 6, 2019

No murder allowed

Wendy has been watching me play a lot of Civ 6 lately.  We have a new routine where I play the game and provide colour commentary while she alternately knits and watches the gameplay.  One thing she pointed out recently was that my games consistently play out the same way.  I expand as fast as possible, get in an early war, wipe out my opponent's army in my territory, then counterattack and take their entire empire.  Once they are dead I get in another war and repeat until I own half the world.

Sometimes I just keep on warring until I win a domination victory, but more often I stop conquering once I have half the world and just chill, building all the stuff on my way to a science or culture victory.  I like having huge, amazing cities so once I have so much territory that victory is assured I have fun messing around.

Wendy decided this was too predictable, so she told me that my new challenge was to win without any warring at all.  I was allowed to defend myself of course, but no conquering cities and I have to always be at peace whenever possible.  I started up a game, and America got all aggressive with me, forward settling multiple cities on top of me.  I settled around them as best I could, but finally Teddy got all angry and came at me.  As usual I fought a desperate war against a vastly more numerous army, wiped out everything he had, and then moved into his territory to pillage and plunder. 

At this point I would have normally just steamrolled across the rest of America, taken everything they had, and then prepared for the next war.  Wendy told me that since America had stolen my territory I could take just one of their cities, even though that wasn't in the original rules.  However, Teddy begged for peace, offering me a pittance, and by the original rules I was obliged to accept.

The combination of these things really turned me sour on the game.  I want to play as hard as possible, so having consistent rules is critical to me.  Having the 'no conquering' rule be changed midstream sucks, and having to accept a tiny amount of gold to make up for a terrible, crippling war is frustrating as anything because obviously he was just going to rebuild his troops and come at me again.

So we ditched that game and started again with new rules, consistent rules.  First off, no declaring wars on anybody, except to liberate city states that people attacked, and then only to take the city state.  Second, I don't have to accept peace offers unless I want to, but I can't ever capture a city, and I can only raze one city each time a civ declares war on me.

This seemed like a much more enjoyable challenge, and it has worked out well so far.  I decided to do a cultural victory leveraging America's late game unique building, the Film Studio.  This time it was Genghis Khan who attacked me, with his swarm of horsemen attacking Boston, the city in the mountain pass.  (If you don't remember the Mongols rampaging across Boston's highland vistas, take it up with your history teacher.  It happened, I saw it.)  Boston fell, but after a few centuries I recaptured it for America, and got Genghis to pay me to stop the endless slaughter of horses and their riders.  The war was extremely costly, but at the end of it I had secured my borders and space for 8 reasonable cities.

I am still going to win, despite the fact that I can't leverage my expertise at war to grab half the world.  The AIs have big bonuses, but they are terribly inefficient, building enormous numbers of troops to no purpose, planting districts in foolish places, and pouring resources into religious wars that accomplish nothing for them.  I won't win like I usually do though, building all the wonders, and setting up to win every victory condition.  Instead I will win by pushing hard for a cultural victory and focusing all my resources on that.

One thing for sure:  Being peaceful makes the game so fast!  Not having to micro manage troops and having only 8 cities to control cuts game time by 75% at least.  Even if my win rate is much lower than games where I conquer everything, the wins/hour rate is enormously higher.