Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
<script src="https://npmcdn.com/expect/umd/expect.min.js"></script>
<script src="https://npmcdn.com/redux@3.5.2/dist/redux.js"
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<!DOCTYPE html>
<html>
<head>
<script src="https://npmcdn.com/expect/umd/expect.min.js"></script>
<script src="https://npmcdn.com/redux@3.5.2/dist/redux.js"
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
></script>
</head>
<!DOCTYPE html>
<html>
<head>
<script src="https://npmcdn.com/expect/umd/expect.min.js"></script>
<link href="http://extjs.cachefly.net/ext-3.1.0/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@arushir
arushir / README.md
Last active March 24, 2018 09:56
Deep Q-learning for Cart-Pole

I implemented the DQN model from this paper: https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf.

I used a simple network with two hidden layers and an output layer, instead of the CNN described in the paper due to the relative simplicity of the Cart-Pole environment compared to Atari games.

Note, that I did not yet implement the target network described in the more recent paper here: https://storage.googleapis.com/deepmind-data/assets/papers/DeepMindNature14236Paper.pdf.

The results vary from run to run, sometimes taking 1000 episodes to solve the problem, and at other times taking only 200 episodes.

anonymous
anonymous / untrusted-lvl20-solution.js
Created February 14, 2016 16:53
Solution to level 20 in Untrusted: http://alex.nisnevich.com/untrusted/
/*****************
* bossFight.js *
*****************
*
* NO FARTHER, DR. EVAL!!!!
* YOU WILL NOT GET OUT OF HERE ALIVE!!!!
* IT'S TIME YOU SEE MY TRUE FORM!!!!
* FACE MY ROBOT WRATH!!!!!
*/
anonymous
anonymous / untrusted-lvl14-solution.js
Created February 14, 2016 15:19
Solution to level 14 in Untrusted: http://alex.nisnevich.com/untrusted/
/********************
* crispsContest.js *
********************
*
* The Algorithm is almost in our grasp!
* At long last, we will definitively establish
* that 3SAT is solvable in polynomial time. It's
* been a long, strange journey, but it will all be
* worth it.
*
anonymous
anonymous / untrusted-lvl13-solution.js
Created February 14, 2016 15:12
Solution to level 13 in Untrusted: http://alex.nisnevich.com/untrusted/
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
anonymous
anonymous / untrusted-lvl12-solution.js
Created February 14, 2016 14:14
Solution to level 12 in Untrusted: http://alex.nisnevich.com/untrusted/
/*
* robotNav.js
*
* The green key is located in a slightly more
* complicated room. You'll need to get the robot
* past these obstacles.
*/
function startLevel(map) {
// Hint: you can press R or 5 to "rest" and not move the
@grisevg
grisevg / FAsyncQueue.h
Last active June 9, 2024 23:02
Utility class for asynchronous/coroutine style programming in UE4 C++
#pragma once
/**
* FAsyncQueue can be used to run asynchronous delegates in sequence, parallel and combinations of the above
*
* Use Add() to enqueue delegates matching FAsyncDelegate signature:
* a void function that accepts a single argument of another void function with no arguments.
*
* Static factories MakeSync, MakeSequence and MakeParallel can be used to wrap different type of delegates and
* delegate collections into a single FAsyncDelegate which can be enqueued with Add().
@gafferongames
gafferongames / delta_compression.cpp
Last active May 13, 2024 06:38
Delta Compression
/*
Delta Compression by Glenn Fiedler.
This source code is placed in the public domain.
http://gafferongames.com/2015/03/14/the-networked-physics-data-compression-challenge/
*/
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>