Skip to content

Instantly share code, notes, and snippets.

@pranz24
pranz24 / Solving_LunarLander(CMA-ES).py
Last active November 18, 2022 02:45
Solving LunarLander-v2 using CMA-ES in Pybrain
# 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
@pranz24
pranz24 / Solving_Acrobot-v1(actor-critic).py
Last active May 3, 2018 06:31
Solving_Acrobot-v1 using simple actor-critic
"""
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
@pranz24
pranz24 / install_moz_dev.sh
Last active October 1, 2023 17:28
Horrible bash script for downloading and installing latest version of Firefox Developer Edition on Ubuntu/Debian
#!/bin/bash
# Emoji
TICK='\U2714'
THUMBS_UP='\U1F44D'
DOWN_ARROW='\U2B07'
# Colors
BRED='\033[1;31m'
BGREEN='\033[1;32m'