コード例 #1
0
import gym
import gym_pull

gym_pull.pull('github.com/ppaquette/gym-super-mario')
env = gym.make('ppaquette/SuperMarioBros-1-1-v0')
コード例 #2
0
import gym
import gym_pull
import gym.configuration
import sys

import networkx as nx
import math
import random
import copy
import numpy as np
import pylab as plt

import pandas

gym_pull.pull(
    'github.com/ppaquette/gym-super-mario'
)  # Only required once, envs will be loaded with import gym_pull afterwards
env = gym.make('ppaquette/SuperMarioBros-1-1-v0')

# env = gym_super_mario_bros.make('SuperMarioBros-v1')
# env = BinarySpaceToDiscreteSpaceEnv(env, COMPLEX_MOVEMENT)


def printObject(D, filename):
    with open(filename, 'w') as f:
        for x in range(0, len(D)):
            lineCounter = 1
            for y in range(0, len(D[x])):
                if lineCounter == 3:
                    f.write("{}\n".format(D[x][y]))
                    lineCounter = 0
コード例 #3
0
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable

# Importing the packages for OpenAI and Doom
import gym
from gym.wrappers import SkipWrapper

import gym_pull
gym_pull.pull('github.com/ppaquette/gym-doom')

from ppaquette_gym_doom.wrappers.action_space import ToDiscrete

# Importing the other Python files
import experience_replay, image_preprocessing

# Importing the other Python files
import experience_replay, image_preprocessing

import gym_pull
gym_pull.pull('github.com/ppaquette/gym-doom')


class CNN(nn.Module):
    def __init__(self, number_actions):
        super(CNN, self).__init__()
        self.conv1 = nn.Conv2d(in_channels=1, out_channels=32, kernel_size=5)
        self.conv2 = nn.Conv2d(in_channels=32, out_channels=32, kernel_size=3)
コード例 #4
0
ファイル: doom.py プロジェクト: chriscremer/Other_Code
    print (action)











import gym
import gym_pull
gym_pull.pull('github.com/ppaquette/gym-super-mario')        # Only required once, envs will be loaded with import gym_pull afterwards
env = gym.make('ppaquette/SuperMarioBros-1-1-v0')



fsdas




import gym
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
コード例 #5
0
ファイル: play.py プロジェクト: baonlq/poker-gym
import gym
import gym_pull

gym_pull.pull('github.com/baonlq/poker-gym')
env = gym.make('baonlq/poker-v0')
env.reset()