Hello,
Not sure which is the best topic for this.
I am looking for help developing an objective function to minimise to evolve (through genetic algorithm) a control system for this frictionless inverted pendulum (https://www.gymlibrary.dev/environments/classic_control/pendulum/).
The goal is to get the pendulum to stand upright.
I have modified the environment to provide the following inputs the
velocity ( +1/-1 anti-clockwise/clockwise) and
angle (-pi/+pi from top anti-clockwise/clockwise).
I am looking to define a function that is:
zero in the upright position when velocity is zero
high the further away the pendulum is from the upright position (function of angle)
high when the velocity is low the further away the pendulum is from the upright position (function of angle and inverse function of velocity)
What is the best way this could be represented?
Thanks,
Rupert
Not sure which is the best topic for this.
I am looking for help developing an objective function to minimise to evolve (through genetic algorithm) a control system for this frictionless inverted pendulum (https://www.gymlibrary.dev/environments/classic_control/pendulum/).

The goal is to get the pendulum to stand upright.
I have modified the environment to provide the following inputs the
velocity ( +1/-1 anti-clockwise/clockwise) and
angle (-pi/+pi from top anti-clockwise/clockwise).
I am looking to define a function that is:
zero in the upright position when velocity is zero
high the further away the pendulum is from the upright position (function of angle)
high when the velocity is low the further away the pendulum is from the upright position (function of angle and inverse function of velocity)
What is the best way this could be represented?
Thanks,
Rupert
Last edited: