ucb

package
v0.0.0-...-2f1b4d8 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UCB

type UCB struct {
	sync.RWMutex
	Arms     int
	Attempts []int
	Rewards  []int
}

UCB represents UCB multi-arm bandit.

func New

func New(arms int, attempts, rewards []int) (*UCB, error)

New creates a new UCB multi-arm bandit.

func (*UCB) SelectArm

func (u *UCB) SelectArm() (int, error)

SelectArm selects arm to trigger multi-arm bandit.

Jump to

Keyboard shortcuts

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