Ths is an educational project consisting in applying Reinforcement Learning to OpenAI Gym's Cart-Pole environment.
To simulate a naïve controller that decides what action to apply based only on the current angular position, run one of the following
make simulate_naivepython simulate_naive_controller.pyTo simulate a receding horizon, model-based, predictive controller, run one of the following:
make simulate_predictivepython simulate_predictive_controller.pyTo train an Reinforcement Learning agent, run one of the following:
make train algorithm=<ALGORITHM>python cartpole_agents.py <ALGORITHM>Where <ALGORITHM> is one of:
rfb_linear(linear function approximation Q Learning with features based on radial basis functions)sarsa(average reward SARSA)q_learningavg_reward_expected_sarsadiscounted_expected_sarsa
To simulate an Reinforcement Learning agent that was already trained, run one of the following:
make simulate algorithm=<ALGORITHM>python simulate_rl_agent.py <ALGORITHM>To generate a GIF with the simulation of an agent that was already trained, run one of the following:
make generate_gif algorithm=<ALGORITHM>python generate_gif_from_agent.py <ALGORITHM>