Single Player bugs and crashes v36 plus (SVN) - After the 24th of October 2015

Status
Not open for further replies.
my complain was, that this is althought the game setting is mountains are not useable, and when I later noticed suddenly, that my (dog) workers don't cross the mountains, I did not remember that difference between workers but saw that related the general prohibition to do any with mountains.

In vikipedia there is no word to that speciallity.

The english being a second language is hurting this conversation here. Are you trying to say that the Useable Mountains Option is off entirely and for that reason, NO unit should be able to enter peaks at all? If that's the case then yes, it's a bug that even the Llama or Mule workers are entering peak plots.

However, that said, Koshling used some interestingly difficult to follow programming for that stuff. I might be able to find something wrong but I don't currently understand his method very well. Also too, I'm strongly of the opinion now that we should just not allow Useable Mountains to be off at all in C2C as it messes with the intended benefits of too many early units, Llama and Mule units in particular. What are they for if not for being able to traverse peaks early? Especially the combat ones - just weaker versions of other mounted units if you take that away.

BTW, @anyone who cares... possibly DH: The Peruvian worker... shouldn't that special unit be able to enter peaks as well as be able to build the geoglyphs?
 
BTW, @anyone who cares... possibly DH: The Peruvian worker... shouldn't that special unit be able to enter peaks as well as be able to build the geoglyphs?

That suggests that you have not played for awhile, there should be no Peruvian worker anymore as I have changed them, there were two, to be a promotion on all workers instead. I felt that the benefit and ability to build the specific improvements "geoglyphs" for one and "Mountain Village" (formally Machu Picchu) should be available to all your workers if you build the specific wonder.

The mountain stuff may still be around as we need to discuss a bit on what we want from improvements in the mountains. In which case that worker does not need to have a special ability to enter mountains because you need Mountaineering to get it anyway which means all units can enter mountains.
 
In my current game something has gone very wrong, almost all my city guard units seem to have infinite exp. Every time I upgrade them I can add the newest crime fighting or investigation promotion to the unit. Many of them are saying I have used 16 of the 5 exp. I'll see if I can post a screen shot and save when I get back later.
 
Originally Posted by strategyonly View Post
Something is kind of fishy here, i have all these units on AUTO-KILL, and they are just staying around MY territory??
This came up on the 'list' but I'm putting it at the end of the queue because it really is quite low on the priority level compared to other issues needing to be addressed.
Again bumping to the back of the list due to low priority in relationship to crashes and the restructuring of the AI split. This can be addressed later as I review some AI issues on hunters, which does need to happen soon I know.

The fact that I've reached where I started bumping some issues to the end of the debug queue means I've caught up to almost all issues except a few isolated crashes since then and the big AI split restructure so that important save breaker is coming up very soon now.

I've also figured out how I'm going to address the graphic crashes. Hopefully. It'll take a long time to sort out but I think I can do it.
 
That suggests that you have not played for awhile, there should be no Peruvian worker anymore as I have changed them, there were two, to be a promotion on all workers instead. I felt that the benefit and ability to build the specific improvements "geoglyphs" for one and "Mountain Village" (formally Machu Picchu) should be available to all your workers if you build the specific wonder.

The mountain stuff may still be around as we need to discuss a bit on what we want from improvements in the mountains. In which case that worker does not need to have a special ability to enter mountains because you need Mountaineering to get it anyway which means all units can enter mountains.
I have them in the MP game but I haven't played a single player game far enough to get them in a while. So you made some changes there. Cool.

If you have some adjustments you'd like to make with the mountain stuff let me know.

In my current game something has gone very wrong, almost all my city guard units seem to have infinite exp. Every time I upgrade them I can add the newest crime fighting or investigation promotion to the unit. Many of them are saying I have used 16 of the 5 exp. I'll see if I can post a screen shot and save when I get back later.

Interesting. I made some changes in canKeepPromotion but not much elsewhere. A save would be helpfull. Now... consider that when you can upgrade a Law Enforcement unit is usually also when those promotions have become available via tech. So that part sounds normal. What doesn't sound normal is that they can upgrade after promotion - unless they are losing something they shouldn't be and getting a retrain out of the deal when they upgrade - and that might be the issue somehow. From the wording on your report, it doesn't sound like we're just talking about LE units gaining EXP for their investigation efforts that is building up enough to take another level... sounds much more systematic and based on the upgrade itself.

I'll have to check if a modification here has gone onto the SVN yet or not that MIGHT relate to that issue.
 
Has anybody had problems using Shift-mouse click on Ctrl-mouse click while putting together a production queue for units or buildings. Had it start with the past two SVN's. Even went out and bought a new keyboard and mouse but no change.
 
2) I am not sure that the city governor AI and non-player AI have been made aware of the extra effects that have been added to the city specialists (both population ones and settled ones). We have added

happiness and health tags (from another mod)
property conditions


Eg the AI seems to use the slave specialists even though it will cause huge unhappiness in the city.
@DH: Looking at the code, these tags ARE coded for consideration by the AI. So what must be 'off' is how heavily they weigh into the consideration. There could also be a bug or two in those codes. When I was working extensively on property matters, I found a few of the functions that were supposed to return a value weren't returning that value correctly so it's possible that may be happening here as well. I'll have to look deeper into this with a controlled example case. The happiness and health tags are coded as % tags and I'm not sure exactly how they are supposed to work so I'll need to dig further there.
I still want to look into this function to see if I can get it more accurate, sped up some, and a few more goals. Moving to the end of the debug queue still as it isn't something I want to do before breaking saves.
 
If this one is not the 14 min EoT, then the next turn is. Just click Red button.

EDIT: 2885 is a 20+ min Eot that I killed by having to Hard restart my computer. The game will Not let you End task in Task manager as the game still controls the Mouse functions. You get the running man cursor but can not do anything with it.

EDIT2: ANewDawn log file added

JosEPh

I ran the second save here and it reveals that there is a nation with over 2400 city attack AI going after a city. That's... a lot. And it makes the evaluation to attack a tremendously huge affair.

If I recall correctly, this game had started with a stack limit in play and then you removed it according to advice later. So what happens to get this many attackers is that the AI believes it can and needs to build a bigger stack of doom for attack than it actually can. So it builds and builds more and more units to flesh out the attack stack. But since those units can't join the stack, they end up trying to now start another attack stack in the plot they end up shunted off to. Now the AI is trying to build a sizeable enough attack stack in two (or more) plots and some may be able to be fulfilled but most don't and the issue keeps proliferating, the AI getting thousands of units but never feeling like it has enough because not one of those stacks states readiness. Then some get hedged in when they try to move because they are surrounded by huge stacks and that creates lag problems too.

So you remove the stack limit and they eventually hit their goals but by then... they are literally godzilla sized in the stacks they have. And when they go to actually do something, they take FOREVER to process!

I went through the whole turn without finding a real infinite loop but one stack took a few hours on the debugger just to evaluate one attack against a city target.

I have some AI restructuring planned for next version that should help with some of these issues even on more basic level and perhaps I can enable the system to work better with some reasonable stack limits. That part I'm not sure will ever be right but I can at least take it into consideration during redesign.
 
I have just finished updating all the units but if you look in Thebes you will see a number of guard units that have used 16 or more of the 5 exp they have. With the latest upgrade of unit they did not even increase the 16 it just stayed the same and allowed me to give the new promotion. I think you can give one of the investigators 4 crime fighting promotions right now to see what is going on. It should not be able to get any more but it is still glowing blue. It may be the crime fighter can get investigation promo.
 

Attachments

That issue with quality promos doing nothing still stands. Could it have anything to do with strength promos being removed with a quality promo, so you are essentially in retraining mode?
 
I ran the second save here and it reveals that there is a nation with over 2400 city attack AI going after a city. That's... a lot. And it makes the evaluation to attack a tremendously huge affair.

