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:

Members online

No members online now.

Trending content

Forum statistics

Threads
2,531
Messages
9,860
Members
697
Latest member
lemon in icewine
Back
Top