* Get current state as a tf.Tensor of shape [1, 4].
()
| 79 | * Get current state as a tf.Tensor of shape [1, 4]. |
| 80 | */ |
| 81 | getStateTensor() { |
| 82 | return tf.tensor2d([[this.x, this.xDot, this.theta, this.thetaDot]]); |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Update the cart-pole system using an action. |