Skip to content

inhald/cartpole-genetic-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cartpole Genetic Programming

This project implements a simple genetic programming algorithm to solve the classic CartPole balancing problem. The goal is to evolve programs that can control a cart and keep a pole balanced vertically for as long as possible.


Cartpole Animation

Visualization of a successful cartpole balance using an evolved controller.


Files

  • CartpoleEvolution.cpp
    Main source file containing the genetic programming logic and simulation loop.

  • cartCentering.h
    Header file containing constants or helper functions used in the simulation.

  • cartpole_animation.gif
    A visual demonstration of the balancing behavior.

Getting Started

Prerequisites

  • A C++ compiler (e.g., g++)

Compile

g++ -O2 CartpoleEvolution.cpp -o cartpole_sim

Run

./cartpole_sim

About

Utilizing genetic programming to evolve a controller capable of solving the cartpole centering problem.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages