def run_large_experiment(): num_dcs = 10 num_customers = 50 num_commodities = 5 orders_per_day = 10 dcs_per_customer = 3 demand_mean = 200 demand_var = 20 num_steps = 30 num_episodes = 5 runner_random = experiment_runner.create_random_experiment_runner( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps) runner_dqn = experiment_runner.create_dqn_experiment_runner( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps) runner_zero = experiment_runner.create_alwayszero_experiment_runner( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps) runner_bestfit = experiment_runner.create_bestfit_experiment_runner( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps) #runner_random.run_episodes(num_steps, num_episodes, orders_per_day, experiment_name='dumb_agent') runner_dqn.run_episodes(num_steps, num_episodes, orders_per_day, experiment_name='dqn_agent')
def run_dqn(): print("!!!RUNNING DQN!!!") runner_dqn = experiment_runner.create_dqn_experiment_runner( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps, ) runner_dqn.run_episodes( num_steps, num_episodes, orders_per_day, experiment_name=f"dqn_few_warehouses" ) print("!!!DONE DQN!!!")
def two_customers_dqn_debug_run(): num_dcs = 10 num_customers = 2 num_commodities = 4 orders_per_day = 2 dcs_per_customer = 3 demand_mean = 100 demand_var = 20 num_steps = 50 num_episodes = 1000 runner_dqn = experiment_runner.create_dqn_experiment_runner( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps) runner_dqn.run_episodes(num_steps, num_episodes, orders_per_day, experiment_name='two_customers_dqn_debug')
def run_dqn(): print("!!!RUNNING DQN!!!") reproducibility.set_seeds(0) print("Check this array to ensure reproducibility") print("Reproducibility DQN", np.random.randint(0, 500, size=(5, 1))) runner_dqn = experiment_runner.create_dqn_experiment_runner( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps, ) runner_dqn.run_episodes(num_steps, num_episodes, orders_per_day, experiment_name=f"dqn2_few_warehouses_v3") runner_dqn.agent.save_weights("models/dqn2_few_warehouses_v3.h5") print("!!!DONE DQN!!!")
demand_var = 20 print("====parameters=====") print(( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps, )) runner_dqn = experiment_runner.create_dqn_experiment_runner( num_dcs, num_customers, dcs_per_customer, demand_mean, demand_var, num_commodities, orders_per_day, num_steps, ) name = f"dqn_experiment_{i}" runner_dqn.run_episodes(num_steps, num_episodes, orders_per_day, experiment_name=name) tf.reset_default_graph()