StillTesting
This commit is contained in:
parent
80741776d2
commit
024a9a0265
12
test.py
12
test.py
@ -17,7 +17,7 @@ import columbus
|
|||||||
root_path = '.'
|
root_path = '.'
|
||||||
|
|
||||||
|
|
||||||
def main(env_name='ColumbusCandyland_Aux10-v0', timesteps=50000, showRes=False, saveModel=True, n_eval_episodes=16):
|
def main(env_name='ColumbusCandyland_Aux10-v0', timesteps=500000, showRes=True, saveModel=True, n_eval_episodes=0):
|
||||||
env = gym.make(env_name)
|
env = gym.make(env_name)
|
||||||
test_sde = False
|
test_sde = False
|
||||||
ppo = PPO(
|
ppo = PPO(
|
||||||
@ -29,7 +29,7 @@ def main(env_name='ColumbusCandyland_Aux10-v0', timesteps=50000, showRes=False,
|
|||||||
gamma=0.99,
|
gamma=0.99,
|
||||||
gae_lambda=0.95,
|
gae_lambda=0.95,
|
||||||
normalize_advantage=True,
|
normalize_advantage=True,
|
||||||
ent_coef=0.15, # 0.1
|
ent_coef=0.1, # 0.1
|
||||||
vf_coef=0.5,
|
vf_coef=0.5,
|
||||||
use_sde=False, # False
|
use_sde=False, # False
|
||||||
)
|
)
|
||||||
@ -42,7 +42,7 @@ def main(env_name='ColumbusCandyland_Aux10-v0', timesteps=50000, showRes=False,
|
|||||||
gamma=0.99,
|
gamma=0.99,
|
||||||
gae_lambda=0.95,
|
gae_lambda=0.95,
|
||||||
normalize_advantage=True,
|
normalize_advantage=True,
|
||||||
ent_coef=0.15, # 0.1
|
ent_coef=0.1, # 0.1
|
||||||
vf_coef=0.5,
|
vf_coef=0.5,
|
||||||
use_sde=False, # False
|
use_sde=False, # False
|
||||||
)
|
)
|
||||||
@ -90,9 +90,9 @@ def main(env_name='ColumbusCandyland_Aux10-v0', timesteps=50000, showRes=False,
|
|||||||
print('TRL_PG:')
|
print('TRL_PG:')
|
||||||
testModel(trl_pg, timesteps, showRes,
|
testModel(trl_pg, timesteps, showRes,
|
||||||
saveModel, n_eval_episodes)
|
saveModel, n_eval_episodes)
|
||||||
print('PPO:')
|
#print('PPO:')
|
||||||
testModel(ppo, timesteps, showRes,
|
#testModel(ppo, timesteps, showRes,
|
||||||
saveModel, n_eval_episodes)
|
# saveModel, n_eval_episodes)
|
||||||
|
|
||||||
|
|
||||||
def testModel(model, timesteps, showRes=False, saveModel=False, n_eval_episodes=16):
|
def testModel(model, timesteps, showRes=False, saveModel=False, n_eval_episodes=16):
|
||||||
|
Loading…
Reference in New Issue
Block a user