qlearning

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func New

func New(cfg Config) *Agent

func (*Agent) Act

func (a *Agent) Act(s core.State) core.Action

func (*Agent) EndEpisode

func (a *Agent) EndEpisode(total core.Reward)

func (*Agent) Epsilon

func (a *Agent) Epsilon() float64

func (*Agent) Observe

func (a *Agent) Observe(s core.State, act core.Action, r core.Reward, next core.State, done bool)

func (*Agent) States

func (a *Agent) States() int

type Config

type Config struct {
	Bins         int
	Actions      int
	Alpha        float64
	Gamma        float64
	Epsilon      float64
	EpsilonDecay float64
	EpsilonMin   float64
	Seed         int64

	KeyByState bool
}

func DefaultConfig

func DefaultConfig() Config

Jump to

Keyboard shortcuts

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