Giter Site home page Giter Site logo

working-gym-java-client's Introduction

JAVA CLIENT for OPEN AI GYM HTTP SERVER

A simple java client to access the OpenAI Gym HTTP Server. I tried looking for an existing java client, but the only one I found I couldn't get to work, so I decided to make one myself.

This project is primarily focussed on simplicity, so I minimized reliance on dependencies (only 1 for JSON (in addition to some standard Java libs)), and tried to keep the code itself easy to understand and modify.

Setup:

Clone or download this project (Import project from git if using Eclipse or other IDE).

Install this JSON jar: http://central.maven.org/maven2/org/json/json/20180130/json-20180130.jar.

Add that JSON jar to the project as an external archive (Build Path / Add External Archives in Eclipse).

See src/agent/SampleAgent.java for an example.

You may have to delete previous run configurations before running the first time (if applicable to your setup).

Todo:

Right now some api calls return ugly stuff, eg. resetEnv returns an Object which is probably a JSONArray. This is because different environments may return different things. I will get around to create wrapper functions which extract the needed variables from such Objects automatically for common formats that may be seen. For now, it is not too difficult to deal with, look at the Sample Agent for examples.

working-gym-java-client's People

Contributors

ryan-amaral avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jose-solorzano

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.