Exemple #1
0
func GetTruthFunc(cfg sysadmin.Config) bfs3.Prior {
	return func(task *rlglue.TaskSpec) (prior bayes.BeliefState) {
		mdp := sysadmin.NewSysMDP(cfg)
		transition := &bayes.MDPTransition{mdp}
		reward := &bayes.MDPReward{mdp}
		terminal := &bayes.MDPTerminal{transition}
		prior = bayes.NewBelief(0, reward, transition, terminal, nil)
		return
	}
}
Exemple #2
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())
		}
	}
}