zjowowen's picture
Upload policy_config.py with huggingface_hub
1146e45
raw
history blame
3.48 kB
exp_config = {
'main_config': {
'exp_name': 'TicTacToe-play-with-bot-AlphaZero',
'seed': 0,
'env': {
'env_id': 'TicTacToe-play-with-bot',
'board_size': 3,
'battle_mode': 'play_with_bot_mode',
'bot_action_type': 'v0',
'channel_last': False,
'collector_env_num': 8,
'evaluator_env_num': 5,
'n_evaluator_episode': 5,
'manager': {
'shared_memory': False
},
'agent_vs_human': False,
'prob_random_agent': 0,
'prob_expert_agent': 0,
'scale': True,
'alphazero_mcts_ctree': False,
'save_replay_gif': False,
'replay_path_gif': './replay_gif'
},
'policy': {
'on_policy': False,
'cuda': True,
'multi_gpu': False,
'bp_update_sync': True,
'traj_len_inf': False,
'model': {
'observation_shape': [3, 3, 3],
'action_space_size': 9,
'num_res_blocks': 1,
'num_channels': 16,
'fc_value_layers': [8],
'fc_policy_layers': [8]
},
'torch_compile': False,
'tensor_float_32': False,
'sampled_algo': False,
'gumbel_algo': False,
'update_per_collect': 50,
'model_update_ratio': 0.1,
'batch_size': 256,
'optim_type': 'Adam',
'learning_rate': 0.003,
'weight_decay': 0.0001,
'momentum': 0.9,
'grad_clip_value': 0.5,
'value_weight': 1.0,
'collector_env_num': 8,
'evaluator_env_num': 5,
'lr_piecewise_constant_decay': False,
'threshold_training_steps_for_final_lr': 500000,
'manual_temperature_decay': False,
'threshold_training_steps_for_final_temperature': 100000,
'fixed_temperature_value': 0.25,
'mcts': {
'num_simulations': 25
},
'other': {
'replay_buffer': {
'replay_buffer_size': 1000000,
'save_episode': False
}
},
'cfg_type': 'AlphaZeroPolicyDict',
'mcts_ctree': False,
'simulation_env_name': 'tictactoe',
'simulation_env_config_type': 'play_with_bot',
'board_size': 3,
'entropy_weight': 0.0,
'n_episode': 8,
'eval_freq': 2000
},
'wandb_logger': {
'gradient_logger': False,
'video_logger': False,
'plot_logger': False,
'action_logger': False,
'return_logger': False
}
},
'create_config': {
'env': {
'type': 'tictactoe',
'import_names': ['zoo.board_games.tictactoe.envs.tictactoe_env']
},
'env_manager': {
'type': 'subprocess'
},
'policy': {
'type': 'alphazero',
'import_names': ['lzero.policy.alphazero']
},
'collector': {
'type': 'episode_alphazero',
'import_names': ['lzero.worker.alphazero_collector']
},
'evaluator': {
'type': 'alphazero',
'import_names': ['lzero.worker.alphazero_evaluator']
}
}
}