Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion super-mario-reinforcement-learning/main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import time
import numpy as np
from nes_py.wrappers import JoypadSpace
#BinarySpaceToDiscreteSpaceEnv
#from nes_py.wrappers import BinarySpaceToDiscreteSpaceEnv
import gym_super_mario_bros
from gym_super_mario_bros.actions import RIGHT_ONLY
from agent import DQNAgent
# from gym import wrappers
from wrappers import wrapper



# Build env (first level, right only)
env = gym_super_mario_bros.make('SuperMarioBros-1-1-v0')
#env = BinarySpaceToDiscreteSpaceEnv(env, RIGHT_ONLY)
Expand Down
3 changes: 3 additions & 0 deletions super-mario-reinforcement-learning/models/checkpoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
model_checkpoint_path: "model-1000000"
all_model_checkpoint_paths: "model-500000"
all_model_checkpoint_paths: "model-1000000"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions super-mario-reinforcement-learning/replay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from agent import DQNAgent
from nes_py.wrappers import BinarySpaceToDiscreteSpaceEnv
import gym_super_mario_bros
from gym_super_mario_bros.actions import RIGHT_ONLY
from wrappers import wrapper


# Build env
env = gym_super_mario_bros.make('SuperMarioBros-1-1-v0')
env = BinarySpaceToDiscreteSpaceEnv(env, RIGHT_ONLY)
env = wrapper(env)

# Parameters
states = (84, 84, 4)
actions = env.action_space.n

# Agent:q
agent = DQNAgent(states=states, actions=actions, max_memory=100000, double_q=True)

# Replay
agent.replay(env=env, model_path='./models/final-vm-1', n_replay=1, plot=True)
116 changes: 116 additions & 0 deletions super-mario-reinforcement-learning/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
absl-py==0.9.0
apturl==0.5.2
asn1crypto==0.24.0
astor==0.8.1
atari-py==0.2.6
-e git+https://github.com/openai/baselines.git@ea25b9e8b234e6ee1bca43083f8f3cf974143998#egg=baselines
bcrypt==3.1.6
blinker==1.4
Brlapi==0.6.7
certifi==2018.8.24
cffi==1.14.0
chardet==3.0.4
click==7.1.1
cloudpickle==1.2.2
command-not-found==0.3
cryptography==2.6.1
cupshelpers==1.0
cycler==0.10.0
Cython==0.29.16
dbus-python==1.2.12
defer==1.0.6
dill==0.3.1.1
distro==1.3.0
distro-info===0.21ubuntu4
duplicity==0.8.4
entrypoints==0.3
fasteners==0.12.0
future==0.16.0
gast==0.3.3
glfw==1.11.0
google-pasta==0.2.0
grpcio==1.28.1
gym==0.17.1
gym-pull==0.1.7
gym-super-mario-bros==7.3.0
h5py==2.10.0
httplib2==0.11.3
idna==2.6
imageio==2.8.0
joblib==0.14.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
keyring==18.0.1
keyrings.alt==3.1.1
kiwisolver==1.2.0
language-selector==0.1
launchpadlib==1.10.7
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
lockfile==0.12.2
louis==3.10.0
macaroonbakery==1.2.3
Mako==1.0.7
Markdown==3.2.1
MarkupSafe==1.1.0
matplotlib==3.2.1
monotonic==1.5
mpi4py==3.0.3
nes-py==8.1.1
netifaces==0.10.4
numpy==1.18.2
oauthlib==2.1.0
olefile==0.46
opencv-python==4.2.0.34
paramiko==2.6.0
pexpect==4.6.0
Pillow==6.1.0
progressbar2==3.50.1
protobuf==3.6.1
pycairo==1.16.2
pycparser==2.20
pycrypto==2.6.1
pycups==1.9.73
pyglet==1.5.3
PyGObject==3.34.0
PyJWT==1.7.0
pymacaroons==0.13.0
PyNaCl==1.3.0
pyparsing==2.4.7
pyRFC3339==1.1
python-apt==1.9.0+ubuntu1.3
python-dateutil==2.7.3
python-debian==0.1.36
python-gflags==3.1.2
python-utils==2.4.0
pytz==2019.2
pyxdg==0.25
PyYAML==5.1.2
pyzmq==19.0.0
reportlab==3.5.23
requests==2.21.0
requests-unixsocket==0.1.5
scipy==1.4.1
SecretStorage==2.3.1
simplejson==3.16.0
six==1.12.0
system-service==0.3
systemd-python==234
tensorboard==1.14.0
tensorflow==1.14.0
tensorflow-estimator==1.14.0
termcolor==1.1.0
tqdm==4.45.0
ubuntu-advantage-tools==19.5
ubuntu-drivers-common==0.0.0
ufw==0.36
unattended-upgrades==0.1
urllib3==1.24.2
usb-creator==0.3.7
virtualenv==15.1.0
wadllib==1.3.3
Werkzeug==1.0.1
wrappers==0.1.9
wrapt==1.12.1
xkit==0.0.0
zmq==0.0.0
14 changes: 0 additions & 14 deletions test.py

This file was deleted.