#NEWLINE# def make_experiment( exp_id = 1 , path = './Results/Tutorial/ChainMDPTut-SARSA' ) : #NEWLINE# #INDENT# '\n    Each file specifying an experimental setup should contain a\n    make_experiment function which returns an instance of the Experiment\n    class with everything set up.\n\n    @param id: number used to seed the random number generators\n    @param path: output directory where logs and results are stored\n    ' #NEWLINE# opt = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# opt [ 'exp_id' ] = exp_id #NEWLINE# opt [ 'path' ] = path #NEWLINE# chainSize = 50 #NEWLINE# domain = ChainMDPTut ( chainSize = chainSize ) #NEWLINE# opt [ 'domain' ] = domain #NEWLINE# representation = Tabular ( domain ) #NEWLINE# policy = eGreedy ( representation , epsilon = 0.2 ) #NEWLINE# opt [ 'agent' ] = SARSA ( policy = policy , representation = representation , discount_factor = domain . discount_factor , initial_learn_rate = 0.1 ) #NEWLINE# opt [ 'checks_per_policy' ] = 100 #NEWLINE# opt [ 'max_steps' ] = 2000 #NEWLINE# opt [ 'num_policy_checks' ] = 10 #NEWLINE# experiment = Experiment ( ** opt ) #NEWLINE# return experiment