If I recall correctly, this game had started with a stack limit in play and then you removed it according to advice later. So what happens to get this many attackers is that the AI believes it can and needs to build a bigger stack of doom for attack than it actually can. So it builds and builds more and more units to flesh out the attack stack. But since those units can't join the stack, they end up trying to now start another attack stack in the plot they end up shunted off to. Now the AI is trying to build a sizeable enough attack stack in two (or more) plots and some may be able to be fulfilled but most don't and the issue keeps proliferating, the AI getting thousands of units but never feeling like it has enough because not one of those stacks states readiness. Then some get hedged in when they try to move because they are surrounded by huge stacks and that creates lag problems too.

So you remove the stack limit and they eventually hit their goals but by then... they are literally godzilla sized in the stacks they have. And when they go to actually do something, they take FOREVER to process!

I went through the whole turn without finding a real infinite loop but one stack took a few hours on the debugger just to evaluate one attack against a city target.

I have some AI restructuring planned for next version that should help with some of these issues even on more basic level and perhaps I can enable the system to work better with some reasonable stack limits. That part I'm not sure will ever be right but I can at least take it into consideration during redesign.

What needs work to resolve this are all the buildings, wonders and other things which increase production or military unit production. The AI builds all those buildings and there are even slowdowns then AI players build lots of units in the same turn.
 
Several of your BEST defenders with equivalent bonuses to the ones lost in those scenarios? Or are the ones that were lost in tests 2 and 3 particularly suited towards facing the units coming at them on the terrain they were on? My point is that either tests 2 and 3 had a battle which had a crazy amount of luck for the attacker or yes, the stack as a whole was beginning to weaken to the point that battles could begin being won if the quality of the attackers continued being available.

Which is kinda to say not much really except that given 2 out of three the defender suffers a loss means that the AI wasn't THAT far off the presumption that they COULD have won overall with better luck. It's admitted that they need to overpower even stronger if they are going to win. The concept of overwhelming numbers is about 20% as valid as it was in vanilla and the programming to evaluate the strength of 'overwhelming' unit numbers is not that far off from what it originally was. So in the case of the AI evaluating large stacks against other stacks, it's about 80% off in its assessment of capability to rely on assumed damage being delivered during a given attack.

Please stop pretending that the outcome of a large stack vs a large stack battle depends on good luck or bad luck. According to the law of large numbers, the bigger the stacks involved, the closer the result will be to the average. i.e. the influence of luck becomes smaller and smaller as a relevant factor, until you can completely ignore it. I repeated the attack in the save that I posted two times more (with new random seed on reload of course) and the result was the same: AI lost 145+ units and I lost 1 unit. I'm confident that repeating the battle several more times will not alter its outcome in any significant way.

And if you think that an attack that sacrifices 145+ units to kill one (average) unit of mine is in any way or situation a good decision, then I think you are violating common sense.

However you are right that smarter AI requires more calculations which leads potentially to larger turn times. But I think that using smarter maths could improve this greatly. I might have an idea....
 
Personally, I don't want to have to face, or worse manage, multi thousands of units. Not to mention what it does to processing. I would like to see/suggest some limiting factors, preferably gold (which you can still get to +3,000/turn running at 0% tax in mid medieval
 
Hmm... More like:
1) Higher chance to score a hit and less chance to receive a hit
2) WILL do more damage on a successful hit and take less damage when hit. (though some modifiers can adjust this final amount.)
3) The weaker unit will LIKELY lose hp faster and everything else you mentioned there will continue as you stated.

Not much difference to what you said. Just clarifying if there's still a little misunderstanding on those minor differences.


And processing. Yes.

