GithubHelp home page GithubHelp logo

skynet-code's Introduction

skynet-code

Problem

  1. Description:
  • Network Topology = Graph = Adjacency Matrix over all nodes in the network.
  • Flows = (src, dst) = Partial Routes = Dynamic State
  • Policies =
    Reachability to dst. Matrix of size #flows * #nodes. 1 for (flow_i, src_i) and (flow_i, dst_i).
    (Soft) Isolation Policy = Flow i and j should not share any link. Matrix of size #flows * #flows. (flow_i, flow_j) = 1 and (flow_j, flow_i) = 1.
  1. Decompose this problem:
  • Initial State (s_0): Each flow is at node src. Matrix of size #flows * #nodes. (flow_i, src_i) = 1
  • We extend each flow by one hop at a time.
  • Round Robin over Flows
  • State: Topology, Partial Routes for each Flow, Current Active Flow, Next Hops (set of neighboring nodes which have not been visited and are reachable to the destination)
  • Action: Which Next Hop to Choose?

Brain

  1. train_queue = interactions with the environment = current state (s), action (a), immediate reward (r), next state (s’)
  2. Reward: discounted over n-steps with gamma discounting factor = sum from i = 0 to n-steps gamma^i * r_i
  3. Graph Neural Net (Policy Model i.e. Actor-Critic Model) = inputs = state and output = next hop

Environment

  1. env.reset = state_0 = Topology is always constant.
    The flows and policies have an upper bound =
    You pick the same set of flows and same set of policies, OR
    You randomly pick set of flows and set of policies.
  • Agent = Wrapper Around the Brain Model
  1. action = agent.act(current_state) ← does inference on the policy i.e., actor model
  2. next_state, reward = env.step(action)
  3. repeated to get an episode (populate the train_queue)

Optimizer

  1. Batched Training : When train_queue is sufficiently full
  2. brain.optimize(): backprop on the actor-critic model → you get updated actor-critic model

Main

  1. while True:
    Optimizer+Brain initialization => start filling the train_queue
    Environment => run episodes with the current version of the brain i.e., the actor-critic policy model
    After recording episodes and filling the train_queue you train and update Brain

skynet-code's People

Contributors

kshiteejm avatar teja5832 avatar

Watchers

 avatar  avatar Archie avatar Srivatsan Ramesh avatar Avichal Rakesh 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.