Etterna 0.74.4
|
Main driver class for the difficulty calculator as a whole. More...
#include <MinaCalc.h>
Public Member Functions | |
auto | CalcMain (const std::vector< NoteInfo > &NoteInfo, float music_rate, float score_goal) -> std::vector< float > |
Calc () | |
void | resize_interval_dependent_vectors (size_t amt) |
Public Attributes | |
bool | debugmode = false |
For debug output. Should only ever be true at music select. | |
bool | ssr = true |
Set true for score related output, and false for MSD caching. | |
bool | loadparams = false |
Set true to force calc params to load outside debug mode. | |
unsigned | keycount = 4 |
Assigns the keymode specific logic. | |
std::array< unsigned, num_hands > | hand_col_masks = { 0U, 0U } |
std::vector< unsigned > | col_masks {} |
std::shared_ptr< Bazoinkazoink > | ulbu_in_charge |
std::vector< std::array< RowInfo, max_rows_for_single_interval > > | adj_ni |
std::vector< int > | itv_size {} |
Number of rows in each interval. | |
std::array< std::vector< int >, num_hands > | itv_points {} |
std::array< std::array< std::vector< float >, NUM_CalcPatternMod >, num_hands > | pmod_vals {} |
std::array< std::array< std::vector< float >, NUM_CalcDiffValue >, num_hands > | init_base_diff_vals {} |
std::array< std::array< std::vector< float >, NUM_Skillset >, num_hands > | base_adj_diff {} |
std::array< std::array< std::vector< float >, NUM_Skillset >, num_hands > | base_diff_for_stam_mod {} |
std::vector< float > | stam_adj_diff {} |
std::array< std::vector< std::pair< float, float > >, num_hands > | jack_diff {} |
std::array< std::vector< float >, num_hands > | jack_loss {} |
unused - formerly populated by jack related point loss values | |
std::array< std::vector< float >, num_hands > | jack_stam_stuff {} |
Only used for debugging jack stamina related adjustments to jack_diff. | |
std::array< float, max_rows_for_single_interval > | tc_static {} |
std::array< float, max_rows_for_single_interval > | cj_static {} |
int | numitv = 0 |
Total number of intervals for the current file/rate (one per half second) | |
float | MaxPoints = 0 |
Total points achievable in the current file (two per note) | |
float | grindscaler = 1.F |
std::array< std::vector< std::vector< std::vector< float > > >, num_hands > | debugValues {} |
std::array< std::array< std::vector< float >, NUM_Skillset >, num_hands > | debugMSD {} |
std::array< std::array< std::vector< float >, NUM_Skillset >, num_hands > | debugPtLoss {} |
std::array< std::array< std::vector< float >, NUM_Skillset >, num_hands > | debugTotalPatternMod {} |
std::array< std::array< std::vector< std::pair< float, float > >, 2 >, num_hands > | debugMovingWindowCV {} |
std::array< std::vector< std::array< float, 4 > >, num_hands > | debugTechVals {} |
per hand vector of arrays: techyo chaos values of [row_time, pewp, obliosis, c] | |
Main driver class for the difficulty calculator as a whole.
|
inline |
Each Calc instance created sets up the interval related vectors. Their default size is default_interval_count.
auto Calc::CalcMain | ( | const std::vector< NoteInfo > & | NoteInfo, |
float | music_rate, | ||
float | score_goal | ||
) | -> std::vector<float> |
Primary calculator function that wraps everything else. Runs notedata through ulbu which builds the base diff values and then runs the chisel function over the produced diff vectors for each skillset. The main drawback of this approach is files with multiple skillsets tend to get significantly underrated
|
inline |
Grow every interval-dependent vector we use. The size could be reduced but there isn't a big need for it. This does nothing if amt < the size of the vectors.
std::vector<std::array<RowInfo, max_rows_for_single_interval> > Calc::adj_ni |
std::array<std::array<std::vector<float>, NUM_Skillset>, num_hands> Calc::base_adj_diff {} |
Holds base difficulties adjusted by patternmods. It begins at NPSBase. One float per interval per skillset per hand. Apply stam model to these (but output is sent to stam_adj_diff, not modified here). There are at least two valid reasons to use different base values used for stam, the first being because something that alternates frequently between js and hs (du und ich), and has low detection in each skillset section for the other, will have large stam breaks in both the js and the hs pass, even if it's roughly equivalently stamina draining. This produces a drastically reduced stamina effect for a file that should arguably have a higher stamina tax, due to constant pattern type swapping. This is adjusted for in js/hs. The second is that pattern mods that push down to extreme degrees stuff, like jumptrills or roll walls, will also implicitly push down their effect on stam to to the point where it may be considered a "break", even though it's really not. At best it's a very different kind of stamina drain (trill vs anchor). This is not accounted for in any way, and no estimation is made on how much this actually messes with stuff (could be minor, could be major, could be minor for most files and major for a select few)
std::array<std::array<std::vector<float>, NUM_Skillset>, num_hands> Calc::base_diff_for_stam_mod {} |
Holds base stamina difficulty values for use in the stamina model. Beginning at NPSBase, these are adjusted slightly by JS and HS related diff adjustments in Calc::InitAdjDiff (the max between adjusted diff and the NPSBase for the skillset) One float per interval per skillset per hand.
std::array<float, max_rows_for_single_interval> Calc::cj_static {} |
Base Chordjack difficulty per row of current interval being scanned. See struct ceejay for the intense details ...
std::array<std::array<std::vector<std::pair<float, float> >, 2>, num_hands> Calc::debugMovingWindowCV {} |
per hand, per column, vector of pairs of coeff.variance with timestamps the CVs are based on a moving window
std::array<std::vector<std::vector<std::vector<float> > >, num_hands> Calc::debugValues {} |
Debug values - mostly patternmod values per interval per hand. These are unnecessary now that the active session calc is a persistent songman singleton, and could/should be removed and the debug values pulled straight from the calc
float Calc::grindscaler = 1.F |
multiplier to resultant roughly determined by a combination of nps and file length
std::array<std::array<std::vector<float>, NUM_CalcDiffValue>, num_hands> Calc::init_base_diff_vals {} |
Holds base calculated difficulties, one float per interval per type per hand. Contains NPS, MSD, Runningman, and Tech related values. Mostly used for its NPSBase values.
std::array<std::vector<int>, num_hands> Calc::itv_points {} |
Number of points per interval per hand. This is equivalent to the number of notes * 2. Set up by nps::actual_cancer
std::array<std::vector<std::pair<float, float> >, num_hands> Calc::jack_diff {} |
Jack difficulty, one pair per interval per hand. The pair is for debug purposes (temporarily). The reason for this is that jack_diff is composed of only specific jack difficulty entries that do not correspond to any time. The pair provides timestamps of each difficulty value for debug graphing. The difficulty values in this come from the hardest anchor for the hand.
std::array<std::array<std::vector<float>, NUM_CalcPatternMod>, num_hands> Calc::pmod_vals {} |
Holds pattern mod information, one float per interval per mod per hand. In most cases, these are multiplying values, so neutral is 1. For agnostic pattern mods, the values will be the same across hands.
std::vector<float> Calc::stam_adj_diff {} |
Pattern adjusted difficulty. Allocate only once - stam needs to be based on the above, and it needs to be recalculated every time the player_skill value changes, again based on the above. Technically we could use the skill_stamina element of the arrays to store this and save an allocation but that might just be too confusing idk. One float per interval.
std::array<float, max_rows_for_single_interval> Calc::tc_static {} |
Base tech difficulty per row of current interval being scanned. Composed of the mean of a small moving window of previous tech values. See techyo::advance_base for the intense details ...