Giter Site home page Giter Site logo

Comments (5)

pgawlowicz avatar pgawlowicz commented on May 24, 2024

Hi,

The dqn-agent-v1.py is not generic and will work only with 5 nodes. If you change the node number to 6, then the action vector should contain 6 values , but in a current version, it still sends a vector with 5 elements.

You can simply extend it to more nodes or make it more generic - i.e. independent of the number of nodes.

The linear-mesh ns3 simulation script is generic. To test it please play with no_op2.py that is independent of number of nodes, i.e. you can change it easily.

Best,
Piotr

from ns3-gym.

hzr1140521792 avatar hzr1140521792 commented on May 24, 2024

I got it,thank you very much.

from ns3-gym.

hzr1140521792 avatar hzr1140521792 commented on May 24, 2024

But I hava another question.Did you write all of your param of environment in the file sim.cc,but how
can you use it with python,these code are written with C++?

from ns3-gym.

pgawlowicz avatar pgawlowicz commented on May 24, 2024

This part of the code allows you to pass command line arguments to the ns-3 process, that will be started by ns3gym. Of course those command line parameters have to be parsed correctly in ns3 simulation script, here called sim.cc:

simArgs = {"--simTime": simTime,
       "--testArg": 123,
       "--nodeNum": 5,
       "--distance": 500}

env = ns3env.Ns3Env(port=port, stepTime=stepTime, startSim=startSim, simSeed=seed, simArgs=simArgs, debug=debug)

from ns3-gym.

hzr1140521792 avatar hzr1140521792 commented on May 24, 2024

OK,I got it.Thank you very much.

from ns3-gym.

Related Issues (20)

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.