GithubHelp home page GithubHelp logo

stanislavski's Introduction

Stanislavski

pow gym environment

Implemenation of a proof of work algorithm powered by wittgenstein that can be run as a GYM environement and used for Reinforcement learning.

Dependencies

To get started you will need to install some dependencies

pip3 install gym
pip3 install Cython
pip3 install pyjnius

You will also need to install some wittgenstein files: If you don't have the Wittgenstein repo already

git clone https://github.com/ConsenSys/wittgenstein.git
cd wittgestein
gradle clean shadowJar

This will allow you to call and run the Java code from python by creating a set of Jar files that will be . accessed through the pyjnius library.

Configuring path

You need to setup the path to the to the JAR files in your computer in the pow_env.py file by changing the path in the jnius_config.set_classpath() :

import jnius_config
  jnius_config.set_classpath('.', './build/libs/wittgenstein-all.jar')
  from jnius import autoclass
  p = autoclass('net.consensys.wittgenstein.protocols.ethpow.ETHMinerAgent').create(0.25)
  p.init()

Setup GYM_POW

Once you have run all the steps above go to the root folder where you see the gym_pow folder and run:

pip3 install -e gym_pow

Now you can call the environment and use any model you find suitable to train your agent. You can . build your pow_gym environment by using:

import gym
import gym_pow

env = gym.make('pow-v0')

You can also run the test file that will run the environment and print observations from pow

python3 test.py

stanislavski's People

Contributors

vanessabridge avatar nkeywal avatar

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.