mirror of
https://github.com/wassname/kair_algorithms_draft.git
synced 2026-09-09 11:25:10 +08:00
Add demo files (#23)
* Add demo files * Add demo path on run files and change formatting * Delete discrete demo
This commit is contained in:
@@ -65,9 +65,10 @@ class Agent(AbstractAgent):
|
||||
|
||||
"""
|
||||
AbstractAgent.__init__(self, env, args)
|
||||
self.actor, self.actor_target, self.critic1, self.critic1_target, self.critic2, self.critic2_target = ( # noqa: B950
|
||||
models
|
||||
)
|
||||
self.actor, self.actor_target = models[:2]
|
||||
self.critic1, self.critic1_target = models[2:4]
|
||||
self.critic2, self.critic2_target = models[4:]
|
||||
|
||||
self.actor_optim, self.critic_optim = optims
|
||||
self.hyper_params = hyper_params
|
||||
self.exploration_noise, self.target_policy_noise = noises
|
||||
|
||||
Binary file not shown.
@@ -37,6 +37,13 @@ parser.add_argument(
|
||||
default=0,
|
||||
help="start rendering after the input number of episode",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--demo-path",
|
||||
type=str,
|
||||
default="data/lunarlander_continuous_demo.pkl",
|
||||
help="demonstration path",
|
||||
)
|
||||
parser.add_argument("--save-period", type=int, default=100, help="save model period")
|
||||
parser.add_argument("--log", action="store_true", help="turn on logging")
|
||||
parser.add_argument("--test", action="store_true", help="test mode (no training)")
|
||||
|
||||
@@ -40,10 +40,7 @@ parser.add_argument(
|
||||
"--max-episode-steps", type=int, default=-1, help="max episode step"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--demo-path",
|
||||
type=str,
|
||||
default="data/lunarlander_continuous_demo.pkl",
|
||||
help="demonstration path",
|
||||
"--demo-path", type=str, default="data/reacher_demo.pkl", help="demonstration path"
|
||||
)
|
||||
|
||||
parser.set_defaults(test=False)
|
||||
|
||||
Reference in New Issue
Block a user