Friday, January 11, 2019

Such a feast. Time to emigrate

Over my week at Farmageddon I played A Feast for Odin four times and really enjoyed it.  I like that it has a huge variety of ways to approach the game and that you mix and match your actions to take advantage of your situation.  The theme and style also blended seamlessly with the crunch, and I appreciate that.  I got last in my first game, and then got second three times, each time losing to a hardcore emigration strategy so I wanted to do a bit of writing about how that played out to see if emigration is as good as those results suggest.

This is the base board for AFFO:


On turn 1 you definitely want to find a 2x2 or bigger piece and cover up the 0 and 1 numbers to get your income to 2.  However, beyond that it gets murky.

In all of my games the winner beat me by not bothering to fill up the empty part of the board.  He never got any income increases and just sat at income 2, spending his time emigrating like crazy for tons of points.  It seemed powerful - is it?

Baseline - you need to gain 170 points during a 6 turn expert game to have a chance.  This gives you a final score near 85 since you start largely negative.  If you really want to win, get your final score closer to 115, which means you need to gain 200.  You have 57 actions.  This means that if you can score 3 points per actions you have a reasonable game, but if you can ratchet that up to 3.5 points per action you almost certainly win.

There are 49 spaces that don't have points on them required to get your income up to 6.  You want to cover 4 of them for sure to get income 2, so you have to cover 45 more to fill up the section.  Overall if you prioritize this you will probably get incomes of 2, 3, 4, 6, 9, 18.  This is a net increase of coins of 30 coins over the strategy of just getting 2 income and then doing other stuff.  (Both strategies eventually fill up the -1 sections, because that is strong at endgame.)  If we presume you are setting snares and upgrading the resulting 4x2 green tiles to fill this area up, it takes roughly 20 actions to manage this.  (2 per trap assuming a roll of 3, 1 per trap to get wood, 2 actions for 4 upgrades).  You get 4 more points because you only needed ~44 spaces and you got 48, so we effectively spent 20 actions to get 30 coins and 4 points.  That is *rubbish*.  Coins are better than points because you can spend them on stuff, but they aren't anywhere near enough better to make this a good plan.  At best you can count this strategy as getting you 2 points per action, which is a good way to lose the game.

We can get a better conversion rate if we are getting stuff more efficiently, but you can't get all that efficient.  Whaling, presuming 3 actions to whale, 1.5 actions to get wood to get the whale, rolling a 4, and then 2.5 upgrades per success, is about 7 actions for 15 spaces worth of stuff.  That still costs us 21 actions to fill those same 45 spaces.  You can improve that a bit by devoting some ore and extra whaling boats... but it still isn't pushing it much past 2 points per action, and getting that setup costs something.

(Edit:  This estimation is off.  I should actually estimate 1 action to get the wood for whaling, assuming 1 ore on a boat, and then 1.25 actions to upgrade, not 2.5.  This makes whaling considerably better, but still worse than emigration.  The conclusion remains similar, though things are closer.)

I am ignoring some stuff in this analysis, but I don't think the stuff I am ignoring changes the results much.  You can get stone / wood / mead / rune / ore income by surrounding stuff in your starting 49 spaces, which reduces the amount of coverage you need and also gets you income.  However, doing this is finicky, which reduces the efficiency of your covering.  Even if you just get the rune and ore for free when you get the 49 covered you still only get another 6 points out of them, and that isn't enough to make this feel good.

Okay, so how good is emigrating in early turns in comparison, if we are looking for ways to spend our time?  Emigrating a trading boat on turn 2 costs you 2 wood (1 action), 2 actions to make the boat, 2 actions to send it away, and 2 coins.  You get 18 points from this, so you are spending 5 actions and 2 coins to get 18 points, so lets call that about 16 points for 5 actions.  More than 3 points per action, which is superb, and we also get to feed ourselves much more easily.  That extra feeding is key because it will save us actions in the future, which we can spend to get more coins and emigrate more!

However, there is a catch.  Emigrating gets much worse every turn.  By turn 6 emigration is only 12 points for 5 actions, which is a lot worse, and the food benefit is also reduced.  Still, 12 points for 5 actions is better than the ratio we get filling up the non point section of the main board!  More importantly though, you don't actually have to emigrate at the end if you don't want to.  Just use your final turn to fill up all those -1s on the main board, as you can easily get 2.5 points / action doing that, and often a lot better.  Not filling up the middle of the board actually helps a ton with this, because you can slam green tiles all along the borders of the -1s and nothing in the middle will interfere.

So it looks to me like filling up the middle of the main board is a sucker's game.  It sure looks like the obvious thing to do, but it is bad at generating points and simply not efficient enough at generating income.  In order to keep pumping emigrations you will definitely need to get your income up though, as 2 won't cut it.  Emigrating on turn 1 is ... tricky, and mostly not worth it even if you can do it, I think.  Maybe professions can change that math, but it looks to me like you desperately want to get a boat, get another island, get 2 income from your main island, and get more income from your second island if at all possible.  Then focus on spending all of your coins on emigrating and filling up the income track on the second island.  On the last 2 turns you fill up the -1s on the main island and call it a day, ideally with an emigration on turns 2, 3, 4, 5.

The problem with this strategy is it requires you to have a really narrow focus.  You need to emigrate constantly, which requires other people to not take the emigration spaces.  However, you do have some flexibility here because the 3 and 4 action emigration spaces are actually completely reasonable.  Using the 3 and then the 4 costs you 3 more actions than using the 2 twice, but it saves you an action on boat building and then another half action in wood costs, and gets you 3 points from a profession.  Not so bad.  Constantly building trading and warring boats and emigrating them on the 2 action space is the ideal but you can absolutely get away with doing other combinations.

No matter how I look at it emigrating early and constantly seems so much stronger than anything else I could be doing.  I am nowhere near good enough to be certain of this, but in all the games I played the early emigration strategy crushed all other strategies and my napkin math here certainly supports that theory.

If anyone has other information or theories about this, please speak up.  I like AFFO but if it actually does come down to this one strategy being totally dominant my enthusiasm for it will wane somewhat - it doesn't feel great for a game with 60 actions to only have 20 of them that end up mattering much.

Tuesday, January 8, 2019

Red card on the play

After weeks of holiday celebrations and Farmageddon I am finally back to working on Civ 6.  My latest project is figuring out how to make Military policy cards less of a disaster for the AI.  Military cards by and large have the issue that they are appropriately powerful for a player but woefully underpowered for an AI.  For example, many of them provide a 50% production increase towards a specific kind of unit, like cavalry.  When a player researches Knights they will quite sensibly put that card into play for 10 turns, have a bunch of their cities produce Knights during that 10 turns, and then swap the card out again, probably forever.  The card was good at what it did, but that goodness required the player to build around it.

The AI, unfortunately, will put that card on and get barely anything out of it.  It will have that card on and not be building much in the way of military units, or just building the wrong kinds so the card does nothing.  It definitely never capitalizes by swapping its whole empire around to use the card most effectively.  The average case for the cavalry boosting card is pathetic when it is used randomly.

This isn't true for all the cards.  Many economic cards do things like boosting the science output of all science buildings, and you can put that on pretty much any time you like and it will be useful.  You may still want to optimize it of course, but the AI can't go too wrong with that type of bonus.  Military cards are a particular problem because they fall into one of two categories - either they are only useful when you are actively fighting, or they are niche bonuses to certain types of production.  Neither of those are universally applicable so they end up being wasted.

My first thought on this was to change the nature of the Military cards.  Instead of '+50% to cavalry production' I could make it '+25% to cavalry production and +1 production on stables.'  It is still a fine card for a player to use, and at least the AI will get something out of it if it gets equipped randomly.  I need to be careful of what exactly I attach those bonuses to though, because the AI builds districts and buildings kind of randomly.

The other problem with attaching generic bonuses to cards like this is that there are a lot of these cards and it would feel kind of odd to have all of them get flat bonuses.  I do like the idea of cards having really different feels to them, but this runs up against the problem that the AI has no idea how to use wildly varying card bonuses so things have to be generically useful if we want the AI to present a challenge.  It might be balanced to have all the Military cards have weak unique bonuses and all say '+1 production in all cities' but it doesn't *feel* great, and that matters too.

I think I need to do some research on what sorts of things the AI builds so I can get a grasp on just how big the bonuses would need to be on specific buildings to help the AI out.  I don't want to make Military cards all overpowered for the player so it is a tricky line to walk.  With some time spent examining AI empires at various stages of the game though I can build some basic estimates for what they have available and try to hack something together.