Git Product home page Git Product logo

retro-contest's Introduction

Status: Archive (code is provided as-is, no updates expected)

OpenAI Retro Contest

retro-contest's People

Contributors

ankeshanand avatar christopherhesse avatar conradbailey avatar drwaltman avatar kiaragrouwstra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retro-contest's Issues

Hosting my own remote-env (with roms) on AWS

Hi, this is rather complicated I know, but there's no doccumentation on this and I'm a bit lost.

I want to run the remote-env and simple-agent docker containers on AWS Fargate, with them able to communicate with one another. That is the high-level goal.

So far I have built each, and put them both on ECS. However, I dont understand how to run with custom remote-env's.

I am trying this:

sudo retro-contest docker SonicTheHedgehog-Genesis GreenHillZone.Act1 --agent <my agent docker tag> --remote_env <my env docker tag>  --results-dir results --no-nv

And getting nothing.

None of the --help commands are very informative.

Thanks for your help.

Metalearner? Fast Learner? Two concepts are ambiguous

In main page, two concepts, meta-learner and fast learner, are appeared in figure.
https://contest.openai.com/

However, two concepts are ambiguous to me.
I need more explanation.

  • Is the term 'learner' is same as agent?
  • What does the term 'fast' mean in 'fast learner'?
  • What does the term 'meta' mean in 'meta-learner'?

Due to this ambiguity, I'm so confused what the goal is in this contest.
When we develop algorithm, what limitations are considered?

I need your help.

Cudnn Error when running retro-baselines jobs (Nvidia-cuda docker error)

I got such error when running a retro-baselines ppo2 job (directly using ppo2.docker):
ted and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead WARNING:tensorflow:From /root/venv/lib/python3.5/site-packages/baselines/common/distributions.py:147: calling reduce_sum (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead 2018-04-09 04:27:06.399347: E tensorflow/stream_executor/cuda/cuda_dnn.cc:396] Loaded runtime CuDNN library: 7102 (compatibility version 7100) but source was compiled with 7005 (compatibility version 7000). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration. 2018-04-09 04:27:06.399956: F tensorflow/core/kernels/conv_ops.cc:712] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo<T>(), &algorithms)

It seems that the test server installed an unsuitable cudnn version (Tensorflow requires cudnn 7.0).

Prevent early resets?

Currently, it is possible to reset() a remote environment before the end of the episode. I do not think we want to allow this.

Code of local evaluations is not working

In "Details", the way to run local evaluation is explained.

$ retro-contest run --agent $DOCKER_REGISTRY/simple-agent:v1 \
    --results-dir results --no-nv Airstriker-Genesis Level1

but, this command is not working.
error message is..

usage: retro-contest [-h] {} ...
retro-contest: error: invalid choice: 'run' (choose from )

I'm not sure whether 'retro-contest' is well installed or not.

ps. retro pkg installed in my notebook

gym-retro (0.5.3.dev2+g8ffbbd1, /Users/vics/work/rl/retro)
retro-contest-support (0.1.0, /Users/vics/work/rl/retro-contest/support)

Access to data.json?

Can I access sonic info from data.json in a retro-contest agent?
I found the info was not synced from server channel.

website doc improvement

how about referencing $docker_registry_url etc., so people can more easily copy and paste code?

module 'retro' has no attribute 'STATE_DEFAULT'

Hi, I tried to run random-agent-contest.py and got this weird error.

Traceback (most recent call last):
File "random-agent-contest.py", line 1, in
from retro_contest.local import make
File "/home/jim/Downloads/retro-contest/support/retro_contest/local.py", line 6, in
def make(game, state=retro.STATE_DEFAULT, discrete_actions=False, bk2dir=None):
AttributeError: module 'retro' has no attribute 'STATE_DEFAULT'

Does anyone know why?

error when import sega_classics

when I run on mac
python -m retro.import.sega_classics

it shows that
Steam Guard code: 8H42C
Downloading games...
"@sSteamCmdForcePlatformType" = "windows"
ERROR! Failed to install app '34270' (No subscription)

and, do I need to pay for all the games before importing them?

Are the test levels available?

I would like to expand the number of levels the agent I am training to play sonic has to test on while allowing for comparisons to be drawn to the results of the contest, if I perhaps discover some method that beats a previously unbeatable level. Have you made available the test levels used in the competition for download?

env.step is slow

I'm finding that my training episodes take many seconds (sometimes as much as 30s) each to run. I believe the culprit is env.step:

%timeit env.step(env.action_space.sample())
> 3.21 ms ± 50.8 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

Multiply that by a thousands of steps per episode and it explains why episodes take so long to run.
Is there anything I can do to get env.step running faster? Is it rate-limited?

p.s. kudos on making a great emulator!

[retro-contest] error at bridge.py on Windows

I am using windows 10. tried to retro-contest-run rainbow agent.
while running, I got error like this

