Posts: 10,492
Threads: 395
Joined: Aug 2015
Quote:For one thing, it leaves out the fact that gold is flexible hammers whereas "fixed" hammers can only be used in the same city.
As this is a mechanism to balance the early game, it's a safe assumption that the player can only spend their gold in the capital. Outposts won't be ready to spend your gold early enough, leaving only neutrals, but those break early balance on an entirely different level - the early neutral city, if you get one, will contribute so many hammers that the entire start location balancing becomes meaningless. (I rather have an absolutely horrible starting location next to a size 6 neutral city I can take out on turn 10 using 2 war bears, than an amazing pop 25 spot on my capital. It's that much better.)
That said the numbers are indeed crude estimations.
Quote: I also think you should assume 16 base hammers for an early city, 10 is way too low to use as a baseline.
It's an average. It includes those dozen turns while you are building a sawmill and only have 3 (4?) hammers, as well as the turns after where you indeed have closer to 16 after the Sawmill was built.
Quote:I once said I think an average city should have 14-17 population, and mid-high range ore.
Most Fair and below maps aren't this good. We still need numbers that do not crash the map generator.
...and then there is Small and Tiny and Poor and Dry and...yeah, this part won't be easy to figure out.
Quote:That 500 production is WITHOUT any of the bonuses you've listed on this page.
Good catch. I'd say it's like, 50% more then. Maybe even double, not sure.
March 9th, 2017, 17:08
(This post was last modified: March 9th, 2017, 17:22 by Seravy.)
Posts: 10,492
Threads: 395
Joined: Aug 2015
Bad news.
Started implementing this and ran into problems.
The code pretty much looks like this
call generatelandwater
call generatebasicterrain
call generatecapitals
call generateneutrals
call generateores
call ...
call generaterivers
call smoothterrainedges
call replaceinvalidterrainconfigurations
call ...
What does this mean? At the very least rivers and ORES are not on the map when the capitals are placed, and possibly other changes can happen to it afterwards as well.
Implications :
1. When the current game checks for maxpop, it uses terrain data that is still subject for change, so it's inaccurate. Might as well say this is a bug but fortunately, these inaccuracies can only improve terrain not make it worse. (tiles that need to be replaced for being part of an invalid configuration turn into grasslands, and rivers are better than any other terrain type - you can get 10-12 pop better cities than expected, but not worse.) This also explains why having a larger minimal "max pop" required fails so much on small and even normal land - without rivers and half the grasslands, good places are a rarity.
2. Without massive rearranging of the entire main procedure, which is unlikely to even work as most of these steps rely on being executed in specific order, this inaccuracy has to stay - rivers and replaced tiles must be ignored. I don't want to even try this, the chance of success is that low compared to the work it means - there are probably about a dozen calls where it's marked "..." or more.
3. Ore data is also ungenerated, making our entire plan pointless. Swapping ore and town generation is not too hard because they are next to each other. However, it won't work if swapped. Ores rely on knowing city data - they cannot be placed on the tile already occupied by a city. While ores have to be placed after cities, we cannot place cities after ores.
But there are more bad news. I certianly said we have "isForest" etc procedures to convert terrain code into actual terrain. I wasn't completely right. We have many of them. But some are missing. We don't have one for Shore, Ocean, River and Tundra - all the terrain ores cannot be put on, as those are what used these procedures.
I have to conclude that my initial premonition was right, and this can of worms should have been left unopened.
This still leaves Catwalk's idea to make up for poor terrain by placing extra ores afterward partially possible, but I'm skeptical. If we put the bar high enough to make sure we never end up with a random location better than it, then we'll be looking at every starting city having 3-6 ores around it to close the gap between pop 8 desert spots and pop 25 river-grasslands with two gold and adamant which is outstanding but reasonably possible at random.
If the bar is low, it doesn't do all that much more than the "at least 8 pop" current limit - the random 8 pop spot improved by 1 gold will still be massively worse than the aforementioned 25 pop 3 good ores location. And we have no procedure to detect Tundra, Shore, Ocean and River.
On the bright side, if this cannot be done that means I can release the retort updates right now, as they are done.
March 9th, 2017, 18:49
(This post was last modified: March 9th, 2017, 18:57 by Nelphine.)
Posts: 5,010
Threads: 17
Joined: Aug 2016
Why?? Strange decision by the original makers, but then, the fact that it works as well as it does is amazing, so, I won't worry too much... But OK, not totally doable. Um. About the only thing remaining, is if its too low you could add ore, and if its too high, you could remove ore, as the very last step? You might even be able to change terrain around the capital at the very end? (But not shores, tundra, ocean, or river). Which would limit how much we could do since that's 4 of the most extreme terrain, and when you have some you usually have plenty, making it hard to balance; if it wasn't for rivers being indistinguishable from the bad ones, we'd be OK...
Can we reasonably guess how many river squares, and use that as a basis point to modify the rest of the terrain and ore?
Edit: wait you mean you can't do more terrain changes after all the functions you've already listed don't you. If we want to do terrain at all it HAS to be before ores and rivers, which makes it impossible.
Similarly ores before rivers, and rivers will be extremely messy so not something to mess with even if it comes last.
Posts: 10,492
Threads: 395
Joined: Aug 2015
Quote: is if its too low you could add ore, and if its too high, you could remove ore, as the very last step?
In theory yes.
Problems :
-we have no call to check for tundra and river, two tiles that contribute the most towards bad or good terrain, among others.
-adding a new random ore is not trivial. Ores are restricted by terrain type, plane, mineral settings, etc. This is way too complex to add it all to the system and I rather not have starting ores that break normal game rules.
-removing ores is trivial but what if the spot is too good but has no ores to remove? With enough river tiles you can get even max pop 32+ locations and the excess does count into growth rates.
Quote:You might even be able to change terrain around the capital at the very end?
This isn't possible. Terrain has joining configurations, if you add a new mountain for example it has to be connected with all adjacent other mountain tiles. And some of these configurations are invalid - there is no graphics for some of the more unusual ways these can connect in which case the tile has to be replaced. The procedures that handle these are huge and there are many - replicating the functionality is impossible. You can spot the work of these procedures on the map by generating many maps and looking for ores on grasslands - that's impossible, but if the mountain tile was converted due to an invalid configuration and keeps the ore, it happens anyway.
There are a few special cases of terrain types that don't join - grasslands, swamps and forests, but that's about it - these can be converted to each other but there is zero guarantee the city has any of them. Mountains, Hills, Tundra, Rivers, even Deserts connect to each other and of course shore and ocean are very far out of reach due to continent IDs and sizes. And by out I mean you can't change from, or into either. So the most frequent scenario, too much water resulting in low pop, is unfixable by this method, as is hills, mountains, tundras, deserts and rivers.
Quote:Edit: wait you mean you can't do more terrain changes after all the functions you've already listed don't you. If we want to do terrain at all it HAS to be before ores and rivers, which makes it impossible.
Yes, pretty much, as it breaks the terrain connections, see above.
Posts: 6,457
Threads: 134
Joined: Aug 2004
That is indeed bad news, but I think a function can still be used to set a minimum standard. I'm less concerned about overpowered starting capitals than underpowered ones. Can the current minimum pop be set to 10 instead and tiles on starting continent be used as a factor? Or is it impossible to use tile count as a factor?
Posts: 10,492
Threads: 395
Joined: Aug 2015
(March 10th, 2017, 11:46)Catwalk Wrote: That is indeed bad news, but I think a function can still be used to set a minimum standard. I'm less concerned about overpowered starting capitals than underpowered ones. Can the current minimum pop be set to 10 instead and tiles on starting continent be used as a factor? Or is it impossible to use tile count as a factor?
Minimum pop : Probably not. Originally it was 12 and it crashed over half the time so i reduced it. Now that we know all rivers and some of the grasslands don't even exist at that point, it's easy to understand why 12 was far too high to find 4 such spots on Arcanus - those tiles are the highest contributors to max pop, without them 12 is not trivial to reach. 10 might work but I don't feel like running "new game" 250 times to see if it is safe or not.
If you have time, replace $36FDB to $36FE3 and $36FE7-8 with 90h, and $36FE45 (06) with the max pop you want, then start new games and see if there is a crash. If there isn't any for, let's say, 100 tries, then I accept that as a safe minimal value. We can even do this for each different land size setting and make it depend on that - Tiny/Small crashed way more than Fair and Large was usually working with 12.
Overpowered starts : I'm way more concerned with these than weak ones. The difference between a pop 6 and a pop 10 spot is marginal (it's bad either way), but the difference between pop 12 without and pop 25 with two gems is massive. The latter is as much advantage as putting heroism on a hero with a good resource producing ability. Or getting two-three free nodes at normal power from sprites. Or two noble heroes.
Tile count : While not readily available, I can count the number of tiles in a continent fairly easily. But I'm yet to hear an argument that convinces me that continent size is directly and significantly related to a good or bad start. If anything, the distance of the next nearest continent matters more than the size of the first, if you started on a small one. On the other end, bigger might be worse, not better, as it raises the chance of other players landing troops and settlers on the continent massively. So we are back to the "this is too subjective to agree on anything" problem.
Posts: 6,457
Threads: 134
Joined: Aug 2004
While a good start for the human player is a big advantage, a bad start for the AI often makes him a sitting duck. Also, people think it's fun to get a great start once in a while. Conversely, it's always boring when the AI sits alone on a small island waiting to be killed. That's really what I want to fix, more than the starting condition of the human player. I can always reroll if I'm unhappy.
Most of the time when I see an AI fall behind it's directly related to lack of early expansion prospects. It's really that simple.
As I said before, I don't want you to pour a ton of time into this. But it seems like it would be trivial (correct me if I'm wrong) to add continent size to the evaluation of the capital quality. It's a big and relevant factor, if it can easily be taken into account it most certainly should. Bigger is definitely better, only on a rare occasion is it worse.
March 10th, 2017, 14:08
(This post was last modified: March 10th, 2017, 14:14 by Seravy.)
Posts: 10,492
Threads: 395
Joined: Aug 2015
Quote:Also, people think it's fun to get a great start once in a while.
Agreed. One of the reasons why I didn't want to start messing with starting locations at first.
Quote:, a bad start for the AI often makes him a sitting duck.
I can't agree to this one, though. For the first ~30 turns, the AI will summon creatures (mana is independent of the starting location afterall), produce settlers, and build a fighter's guild. None of these really care about having a max pop 6 or 18 spot - at best there is an extra unit of population for 2 more hammers from growth, which is insignificant compared to the 12+ the city has by default. The AI also has a massively higher chance for mercenaries and heroes, so even a Life wizard with no summons won't be left without enough units to matter. After this time period, the outposts grow into cities, and the production capacity of the capital starts to get more and more marginal.
Unless by bad start you mean "don't have gold, iron and mithril" but I don't think you do, there is no such thing as a "bad" start for the AI, at least not from terrain.
...but you seem to specifically mean islands, not terrain quality, so let's focus on that.
Quote:But it seems like it would be trivial (correct me if I'm wrong) to add continent size to the evaluation of the capital quality.
Not trivial, but, let's say, 1 hour of work? Maybe 2? Nothing too bad.
All right, so we seem to at least agree this is not an important factor for the human player.
So let's talk about the AI then. I believe the recent AI upgrades should have been enough to make sure the AI won't get stuck on an island.
-The AI is now able to put Wrath Form on their Settlers the same way as Water Walking. Both of these spells are early picks as well as Floating Island - Any wizard with at least 3 Nature, or 3 Sorcery or 3 Death books will be able to leave their continent using spells alone.This leaves only pure Life, Pure Chaos, and Chaos+Life, 3 out of 15 wizard templates without a spell to leave the continent. So 20% of the AI wizards - less higher difficulty as the extra picks might add one of those realms with 3 books.
-Myrran wizards are forced to build an early Ship Wright's Guild. They are unable to get stuck unless they literally have no access to sea. Arcanus wizards aren't, but one Arcanus wizard performing worse only allows more territory for the others. It doesn't have a large influence on overall difficulty.
-Likewise, on smaller landmass, the AI has much higher priority for ship buildings and will produce them early. This only leaves Arcanus AI with Life or Chaos on large landmass sizes vulnerable to island starts, which is rare - larger continents have higher chance to get picked, as they have more tiles to randomly select from, and this only affects 3 out of the 15 possible AI realm templates.
-I believe the main reason for an AI to perform poorly is having another AI (or human) neighbor or more, who claim most of the nearby land with settlers, leaving nothing for the AI itself. Ironically, better terrain raises the chance of this happening, as it's more desired by other wizards. So while I agree it's about the expansion possibilities, I don't think that's related to continent sizes.
If anything, I think the number of land tiles in a radius of, say, 7 tiles, is more relevant than the number of tiles belonging to the continent itself. An island surrounded by 3 larger continents is a great spot. The tip of a long, snakey continent with many tiles is horrible, especially if another wizard is on the same continent, close to the AI.
There is a special case though, if the capital has no sea access, but no room on the island for another city, that's bad. However that's a really specific situation which is very hard to detect - I can't fix that in a reasonable amount of time. For this, we can only hope the AI will pick one of those 12 realm sets that have sea access in their spells. This should be an ultra rare scenario - probably less than 0.1% of a map's tiles have no possibility of sea access on average.
PS : If you still believe this happens too often to the AI, providing a set of save files with AI wizards that underperform could help us figure out the reasons behind it - if we see any common factor, we can use a solution that targets that factor (as I don't think islands are to blame here).
..oh, btw, I think there is one really large contributing factor for an AI's bad performance. If their closest neighbor attacks them too early, and plays an early race/realm.
Posts: 6,457
Threads: 134
Joined: Aug 2004
Even if they don't get stuck on an island (those upgrades are good), they're still at a significant disadvantage. Their expansions take longer to get going and they're harder to defend. I don't have rock solid evidence (and don't want to spend the time to obtain it), but I have consistently seen AIs underperform when they start on a small island. If you still disagree on this point, then I don't care enough about this particular topic to continue the discussion. There are more important matters. Namely overpowered Sprites
Posts: 5,010
Threads: 17
Joined: Aug 2016
I have to agree with seravy - except for 'no sea access/life/chaos' wizards (which I've actually had happen to me too twice, as well as AI twice in serious games) I rarely see small island AI having big problems. Its usually something else, often that I attack them because its easier to isolate their cities. Basically small islands are more likely to be left alone by a third AI so I won't get in a multifront war.
|