Skip to content

Commit 92d0253

Browse files
committed
Visualise control inputs
1 parent c2ee72f commit 92d0253

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/ppo/main.clj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,10 @@
10711071
actions (without-gradient (py. (py. (py. actor deterministic_act observations) reshape 480 854) numpy))
10721072
actions-tensor (dtype/elemwise-cast (dtt/ensure-tensor (py/->jvm actions)) :float32)]
10731073
(bufimg/tensor->image (dfn/* actions-tensor 255)))
1074+
;; This image shows the motor control input as a function of pendulum angle and angular velocity.
1075+
;; As one can see, the pendulum is decelerated when the speed is high (dark values at the top of the image).
1076+
;; Near the centre of the image (speed zero and angle zero) one can see how the pendulum is accelerated when the angle is negative and the speed small and decelerated when the angle is positive and the speed is small.
1077+
;; Also the image is not symmetrical because otherwise the pendulum would not start swinging up when pointing downwards.
10741078

10751079
;; ## Automated Pendulum
10761080
;;

0 commit comments

Comments
 (0)