reinforcement

package
v0.0.0-...-82cf001 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQAgent

func NewQAgent(cpuCost, memoryCost, underprovisioningPenalty, alpha, gamma, epsilon *inf.Dec) *qAgent

Types

type QLearning

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

func NewQLearning

func NewQLearning(cpuCost, memoryCost, underprovisioningPenalty, alpha, gamma *inf.Dec, possibleActions actions, logger logr.Logger) *QLearning

func (*QLearning) GetGreedyActions

func (l *QLearning) GetGreedyActions(state stateName, learningState []byte) (actions, error)

func (*QLearning) Update

func (l *QLearning) Update(currentState *state, currentAction *action, learningStateEncoded []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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