optimization

package
v1.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrintStatsCounts

func PrettyPrintStatsCounts(statsCounts []int) string

Helper function to pretty print substat counts. Stolen from similar function that takes in the float array

func RunSubstatOptim

func RunSubstatOptim(simopt simulator.Options, verbose bool, additionalOptions string)

Additional runtime option to optimize substats according to KQM standards

Types

type Slice

type Slice struct {
	// contains filtered or unexported fields
}

Thin wrapper around sort Slice to retrieve the sorted indices as well

func (Slice) Len

func (s Slice) Len() int

func (Slice) Less

func (s Slice) Less(i, j int) bool

func (Slice) Swap

func (s Slice) Swap(i, j int)

type SubstatOptimizer

type SubstatOptimizer struct {
	// contains filtered or unexported fields
}

func NewSubstatOptimizer

func NewSubstatOptimizer(optionsMap map[string]float64, sugarLog *zap.SugaredLogger) *SubstatOptimizer

func (*SubstatOptimizer) PrettyPrint

func (o *SubstatOptimizer) PrettyPrint(output string, statsFinal *SubstatOptimizerDetails) string

Final output This doesn't take much time relatively speaking, so just always do the processing...

func (*SubstatOptimizer) Run

func (o *SubstatOptimizer) Run(cfg string, simopt simulator.Options, simcfg *ast.ActionList)

Substat Optimization strategy is very simplistic right now: This is not fully optimal - see other comments in code 1) User sets team, weapons, artifact sets/main stats, and rotation 2) Given those, for each character, sim picks ER substat value that functionally maximizes DPS Mean/SD, subject to a penalty on high ER values

  • Strategy is to just do a dumb grid search over ER substat values for each character
  • ER substat values are set in increments of 2 to make the search easier

3) Given ER values, we then optimize the other substats by doing a "gradient descent" (but not really) method

type SubstatOptimizerDetails

type SubstatOptimizerDetails struct {
	// contains filtered or unexported fields
}

func NewSubstatOptimizerDetails

func NewSubstatOptimizerDetails(
	cfg string,
	simopt simulator.Options,
	simcfg *ast.ActionList,
	indivLiquidCap int,
	totalLiquidSubstats int,
	fixedSubstatCount int,
) *SubstatOptimizerDetails

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL