Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase weight reducer of "previous_trials" logic for random attacks #61

Merged

Conversation

TheAfroOfDoom
Copy link
Owner

Summary

Currently, we reduced the weight of the previously-ran attack through the random attack from 2 -> 1.

#29 has more details, but as an example:

before

if the base weights for attacks were:

attack x-bullets-lower x-bullets-upper finger-guns
base weight 2 2 2
probability of being chosen 33% 33% 33%

and we run the random attack -> it runs finger-guns, the weights/probabilities become:

attack x-bullets-lower x-bullets-upper finger-guns
weight 2 2 1
probability of being chosen 40% 40% 20%

after

in this PR, we increase the base weights from 2 -> 3 and increase the weight reducer from 1 -> 2. this changes the previously-ran attack table to:

attack x-bullets-lower x-bullets-upper finger-guns
weight 3 3 1
probability of being chosen 43% 43% 14%

TL;DR

we are making it so if an attack runs from the randomizer, we have an even smaller chance of running it again compared to previously


Test plan

tested in-game with the same test strategies found in #29

Reproducing in-game

from #29

This specifically is intended to make the attacks ran by the boss fight not repeat back-to-back as often. So run the boss fight with the following commands to see how it feels:

function _:reset
function _:boss_fight

Preview

N/A

its just adjusting random weights


Supplemental changes

N/A

- compensate base weights by adding 1
- i.e. base weight: 2 -> 3, reducer: 1 -> 2
- see #29 for math details
@TheAfroOfDoom TheAfroOfDoom merged commit 377434d into main Jan 8, 2024
@TheAfroOfDoom TheAfroOfDoom deleted the increase-impact-of-previous-attack-weight-decreaser branch January 8, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant