forked from microsoft/wmg_agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_wmg_on_flat_babyai.py
56 lines (47 loc) · 1.07 KB
/
test_wmg_on_flat_babyai.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
### CONTROLS (non-tunable) ###
# general
TYPE_OF_RUN = test_episodes # train, test, test_episodes, render
NUM_EPISODES_TO_TEST = 1000
MIN_FINAL_REWARD_FOR_SUCCESS = 1.0
LOAD_MODEL_FROM = models/wmg_flat_babyai.pth
SAVE_MODELS_TO = None
# worker.py
ENV = BabyAI_Env
ENV_RANDOM_SEED = 1
AGENT_RANDOM_SEED = 1
REPORTING_INTERVAL = 1
TOTAL_STEPS = 1
ANNEAL_LR = False
# A3cAgent
AGENT_NET = WMG_Network
# WMG
V2 = False
# BabyAI_Env
BABYAI_ENV_LEVEL = BabyAI-GoToLocal-v0
USE_SUCCESS_RATE = True
SUCCESS_RATE_THRESHOLD = 0.99
HELDOUT_TESTING = False
NUM_TEST_EPISODES = 10000
OBS_ENCODER = Flat
BINARY_REWARD = True
### HYPERPARAMETERS (tunable) ###
# A3cAgent
A3C_T_MAX = 6
LEARNING_RATE = 2.5e-05
DISCOUNT_FACTOR = 0.5
GRADIENT_CLIP = 256.0
ENTROPY_TERM_STRENGTH = 0.02
ADAM_EPS = 1e-8
REWARD_SCALE = 16.0
WEIGHT_DECAY = 0.
# WMG
WMG_MAX_OBS = 0
WMG_MAX_MEMOS = 16
WMG_MEMO_SIZE = 64
WMG_NUM_LAYERS = 2
WMG_NUM_ATTENTION_HEADS = 16
WMG_ATTENTION_HEAD_SIZE = 24
WMG_HIDDEN_SIZE = 16
AC_HIDDEN_LAYER_SIZE = 512