Skip to content

Instantly share code, notes, and snippets.

View nikibobi's full-sized avatar
📈
The future belongs to the people that turn data into products

Borislav Kosharov nikibobi

📈
The future belongs to the people that turn data into products
View GitHub Profile
@nikibobi
nikibobi / pg-pong.py
Created July 27, 2018 21:05 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@nikibobi
nikibobi / MiniJSON.cs
Last active December 15, 2015 22:08 — forked from darktable/MiniJSON.cs
MiniJSON
/*
* Copyright (c) 2012 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining