Skip to content

Instantly share code, notes, and snippets.

View train_sac_optim.py
"""A training script of Soft Actor-Critic on OpenAI Gym Mujoco environments.
This script follows the settings of https://arxiv.org/abs/1812.05905 as much
as possible.
"""
import argparse
from distutils.version import LooseVersion
import functools
import logging
import sys
@muupan
muupan / get_krishna_probability_foundations.sh
Created May 4, 2018
Download all lecture notes of "Probability Foundations for Electrical Engineers" by Krishna Jagannathan. videos: https://www.youtube.com/playlist?list=PLVhKOwOM3oudtpQG7jf6WrS1GqxTskXsP notes: http://www.ee.iitm.ac.in/~krishnaj/ee5110notes.htm
View get_krishna_probability_foundations.sh
#!/bin/sh
set -e
# Download all the pdfs
wget -nc http://www.ee.iitm.ac.in/~krishnaj/EE5110_files/notes/lecture1_set_theory.pdf
wget -nc http://www.ee.iitm.ac.in/~krishnaj/EE5110_files/notes/lecture2_Realanalysis.pdf
wget -nc http://www.ee.iitm.ac.in/~krishnaj/EE5110_files/notes/lecture3_cardinality.pdf
wget -nc http://www.ee.iitm.ac.in/~krishnaj/EE5110_files/notes/lecture4_probability_spaces.pdf
wget -nc http://www.ee.iitm.ac.in/~krishnaj/EE5110_files/notes/lecture5_properties%20of%20prob%20measures.pdf
@muupan
muupan / how_to_build_deepmind_lab_on_macos_mojave.md
Last active May 14, 2020
How to build DeepMind Lab on macOS Mojave (as of 2019/02/01)
View how_to_build_deepmind_lab_on_macos_mojave.md
@muupan
muupan / dqn.prototxt
Created Oct 20, 2014
A Deep Q-Network definition for Caffe
View dqn.prototxt
layers {
name: "frames_input_layer"
type: MEMORY_DATA
top: "frames"
top: "dummy1"
memory_data_param {
batch_size: 32
channels: 4
height: 84
width: 84
@muupan
muupan / gdl-kif.vim
Created Sep 8, 2013
A sintax file for Game Description Language (GDL) in Knowledge Interchange Format (KIF).
View gdl-kif.vim
" A sintax file for Game Description Language (GDL) in Knowledge
" Interchange Format (KIF).
"
" Put this file in .vim/syntax/ and and add set filetype gdl-kif
" Example:
" au BufRead,BufNewFile *.kif set filetype=gdl-kif
syntax region gdlKifLineComment start=+;+ end=+$+
syntax match gdlKifArrow '<='
syntax keyword gdlKifFactRelation base init true next
View sum_arrays.py
from timeit import default_timer as timer
import chainer
from chainer import cuda
from chainer import function
import chainer.functions as F
from chainer import utils
from chainer.utils import type_check
import cupy
@muupan
muupan / gist:6120294
Created Jul 31, 2013
Terminal及びMacVimでESCまたはControl+[を押したときにIMEを英数モードにするKeyRemap4MacBook設定
View gist:6120294
<item>
<name>ESC/Control+[ to EISUU mode in Terminal/MacVim</name>
<appendix>Change ESC to ESC, ESC, JIS_EISUU</appendix>
<appendix>Change Control+[ to ESC, ESC, JIS_EISUU</appendix>
<identifier>private.app_terminal_esc_with_eisuu</identifier>
<only>TERMINAL, VI</only>
<inputsource_only>JAPANESE</inputsource_only>
<autogen>--KeyToKey-- KeyCode::ESCAPE, KeyCode::ESCAPE, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen>
<autogen>--KeyToKey-- KeyCode::JIS_BRACKET_LEFT, VK_CONTROL, KeyCode::ESCAPE, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen>
</item>
@muupan
muupan / gist:66b42e3a3f755b5c35d3419276c1008e
Created Jul 24, 2016
ICML2016 reinforcement-learning-related papers
View gist:66b42e3a3f755b5c35d3419276c1008e
Guided Cost Learning: Deep Inverse Optimal Control via Policy Optimization
Doubly Robust Off-policy Value Evaluation for Reinforcement Learning
Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning
Learning Simple Algorithms from Examples
Stability of Controllers for Gaussian Process Forward Models
Smooth Imitation Learning for Online Sequence Prediction
On the Analysis of Complex Backup Strategies in Monte Carlo Tree Search
Benchmarking Deep Reinforcement Learning for Continuous Control
Cumulative Prospect Theory Meets Reinforcement Learning: Prediction and Control
Why Most Decisions Are Easy in Tetris—And Perhaps in Other Sequential Decision Problems, As Well
@muupan
muupan / gale_shapley.py
Created Oct 1, 2013
Gale-Shapley Algorithm for stable marriage problem
View gale_shapley.py
"""
Gale-Shapley Algorithm
"""
import random
def shuffled(lst):
tmp = lst[:]
random.shuffle(tmp)
return tmp
@muupan
muupan / clean_downloads.sh
Created Sep 17, 2013
$HOME/Downloads直下にあるファイル及びディレクトリを変更日時で整理するシェルスクリプト
View clean_downloads.sh
#!/bin/sh
dir="$HOME/Downloads"
cd $dir
files=`ls -1`
# Set IFS (Internal Field Separator)
# See http://linux.just4fun.biz/%E9%80%86%E5%BC%95%E3%81%8D%E3%82%B7%E3%82%A7%E3%83%AB%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88/%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%E3%81%8C%E5%90%AB%E3%81%BE%E3%82%8C%E3%82%8B%E6%96%87%E5%AD%97%E5%88%97%E3%82%921%E8%A1%8C%E3%81%A8%E3%81%97%E3%81%A6%E6%89%B1%E3%81%86%E6%96%B9%E6%B3%95.html
IFS_BACKUP=$IFS