Then why have an a-historical mode then? If the AI will never pick unlikely options because they are weighted so low?
Because other trees are scripted better.
Then why have an a-historical mode then? If the AI will never pick unlikely options because they are weighted so low?
That's not true, I saw army innovations being picked once (out of +200 attempts), and that one has a weight of 1. So obviously they get picked but in a different way as the actual data suggests.That is not how that system works. The focuses set to 1 are never chosen and the choice is between the 12 and the 10. We could fix this (and I have pushed for it before) but it shouldn't be as big of an issue come 1.6 anyway.
I hope they will allow use to lock out certain paths.In 1.6 they are adding game rules. Some of them allow you to force the AI to go down certain paths.
https://forum.paradoxplaza.com/forum/index.php?threads/hoi4-dev-diary-custom-gameplay-rules.1112994/
import random
successes = 0
for i in range(100000):
fourYearPlan = random.random()*10
airInno = random.random()*1
armyInno = random.random()*1
rheinland = random.random()*12
oppose = random.random()*1
naval = random.random()*1
successes += oppose > max(fourYearPlan,airInno,armyInno,rheinland,naval)
That is not how that system works. The focuses set to 1 are never chosen and the choice is between the 12 and the 10. We could fix this (and I have pushed for it before) but it shouldn't be as big of an issue come 1.6 anyway.
Then why have an a-historical mode then? If the AI will never pick unlikely options because they are weighted so low?
I checked the code and I see nothing that prevents picking focuses with weight 1. The weighting is skewed however and does not work like in other places that use weights like this. Each focus rolls a die from 0 up to its ai_will_do value and the largest value wins. For example if one focus with ai_will_do 2 is available and another with ai_will_do 4 the pick ratio the latter wins in 50% of the cases where it rolls above 1 and half of the remaining cases where both roll between 0 and 1. So the pick rate is not 33% vs 66% but actually 25% vs 75%. Simulating this method with all the German starting focus weights 100000 times I get ~136 times Oppose Hitler, i.e. it takes on average 735 games to get this start.
Code:import random successes = 0 for i in range(100000): fourYearPlan = random.random()*10 airInno = random.random()*1 armyInno = random.random()*1 rheinland = random.random()*12 oppose = random.random()*1 naval = random.random()*1 successes += oppose > max(fourYearPlan,airInno,armyInno,rheinland,naval)
Edit: also the dice roll is not done for ai_will_do's below 1; this means 0.999 is twice as likely to be picked as 1.0
Then why have an a-historical mode then? If the AI will never pick unlikely options because they are weighted so low?
Well, the most obvious example is when you're doing an Austria-Hungary run, the last thing you want is Germany demanding the sudetenlandI'm not trying to be snarky, but why would you want Germany to go ahistorical in HOI?
Genuinely curious.
This goes for OP too, I guess.
When i was playing WoW a few years ago i read the one of the changes made to the RNG was the "bad luck" system, basically, since there are millions of players the worst possible odds will happen to thousands of them, and so they implemented this system to prevent horrible luck from happening, i don't know the formula they used but it prevents players from having a string of bad luck specially when looting items required for quests.
I would like there to be a similar system for HoI where the AI knows it hasn't picked a certain focus path for a long time and so this next game it will fudge the numbers to pick it. I'd like to experience every possible combination of focus paths every country has available, at least at the beggining, France going fasicst never happens for example, or the Soviet Union losing the civil war, it never happens either...
I'm not trying to be snarky, but why would you want Germany to go ahistorical in HOI?
Genuinely curious.
This goes for OP too, I guess.
Simulating this method with all the German starting focus weights 100000 times I get ~136 times Oppose Hitler, i.e. it takes on average 735 games to get this start.
Edit: also the dice roll is not done for ai_will_do's below 1; this means 0.999 is twice as likely to be picked as 1.0
But as far as i understood, 1.6 game rules are not achievement-friendly. So it will be the same issue stillAs stated, with 1.6 it won't be an issue anymore, since if you want Oppose Hitler to get picked you can set the AI to do so.
For anyone playing on linux that knows a bit of gdb here are steps to verify my claim:We were specifically told by the person who made the system that this is not how it works. There is no dice roll on the base value, it just takes the ai_weight of all the available focuses, adds a random value of up to 50% to it, and then picks the focus with the highest value. That means if a focus is not within 50% of the base value of the highest available focus, it will never be picked.
I'm not trying to be snarky, but why would you want Germany to go ahistorical in HOI?
Genuinely curious.
This goes for OP too, I guess.