Objective function for genetic algorithm

Discussion in 'Other Advanced Math' started by ruperty, Dec 10, 2022.

  1. ruperty


    Dec 10, 2022
    Likes Received:

    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?

    Last edited: Dec 10, 2022
    ruperty, Dec 10, 2022
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.