This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Emoji | |
TICK='\U2714' | |
THUMBS_UP='\U1F44D' | |
DOWN_ARROW='\U2B07' | |
# Colors | |
BRED='\033[1;31m' | |
BGREEN='\033[1;32m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
small neural network trained using actor-critic in Pytorch | |
References: | |
David Silver's Lecture 7-Policy Gradient Methods: https://www.youtube.com/watch?v=KHZVXao4qXs&t=46s | |
Actor-critic example in Pytorch: https://github.com/pytorch/examples/blob/master/reinforcement_learning/actor_critic.py | |
I think a higher score can be achieved by running the algorithm for more number of episodes(>80000) | |
""" | |
import argparse | |
import gym | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A small neural network is trained using Covariance Matrix Adaptation Evolution Strategies | |
# The idea is from this paper: https://arxiv.org/abs/1604.00772 | |
# This gist is using pybrain (http://pybrain.org/) | |
import logging | |
import os | |
import numpy as np | |
import gym |