Exemple #1
0
				return 1
			else:
				return 0
		return getbetas

	def finterest(env):
		def getinterest(state):
			if state in [0, args.len, args.len*2]:
				return args.intrst
			else:
				return args.intrst
		return getinterest

	from delayed_effect import YChain

	env = YChain(n=args.len)
	betas = fbetas(env)
	interest = finterest(env)
	action_1_prob = 0.5
	action_2_prob = 1-action_1_prob
	fo_states = [0, args.len, 2*args.len]
	v_pi = {0:0.5, args.len:2, 2*args.len:-1}
	weights = np.zeros_like(np.array(env.feat).reshape(-1,1))

elif args.env == "elevator":
	filename = "etd"+"_int_"+str(args.intrst)+"_env_"+str(args.env)+"_len_"+str(args.len)+"_lr_"+str(args.lr)+"_seed_"+str(args.seed)
	
	def fbetas(env):
		def getbetas(state):
			if state in env.goal_states or state in env.elevator_states:
				return 1