Skip to content

Files

Latest commit

2fb4e38 · Jan 23, 2020

History

History
34 lines (18 loc) · 919 Bytes

README.md

File metadata and controls

34 lines (18 loc) · 919 Bytes

CartPole-v1 Actor Critic in Keras

CartPole-v1 is an environment presented by OpenAI Gym. In this repository we have implemented Actor Critic algorithm [1] in Keras for building an agent to solve this CartPole-v1 enviroment.

Commands to run

  • To train the model

    python train_model.py
    
  • To test the model

    python test_model.py 'path_of_saved_model_weights' (without quotes)
    
  • To test agent with our trained weights

    python test_model.py saved_model/475.0.h5
    

Results

  • Output of agent taking random actions

    Episode: 0

  • Output of our agent at Episode: 100 with score 475.0

    Episode: 100, Score:475.0

References

[1] Actor-Critic Algorithms Authors: Vijay R. Konda John N. Tsitsiklis Link: https://papers.nips.cc/paper/1786-actor-critic-algorithms.pdf