Reverse changes of bad idea :)

This commit is contained in:
spinerak
2024-06-14 01:29:54 +02:00
parent cd6886062c
commit e11aba1cfc
3 changed files with 2 additions and 8002 deletions

View File

@@ -159,7 +159,6 @@ def dice_simulation_strings(categories, num_dice, num_rolls, fixed_mult, step_mu
for val1, prob1 in c.items():
for val2, prob2 in dist1.items():
new_val = int(max(val1, val2 * mult))
new_val = new_val - new_val % 2
new_prob = prob1 * prob2
# Update the probability for the new value
@@ -212,6 +211,7 @@ def dice_simulation_strings(categories, num_dice, num_rolls, fixed_mult, step_mu
# save result into the cache, then return it
outcome = sum([percentile_distribution(total_dist, perc) for perc in perc_return]) / len(perc_return)
yachtdice_cache[tup] = max(5, math.floor(outcome)) # at least 5.
return yachtdice_cache[tup]
@@ -262,3 +262,4 @@ def set_yacht_completion_rules(world: MultiWorld, player: int):
Sets rules on completion condition
"""
world.completion_condition[player] = lambda state: state.has("Victory", player)

View File

@@ -7905,27 +7905,4 @@ yacht_weights = {
("FourAndFiveFullHouse", 8, 8): {50: 98916, 0: 1084},
}
def round_down_to_nearest(n, k):
return n - (n % k)
def combine_rounded_keys(yacht_weights, change_category):
new_yacht_weights = {}
for main_key, sub_dict in yacht_weights.items():
if main_key[0] in change_category:
new_sub_dict = {}
for key, value in sub_dict.items():
rounded_key = round_down_to_nearest(key, 2)
if rounded_key in new_sub_dict:
new_sub_dict[rounded_key] += value
else:
new_sub_dict[rounded_key] = value
new_yacht_weights[main_key] = new_sub_dict
else:
new_yacht_weights[main_key] = sub_dict
return new_yacht_weights
change_category = ['SumOfEvens', 'DoubleThreesAndFours', 'TinyStraight', 'MicroStraight', 'TwosAndThrees', 'TwoOneTwoConsecutive', 'TwoPair', 'FiveDistinctDice', 'Threes', 'ThreeOdds', 'Ones', 'FourAndFiveFullHouse', 'Pair', 'OneTwoOneConsecutive', 'Distincts', 'SmallStraight', 'Yacht', 'QuadrupleOnesAndTwos', 'Fours', 'LargeStraight', 'Fives', 'FullHouse', 'SumOfOdds', 'Sixes', 'ThreeOfAKind', 'Twos', 'FourOfAKind', 'Choice', 'ThreeDistinctDice']
yacht_weights = combine_rounded_keys(yacht_weights, change_category)

File diff suppressed because it is too large Load Diff