Skip to content

Instantly share code, notes, and snippets.

View BartKeulen's full-sized avatar

Bart Keulen BartKeulen

  • Eindhoven, Netherlands
View GitHub Profile
@BartKeulen
BartKeulen / actor.py
Last active March 14, 2017 08:47
DDPG algorithm according to https://arxiv.org/abs/1509.02971. Implementation from https://pemami4911.github.io/blog/2016/08/21/ddpg-rl.html. Added Ornstein-Uhlenbeck process noise and exponential and -tanh noise decay.
"""
Data structure for implementing actor network for DDPG algorithm
Algorithm and hyperparameter details can be found here:
http://arxiv.org/pdf/1509.02971v2.pdf
Original author: Patrick Emami
Author: Bart Keulen
"""
import numpy as np
class TileCoding(object):
def __init__(self, func_approx_settings):
self.num_tilings = func_approx_settings['num_tilings']
assert(self.num_tilings % 2 == 0)
self.state_dim = func_approx_settings['state_dim']
self.bound_low = func_approx_settings['bound_low']
@BartKeulen
BartKeulen / LinePlotDemo.java
Created February 21, 2017 18:19
Real time line plot demo
import java.awt.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
import smile.plot.*;
/**
*
@BartKeulen
BartKeulen / GradientTest.java
Last active April 4, 2017 22:35
Deeplearning4j version: 0.8.0; OS: Ubuntu 16.04.1 LTS; Java version: 1.8.0_121
public class GradientTest {
private static final Logger logger = LoggerFactory.getLogger(GradientTest.class);
public static void main(String[] args) {
//Create the model
int nIn = 2;
int nOut = 1;
Nd4j.getRandom().setSeed(12345);
@BartKeulen
BartKeulen / log.txt
Last active May 12, 2017 23:17
Error log installing rllab. System info: Distributor ID: Ubuntu, Description: Ubuntu 16.04.2 LTS, Release: 16.04, Codename: xenial. Python info: Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:53:06) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
./scripts/setup_linux.sh
Installing system dependencies
You will probably be asked for your sudo password.
Get:1 file:/var/cuda-repo-8-0-local InRelease
Ign:1 file:/var/cuda-repo-8-0-local InRelease
Get:2 file:/var/cuda-repo-8-0-local Release [574 B]
Get:2 file:/var/cuda-repo-8-0-local Release [574 B]
Ign:4 http://desktop-download.mendeley.com/download/apt stable InRelease
Hit:5 http://desktop-download.mendeley.com/download/apt stable Release
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial InRelease