#NEWLINE# def make_experiment( exp_id = 1 , path = './Results/Temp/{domain}/{agent}/{representation}/' , discover_threshold = 0.05 , boyan_N0 = 1885.42 , lambda_ = 0.5879 , initial_learn_rate = 0.1 , kernel_resolution = 10.792 ) : #NEWLINE# #INDENT# opt = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# opt [ 'path' ] = path #NEWLINE# opt [ 'exp_id' ] = exp_id #NEWLINE# opt [ 'max_steps' ] = 1000000 #NEWLINE# opt [ 'num_policy_checks' ] = 10 #NEWLINE# opt [ 'checks_per_policy' ] = 1 #NEWLINE# active_threshold = 0.05 #NEWLINE# max_base_feat_sim = 0.5 #NEWLINE# sparsify = 10 #NEWLINE# domain = Swimmer ( ) #NEWLINE# opt [ 'domain' ] = domain #NEWLINE# kernel_width = ( ( domain . statespace_limits [ : , 1 ] - domain . statespace_limits [ : , 0 ] ) / kernel_resolution ) #NEWLINE# representation = KernelizediFDD ( domain , sparsify = sparsify , kernel = gaussian_kernel , kernel_args = [ kernel_width ] , active_threshold = active_threshold , discover_threshold = discover_threshold , normalization = False , max_active_base_feat = 100 , max_base_feat_sim = max_base_feat_sim ) #NEWLINE# policy = SwimmerPolicy ( representation ) #NEWLINE# stat_bins_per_state_dim = 20 #NEWLINE# opt [ 'agent' ] = SARSA ( policy , representation , discount_factor = domain . discount_factor , lambda_ = lambda_ , initial_learn_rate = initial_learn_rate , learn_rate_decay_mode = 'boyan' , boyan_N0 = boyan_N0 ) #NEWLINE# experiment = Experiment ( ** opt ) #NEWLINE# return experiment