learn

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(cfg RouterConfig, candidates ...action.AnyAction) action.AnyAction

NewRouter creates a high-throughput, low-latency Softmax reinforcement learning router.

Types

type RewardFunc

type RewardFunc func(res any, err error, duration time.Duration) float64

RewardFunc evaluates the execution of a route and returns a scalar reward.

type RouterConfig

type RouterConfig struct {
	Name         string
	Temperature  float64
	LearningRate float64
	RewardFn     RewardFunc
}

Jump to

Keyboard shortcuts

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