Agent Trained on Doors
This commit is contained in:
@ -14,14 +14,14 @@ warnings.filterwarnings('ignore', category=UserWarning)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
model_name = 'PPO_1623052687'
|
||||
model_name = 'A2C_1623923982'
|
||||
run_id = 0
|
||||
out_path = Path(__file__).parent / 'debug_out'
|
||||
model_path = out_path / model_name
|
||||
|
||||
with (model_path / f'env_{model_name}.yaml').open('r') as f:
|
||||
env_kwargs = yaml.load(f, Loader=yaml.FullLoader)
|
||||
with SimpleFactory(level_name='rooms', **env_kwargs) as env:
|
||||
with SimpleFactory(**env_kwargs) as env:
|
||||
|
||||
# Edit THIS:
|
||||
model_files = list(natsorted((model_path / f'{run_id}_{model_name}').rglob('model_*.zip')))
|
||||
@ -30,5 +30,3 @@ if __name__ == '__main__':
|
||||
model = PPO.load(this_model)
|
||||
evaluation_result = evaluate_policy(model, env, n_eval_episodes=100, deterministic=False, render=True)
|
||||
print(evaluation_result)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user