示例#1
0
文件: fl.go 项目: postfix/rlbayes
func main() {
	defer nicetrace.Print()
	cfg = ConfigDefault()
	argcfg.LoadArgs(&cfg)
	agent := NewAgent(cfg)
	rlglue.LoadAgent(agent)
}
示例#2
0
func main() {
	defer nicetrace.Print()
	cfg := ConfigDefault()
	argcfg.LoadArgs(&cfg)
	agent := sysadmin.NewBFS3Agent(cfg.BFS3, cfg.Sysadmin)
	rlglue.LoadAgent(agent)
}
示例#3
0
func main() {
	defer nicetrace.Print()
	cfg := coffee.ConfigDefault()
	argcfg.LoadArgs(&cfg)
	env := coffee.NewEnv(cfg)
	if err := rlglue.LoadEnvironment(env); err != nil {
		println(err.String())
	}
}
示例#4
0
func main() {
	defer nicetrace.Print()
	cfg := coffee.ConfigDefault()
	argcfg.LoadArgs(&cfg)
	agent := coffee.NewOptAgent(cfg)
	err := rlglue.LoadAgent(agent)
	if err != nil {
		fmt.Println(err)
	}
}
示例#5
0
文件: grid.go 项目: skelterjohn/rlenv
func main() {
	defer nicetrace.Print()
	var config Config
	config.Width, config.Height = 3, 3
	argcfg.LoadArgs(&config)
	genv := grid.New(int32(config.Width), int32(config.Height))
	if err := rlglue.LoadEnvironment(genv); err != nil {
		fmt.Println("Error running grid: %v\n", err)
	}
}
示例#6
0
func main() {
	defer nicetrace.Print()
	config := paint.ConfigDefault()
	argcfg.LoadArgs(&config)
	env := paint.New(config)
	env.Live = false
	if err := rlglue.LoadEnvironment(env); err != nil {
		fmt.Println("Error running paint: %v\n", err)
	}
}
示例#7
0
func main() {
	defer nicetrace.Print()
	var cfg Config
	cfg.M = 5
	cfg.Depth = 10
	cfg.NumTrajectories = 500
	cfg.FS3 = fsss.ConfigDefault()
	argcfg.LoadArgs(&cfg)
	agent := NewRmaxFSSSAgent(cfg)
	rlglue.LoadAgent(agent)
}
示例#8
0
文件: rmax.go 项目: skelterjohn/rlalg
func main() {
	defer nicetrace.Print()
	var config rmax.RmaxConfig
	config.M = 5
	config.Epsilon = .1
	argcfg.LoadArgs(&config)
	ragent := rmax.NewRmaxAgent(config)
	if err := rlglue.LoadAgent(ragent); err != nil {
		fmt.Println("Error running rmax: %v\n", err)
	}
}
示例#9
0
func main() {
	defer nicetrace.Print()
	var cfg Config
	cfg.NumActions = 5
	argcfg.LoadArgs(&cfg)
	ones := make([]float64, cfg.NumActions)
	for i, _ := range ones {
		ones[i] = 1
	}
	genv := bbandits.NewEnv(bbandits.NewBelief(ones, ones))
	if err := rlglue.LoadEnvironment(genv); err != nil {
		fmt.Println("Error running grid: %v\n", err)
	}
}
示例#10
0
func main() {
	defer nicetrace.Print()
	cfg := sysadmin.ConfigDefault()
	argcfg.LoadArgs(&cfg)
	if false {
		env := sysadmin.New(cfg)
		if err := rlglue.LoadEnvironment(env); err != nil {
			println(err.String())
		}
	} else {
		mdp := sysadmin.NewSysMDP(cfg)
		env := discrete.NewMDPEnvNoReset(mdp, mdp.Task, (1<<uint(cfg.NumSystems))-1)
		if err := rlglue.LoadEnvironment(env); err != nil {
			println(err.String())
		}
	}
}
示例#11
0
文件: beb.go 项目: skelterjohn/rlalg
func main() {
	defer nicetrace.Print()
	var config Config
	config.BEB = beb.BebConfigDefault()
	argcfg.LoadArgs(&config)
	var getRFoo func(task *rlglue.TaskSpec) (foo beb.RewardFunc)
	switch config.Which {
	case 0:
		getRFoo = func(task *rlglue.TaskSpec) (foo beb.RewardFunc) {
			foo = func(s discrete.State, a discrete.Action) (r float64) {
				return -1
			}
			return
		}
	case 2:
		getRFoo = getRewardFooPaint
	}
	bebagent := beb.NewBebAgent(config.BEB, getRFoo)
	if err := rlglue.LoadAgent(bebagent); err != nil {
		fmt.Println("Error running rmax: %v\n", err)
	}
}