Giter Site home page Giter Site logo

dc-drl's Introduction

DC-DRL

Distributed and Collective Deep Reinforcement Learning for Computation Offloading: A Practical Perspective

Python code for our work, it includes:

  • simulation code for mutli-user computation offloading
  • testbed code to run experiment on Raspberry pis

Require Packages

  • numpy
  • pytorch
  • gym
  • face-recognition
  • redis

How the code works

this code has two part: simuation code and testbed code

Simulation code

To run simulation, you should:

step 1: deploy the master agent and client agents (PS: you can also run the distributed code on single machine by changing the host to 127.0.0.1)

step 2: start redis database, we use it to control the experiences and models

step 3: run the following python file:

  • parameter_server.py: deploy on the master side, which is responsible to:
    • handle model request from clients
    • reveive model and experience sent from clients
    • generate the next model
  • master.py: deploy on the master side, which is responsible to training with the experience it collected and received from client, generally, it can provide a more compresensive than client agent as it has richer experiences
  • client.py: deploy on the client side, which is responsible to interacting with env. and collect experience, multiple clients can provide higher diversity

testbed code

To validate the practicality and applicability of the DC-DRL algorithm, we build a real multi-user computation offloading testbed with Raspberry Pi 3B and PC.

The Raspberry Pi 3B should install face_recognition and opencv, you can find an useful instruction in:

Available image for our experiment to save your effort in configuring environment:

We also provide some files to test if your envs. can work:

  • facerec_from_video_file.py
  • facerec_from_camera.py

After you have setup the Raspbery Pi, you can run the experiment by:

  • deploy DC-DRL on Raspberry Pi, run client.py
  • deploy DC-DRL on PC, run server.py

dc-drl's People

Contributors

qiuxy23 avatar

Stargazers

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

Watchers

 avatar

dc-drl's Issues

您好,求助!

您好,最近看了您的论文,对您的实验十分感兴趣但是再复现实验的过程中遇到了一些问题,可以将您的源代码发送一份给我吗?邮箱:[email protected],不盛感激,github上的代码缺失的部分较多,我在复现时有较多的问题导致无法实现。望您看到后回复,谢谢!

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.