If you look at a similar battle in vanilla, you'll see that it's almost impossible for a 3 str unit to go to battle with a str 20 unit and not do a little damage to the str 20 unit. Conversely, in C2C, its more realistic. It's almost impossible for the str 3 unit to ever injure a str 20 unit to any amount. Thus, we've gone from 'it's almost impossible for an attack by overwhelming amounts of units to fail as long as the unit count is at a particular ratio to the enemy's unit count' to 'it's almost impossible for underwhelming units to even make a dent in the enemy's defenses when the enemy units are far stronger than yours regardless of how many more units you have'. But the programming to assess those large scale chances haven't changed.

Hmm if you say that the minimum damage is gone, then that opens up mathematical possibilities to speed up combat calculations.

I never looked at the code, so I have no idea how combat is calculated exactly other than your remarks above. Let me speculate wildly on how it is done and how it could be improved.

Suppose the following statements are true:

1) assuming equal hitpoints, the outcome of the battle depends solely on the ratio of strenghts. In other words: a strength 4 unit fighting a strength 2 unit (ratio 2:1) would have the same average outcome as a strength 6 unit fighting a strength 3 unit (also ratio 2:1).

2) assuming the same ratio in strength, the battle depends solely on the ratio of hitpoints. In other words: a 100 hp unit attacking a 50 hp unit has the same AVERAGE chance of winning as a 50 hp unit attacking a 25 hp unit. N.B. smaller amounts of hitpoints would cause a higher average "overkill" (damage wasted because the target unit is already dead) but let's neglect that.

3) the AVERAGE outcome is one of these: a) defender dies, attacker gets x amount of damage. b) attacker dies, defender gets x amount of damage, or c) both die. If you depict (a) as a positive number (i.e. +x) and (b) as a negative number (i.e. -x) and zero if both die, then the average outcome can be rendered in a single number (which can be either positive or negative).

..then the outcome of all battles can be plotted in the following formula:

Average combat outcome = function of (input ratio of strengths; input ratio of hitpoints)

This is a 3 dimensional plot: on the X axis you plot the ratio of strengths, on the Y axis you plot the ratio of hitpoints, and on the Z axis you plot the average battle outcome.

The result will be a curved 2 dimensional plane in this 3 dimensional plot.

Now you can run a lot of simulated battles to construct this 2 dimensional plane. Make sure that you space out the possibilities: 1-100 hitpoints vs 1-100 hitpoints gives 10,000 possibilities, but if you go in increments of 5 hitpoints, then it is only 20x20 = 400 possibilities, less if you remove duplicates, like 100 hp vs 50 hp is the same as 50 hp vs 25 hp. Size Matters increases the range of hitpoints, and if I remember correctly, every level of the unit gives another 1 hp, but the principle is the same.

Since you only have to construct this plot once, calculation time is less critical (just let it run overnight) so you can e.g. take into account that the weaker unit drops strength faster than the stronger unit so the stronger unit has an extra advantage.

Once you have this 2 dimensional plane sufficiently mapped out (in the form of many, many calculated values in a table: input x, input y, and calculated result z) then you enter this table into a statistics program, and let it calculate a formula that is "best fit" in the form

Average combat outcome (z axis) = formula (input x axis which is ratio of strengths; input y axis which is ratio of hitpoints)

It is a lot of work and computer calculation time, but once it is done, calculating average battle odds would be much faster for the AI; it only has to put ratio of strengths and ratio of hitpoints into a single formula and out rolls the average combat outcome.

Three things complicate this: 1) ranged attacks 2) first strikes 3) withdrawal chance.
The first two are straight damage dealers that can be calculated before calculating the ratio of hitpoints. The third one, withdrawal, happens not that often and if it happens, it happens when most of the battle is already done. So for stack vs stack attack, it won't be much difference if you leave out withdrawal chance.
 
Personally, I don't want to have to face, or worse manage, multi thousands of units. Not to mention what it does to processing. I would like to see/suggest some limiting factors, preferably gold (which you can still get to +3,000/turn running at 0% tax in mid medieval

Also true but why make it possible to build more then 10 units per city every turn in the first place. That is possible at some stages during the game because of all those +% production and military unit production modifiers.

