Skip to content

Instantly share code, notes, and snippets.

View arshren's full-sized avatar

Renu arshren

View GitHub Profile
@arshren
arshren / RL_Q_Learning.py
Created October 29, 2022 10:43
Q-Learning
# Import required libararies
import gym
import matplotlib.pyplot as plt
import random
import numpy as np
from IPython.display import clear_output
#Create an instance of the the Taxi-v3 environment
env= gym.make("Taxi-v3").env
# Creating the q-table
@arshren
arshren / CatrPole_A2C.py
Created February 12, 2023 15:38
Advantage Actor Critic Pytorch code
#Import required Libraries
import gym
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import matplotlib.pyplot as plt
# Create the Actor Network