Objective function for genetic algorithm

Joined
Dec 10, 2022
Messages
1
Reaction score
0
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/).

OpenAI-Gym-classical-control-and-PyBullet-robotic-environments-a-Cart-Pole-b_Q640.jpg


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:


Write your reply...

Members online

No members online now.

Forum statistics

Threads
2,529
Messages
9,858
Members
696
Latest member
fairdistribution
Back
Top