• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Showing developer posts only. Show all posts in this thread.
Time for some actual math. There are 6 focus that are available at the begining of the game with weights of : 12, 1,1,10,1,1. So Rhineland has a probability of 10/26, and Oppose Hitler at 1/26. Meaning almost a 4% chance at the game start.

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?

Another reason is that there was incredible backlash at the bare notion of it even being conceivable of AI Germany ever going ahistorical, so when it was discovered that there is an issue in the weightings (AFAIK any focuses with less than 1/3rd of the chance of other foci never get picked) I didn't increase the value for Oppose Hitler. As 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.
 
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

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.
 
That seems like a very tough balance to get right, and we do want the achievements to be somewhat comparable between players - otherwise you end up in a situation where people restart endlessly to get an easier achievement run.
 
The random rule uses a different system but I will add this to my growing list of "lostech is a real concept in the real world and HoI 4 is a good example of lostech in action"
 
Assuming there will be a "random" setting which will let all countries chose their focuses at random, will it actually allow for true randomness? Right now there are paths that countries will not take in their tree even with historical focuses turned off. Many of the communist paths are an example of this. In 1.6 if I select for focuses to be random, will there be a chance of perhaps a communist Hungary or a fascist Czechoslovakia or will the current weighting system be maintained even on random?

On random, the AI will chose a random strategy plan, which usually include a communist plan.