# -*- coding: utf-8 -*-

from types import SimpleNamespace

HYPERPARAMS = {'lander': SimpleNamespace(**
                                         {'ENV_ID': 'LunarLander-v2',
                                          'N_ENVS': 20,
                                          'SEED': 144,
                                          'EPS_START': 1.0,
                                          'EPS_END': 0.02,
                                          'EPS_FRAMES': 25_000,
                                          'OBS_SIZE': 8,
                                          'ACT_SIZE': 4,
                                          'HID_SIZE': 348,
                                          'GAMMA': 0.99,
                                          'STEPS': 4,
                                          'BUFFER_SIZE': 200_000,
                                          'INIT_REPLAY': 10_000,
                                          'LR': 1e-3,
                                          'N_MP': 4,
                                          'BATCH_SIZE': 256,
                                          'VMIN': -500,
                                          'VMAX': 300,
                                          'NATOMS': 51,
                                          'BOUND_SOLVE': 200,
                                          'SYNC_NET': 1000,
                                          'SKIP': None
                                          }),
               'cartpole': SimpleNamespace(**
                                           {'ENV_ID': 'CartPole-v0',
                                            'N_ENVS': 1,
                                            'SEED': 144,
                                            'EPS_START': 1.0,
                                            'EPS_END': 0.02,
                                            'EPS_FRAMES': 15_000,
                                            'OBS_SIZE': 4,
                                            'ACT_SIZE': 2,
                                            'HID_SIZE': 128,
                                            'GAMMA': 0.99,
                                            'STEPS': 4,
                                            'BUFFER_SIZE': 25_000,
                                            'INIT_REPLAY': 3_000,
                                            'LR': 1e-2,
                                            'N_MP': 1,
                                            'BATCH_SIZE': 256,
                                            'VMIN': 0,
                                            'VMAX': 200,
                                            'NATOMS': 51,
                                            'BOUND_SOLVE': 195,
                                            'SYNC_NET': 1000,
                                            'SKIP': None
                                            }),
               'freeway': SimpleNamespace(**
                                          {'ENV_ID': 'Freeway-ram-v4',
                                           'N_ENVS': 8,
                                           'SEED': 123,
                                           'EPS_START': 1.0,
                                           'EPS_END': 0.02,
                                           'EPS_FRAMES': 20_000,
                                           'OBS_SIZE': 128,
                                           'ACT_SIZE': 3,
                                           'HID_SIZE': 348,
                                           'GAMMA': 0.99,
                                           'STEPS': 10,
                                           'BUFFER_SIZE': 50_000,
                                           'INIT_REPLAY': 10_000,
                                           'LR': 1e-4,
                                           'N_MP': 2,
                                           'BATCH_SIZE': 64,
                                           'VMIN': 0,
                                           'VMAX': 20,
                                           'NATOMS': 51,
                                           'BOUND_SOLVE': 20,
                                           'SYNC_NET': 1000,
                                           'SKIP': None
                                           }),
               'cartpole1': SimpleNamespace(**
                                            {'ENV_ID': 'CartPole-v1',
                                             'N_ENVS': 1,
                                             'SEED': 144,
                                             'EPS_START': 1.0,
                                             'EPS_END': 0.02,
                                             'EPS_FRAMES': 5_000,
                                             'OBS_SIZE': 4,
                                             'ACT_SIZE': 2,
                                             'HID_SIZE': 256,
                                             'GAMMA': 0.99,
                                             'STEPS': 4,
                                             'BUFFER_SIZE': 20_000,
                                             'INIT_REPLAY': 3_000,
                                             'LR': 1e-3,
                                             'N_MP': 1,
                                             'BATCH_SIZE': 128,
                                             'VMIN': 0,
                                             'VMAX': 200,
                                             'NATOMS': 51,
                                             'BOUND_SOLVE': 450,
                                             'SYNC_NET': 1000,
                                             'SKIP': None
                                             }),
               'bowling': SimpleNamespace(**
                                          {'ENV_ID': 'Bowling-ramNoFrameskip-v4',
                                           'N_ENVS': 8,
                                           'SEED': 144,
                                           'EPS_START': 1.0,
                                           'EPS_END': 0.05,
                                           'EPS_FRAMES': 50_000,
                                           'OBS_SIZE': 128,
                                           'ACT_SIZE': 4,
                                           'HID_SIZE': 256,
                                           'GAMMA': 0.99,
                                           'STEPS': 4,
                                           'BUFFER_SIZE': 300_000,
                                           'INIT_REPLAY': 5_000,
                                           'LR': 5e-5,
                                           'N_MP': 1,
                                           'BATCH_SIZE': 128,
                                           'VMIN': 0,
                                           'VMAX': 200,
                                           'NATOMS': 51,
                                           'BOUND_SOLVE': 66,
                                           'SYNC_NET': 1000,
                                           'SKIP': 4
                                           }),
               'breakout': SimpleNamespace(**
                                           {'ENV_ID': 'Breakout-ramNoFrameskip-v4',
                                            'N_ENVS': 8,
                                            'SEED': 144,
                                            'EPS_START': 1.0,
                                            'EPS_END': 0.05,
                                            'EPS_FRAMES': 100_000,
                                            'OBS_SIZE': 128,
                                            'ACT_SIZE': 4,
                                            'HID_SIZE': 256,
                                            'GAMMA': 0.99,
                                            'STEPS': 4,
                                            'BUFFER_SIZE': 400_000,
                                            'INIT_REPLAY': 10_000,
                                            'LR': 5e-5,
                                            'N_MP': 1,
                                            'BATCH_SIZE': 128,
                                            'VMIN': 0,
                                            'VMAX': 200,
                                            'NATOMS': 51,
                                            'BOUND_SOLVE': 66,
                                            'SYNC_NET': 1000,
                                            'SKIP': 4
                                            }),
               'mountaincar': SimpleNamespace(**
                                              {'env_id': 'MountainCar-v0',
                                               'n_envs': 4,
                                               'seed': 124,
                                               'eps_start': 1.0,
                                               'eps_end': 0.01,
                                               'eps_frames': 1_000,
                                               'obs_size': 2,
                                               'act_size': 3,
                                               'hid_size': 128,
                                               'gamma': 0.99,
                                               'steps': 2,
                                               'buffer_size': 50_000,
                                               'init_replay': 5_000,
                                               'lr': 1e-3,
                                               'n_mp': 1,
                                               'batch_size': 64,
                                               'vmin': 0,
                                               'vmax': 100,
                                               'natoms': 51,
                                               'bound_solve': 95,
                                               'sync_net': 1000
                                               }),
               'lander1': SimpleNamespace(**
                                          {'env_id': 'LunarLander-v2',
                                           'n_envs': 4,
                                           'seed': 124,
                                           'eps_start': 1.0,
                                           'eps_end': 0.02,
                                           'eps_frames': 30_000,
                                           'obs_size': 8,
                                           'act_size': 4,
                                           'hid_size': 128,
                                           'gamma': 0.99,
                                           'steps': 5,
                                           'buffer_size': 50_000,
                                           'init_replay': 5_000,
                                           'lr': 1e-3,
                                           'n_mp': 1,
                                           'batch_size': 64,
                                           'vmin': -100,
                                           'vmax': 100,
                                           'natoms': 51,
                                           'bound_solve': 195,
                                           'sync_net': 1000
                                           }),
               }