That issue comes from the batch adding of buildings and other stuff in the past. If you read the old threads there was almost no planning of what all those buildings do to the overall balance by the building makers.
 
Also true but why make it possible to build more then 10 units per city every turn in the first place. That is possible at some stages during the game because of all those +% production and military unit production modifiers.

That issue comes from the batch adding of buildings and other stuff in the past. If you read the old threads there was almost no planning of what all those buildings do to the overall balance by the building makers.

This is so very true!

@Taxman, et al,
I have been holding off on adjusting the amount of Gold/turn from Game Speeds used. I needed more info. My own testing shows that there is still too much on the Marathon and Snail speeds. I'm not sure on Eon and Eternity because it takes so long to play thru to Med Era. But taxman setting your research to 0% should allow you to generate a fair amnt of Gold/turn by Med Era. Now if you set it at 70% and are still making thousands of :gold:/ turn then there is need of adjustment. But "what" do you need to adjust? What is the real root of the perceived problem, or is it actually only perception from a playstyle? All this needs to be factored in.

I also have been holding off on adjusting the build time for units and buildings. These are also represented in the GSInfos xml.

I will soon be adding a Tech cost increase per Era to aid in keeping research from escalating as badly as it does now. The initial cost and iResearch rate for the 1st era imho is pretty good...But as you advance in Eras the amount of WWs, NWs, buildings etc accelerate the number of :science: points and skews the whole progression. Tech Diffusion being On (box unchecked) this is another accelarant to the problem. Another problem is the use of % :science: on buildings instead of the much more reasonable +/- :science: that was used long ago. And there are research modifiers that use % Everywhere in the xml files. Too many imhpo for the mods balance.

So I will soon be making massive adjustments to the GS and other xml related files over these areas to slow down these mentioned areas of concern. It all does Not need to be done by coding and the .dll.

EDIT: @ Taxman,
If you think your Gold/turn is too high try using the Upscaled Cost Option. If it suits your play better then let me know. Will provide more input. And as always when you post about these observation add what GS you are using as well as Diff level, please. :)

JosEPh
 
I'm on turn 1028/4940 (Snail I believe) on Immortal difficulty. I'm in early Ren (8 Ren techs), but haven't picked up Chivalry or Tournaments because I'm still back logged on trying to get out culture units. I generally only build the ones that provide free promos as they get to keep them when they upgrade (So, frex, I skip the Welsh archers; and the Spartans and Legionaries are among my favorites). My Capital and prime land unit builder pumps out 2 land units every 3 turns (give or take, more with less expensive units, less with the more expensive ones). The Capital is also way behind on many useful buildings including beaker buildings. I'm making about 3,450gp/turn with 30 cities running 80% Science (16,300 beakers), 10% culture and 10% Spy.

My nearest competitor has a bit more than half my victory points isn't drastically far behind me in military tech and has 22 cities (along with one other nation). I've probably effectively won, but it would be a giant hassle to wipe everyone out (would need to build unending numbers of siege and it would just take forever to do).
 
I have an SVN commit just about ready to slow down research, unit, and building build times some more.

At 1028 turns on Snail you should hopefully still be in Late Class to early Med, not Early Ren. These new rate changes should slow you down and put you close to that "date" range.

I am also increasing the Deity level malus for the player.

You don't use the SVN? If not then I'll need to use the Patch thread so you can get these updated files or a new Full SVN Patch. Let me know what you need.

JosEPh
 
Nope I don't use the SVN.
Not too worried about the research time (I so rarely make it beyond the tech level I'm at), and there is often a loooooong dead time between filling the continent out (sans waring with neighbors) and when you can go off and look for other lands to colonize.

Mostly I just don't ever want to face or manage thousands of units and would like to see some reason beyond early stages of the game where you can or need to tax for gold. In the early game there is some gold pressure, but by somewhere in Classic there is very little pressure and the pace of acquiring more gold outgrows your expenses.
 
Status
Not open for further replies.
Back
Top Bottom