Skip to content

Instantly share code, notes, and snippets.

@jangirrishabh
Last active June 14, 2018 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jangirrishabh/51542f27e97eac1559a00f06b757df1a to your computer and use it in GitHub Desktop.
Save jangirrishabh/51542f27e97eac1559a00f06b757df1a to your computer and use it in GitHub Desktop.
Snippet for toyCarIRL, blog usage, not executable
# IRL algorith developed for the toy car obstacle avoidance problem for testing.
import numpy as np
import logging
import scipy
from playing import play #get the RL Test agent, gives out feature expectations after 2000 frames
from nn import neural_net #construct the nn and send to playing
from cvxopt import matrix
from cvxopt import solvers #convex optimization library
from flat_game import carmunk # get the environment
from learning import IRL_helper # get the Reinforcement learner
NUM_STATES = 8
BEHAVIOR = 'red' # yellow/brown/red
FRAMES = 100000 # number of RL training frames per iteration of IRL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment