Example #1
0
func (this *OptAgent) AgentInit(taskString string) {
	this.task, _ = rlglue.ParseTaskSpec(taskString)
	this.Cfg.NumSystems = len(this.task.Obs.Ints)
	this.mdp = NewSysMDP(this.Cfg)
	this.qt = discrete.NewQTable(this.task.Obs.Ints.Count(), this.task.Act.Ints.Count())
	vi.ValueIteration(this.qt, this.mdp, 0.1)
}
Example #2
0
func (ra *BebAgent) AgentInit(taskString string) {
	ra.task, _ = rlglue.ParseTaskSpec(taskString)
	if ra.task.DiscountFactor == 1 {
		ra.task.DiscountFactor = 0.99
	}
	ra.rmdp = NewBebMDP(ra.task, ra.Cfg)
	ra.qt = discrete.NewQTable(ra.task.Obs.Ints.Count(), ra.task.Act.Ints.Count())
	ra.Cfg.RFoo = ra.GetRFoo(ra.task)
	ra.rmdp.RFoo = ra.Cfg.RFoo
}
Example #3
0
func (ra *RmaxAgent) AgentInit(taskString string) {
	ra.task, _ = rlglue.ParseTaskSpec(taskString)
	ra.rmdp = NewRmaxMDP(ra.task, ra.Cfg.M)
	ra.qt = discrete.NewQTable(ra.task.Obs.Ints.Count(), ra.task.Act.Ints.Count())
}