D:\project>retro-contest run --agent $DOCKER_REGISTRY/rainbow_agent:v1 --results-dir results --no-nv --use-host-data SonicTheHedgehog-Genesis GreenHillZone.Act1

Traceback (most recent call last):
File "/root/compo/agent.py", line 46, in
main()
File "/root/compo/agent.py", line 22, in main
env = AllowBacktracking(make_env(stack=False, scale_rew=False))
File "/root/compo/sonic_util.py", line 15, in make_env
env = grc.RemoteEnv('tmp/sock')
File "/root/venv/lib/python3.5/site-packages/gym_remote/client.py", line 15, in init
self.bridge.connect()
File "/root/venv/lib/python3.5/site-packages/gym_remote/bridge.py", line 251, in connect
self.sock.connect(sock_path)
FileNotFoundError: [Errno 2] No such file or directory
Remote exited uncleanly: 1
Agent exited uncleanly 1

Installation issue from beta tester

might be worth a hint in the error message or readme

Sonic install failed silently until I figured out how to do this part. I couldn't leave it blank.

"Steam Guard code (leave blank if unknown):"

bridge.py not working on Windows

it is called by retro-baselines main func.
env = AllowBacktracking(make_env(stack=False, scale_rew=False))

bridge.py line 152
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)

  • AF_UNIX is not defined in windows. (should be changed to AF_INET)

bridge.py line 251
self.sock.connect(sock_path)

  • it's UDS (tmp/socket) windows socket.connect needs tuple as arg.

(or maybe I need to use docker )

How to create multiple environments as in A3C/A2C

It's mentioned in https://contest.openai.com/details that

You can only have one environment per process due to limitations of the libretro API. If you want more than that, you can create subprocesses.

I'd like to know what's the proper way to create subprocesses in docker for submitting to the test server. As shown in the sample codes, the environment API is

> import gym_remote.client as grc
> env = grc.RemoteEnv('tmp/sock')

But when I do:

> def make_env():
>    def _thunk():
>        print('Initiation...')
>        env = grc.RemoteEnv('tmp/sock')
>        print('ok')
>        return env
>    return _thunk

> from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv
> num_processes = 2
> envs = [make_env() for i in range(num_processes)]
> envs = SubprocVecEnv(envs)

The second environment hangs when I run locally in my docker. It seems to also hang on the submission server.

However, this works fine locally in my docker:

> from retro_contest.local import make
> def make_env():
>    def _thunk():
>        print('Initiation...')
>        env = make(game='SonicTheHedgehog-Genesis', state='LabyrinthZone.Act1')
>        print('ok')
>        return env
>    return _thunk

> from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv
> num_processes = 2
> envs = [make_env() for i in range(num_processes)]
> envs = SubprocVecEnv(envs)

Any useful suggestion/code snippets that might point me to the right direction is much appreciated.

Possible error in contest description?

Hi,

The details page says:

For the leaderboard, your submission will be run against a set of environments from the training set. While this does not indicate how well your submission will do on the final test, it is useful for checking that you are not overfitting to the training set.

Should it really say "the training set" in the first sentence?

retro-contest does not exit with an appropriate status

I've been scripting my job submission process, and in that script I test the exit status of commands like retro-contest submit and retro-contest login. I know in particular that these two commands don't exit with non-zero statuses when errors have occurred, and I believe this issue extends to other commands as well. I know it is only convention, but it is a fairly common convention.

Error occur in image openai/retro-agent:pytorch-0.3

Code

import gym_remote.client as grc


if __name__ == '__main__':
    for i in range(10):
        env = grc.RemoteEnv('tmp/sock')
        env.reset()
        while True:
            env.step(env.action_space.sample())

Error

Traceback (most recent call last):
  File "/root/compo/main.py", line 15, in <module>
    env.step(env.action_space.sample())
  File "/root/venv/lib/python3.5/site-packages/gym_remote/client.py", line 35, in step
    self.bridge.recv()
  File "/root/venv/lib/python3.5/site-packages/gym_remote/bridge.py", line 323, in recv
    self._message_handlers[message['type']](message['content'])
  File "/root/venv/lib/python3.5/site-packages/gym_remote/bridge.py", line 165, in exception
    raise gre.make(message['exception'], message['reason'])
gym_remote.exceptions.ResetError: None
Agent exited uncleanly 1

DockerFile

FROM openai/retro-agent:pytorch-0.3

RUN apt-get update --fix-missing

# Requirements
RUN . ~/venv/bin/activate && \
    pip install --upgrade pip && \
    pip install Pillow

# File copy
COPY src/*.py ./

# RUN
CMD ["python", "-u", "/root/compo/main.py"]

enable jobs queue

Greetings,

Is it possible to queue up the next job on the submissions page rather than cancel the currently running one?

Thanks,
rob

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.