GithubHelp home page GithubHelp logo

frl's Introduction

FRL

Code for the paper 'Federated Reinforcement Learning'

Running

GridWrold

All arguments are preset in main.py, so you can start training the FRL model by:

$ python main.py

If you want a more robust result, try the following command, which will train and test the FRL model for $k$ times and save the average results.

$ bash both_train.sh

For training the baseline model, DQN-alpha, run the following command:

$ bash alpha_train.sh

For DQN-full, run:

$ bash full_train.sh

Text2Action (EASDRL)

There are three sub-domains in Text2Action: win2k, wikihow and cooking. For each sub-domain, you need to train both Action-Name Extractor and Action-Argument Extractor.

All parameters are preset in main.py, but you need to change some of them according to the sub-domain and the type of extractor.

Train FRL model

Take win2k sub-domain as an example.

  • To train and test the Action-Name Extractor, run:
$ python main.py --domain 'win2k' --agent_mode 'act' --predict_net 'both' --train_mode 'frl_separate' --result_dir 'test_frl_act'
  • where domain indicates the name of sub-domains, agent_mode indicates the type of extractor, predict_net and train_mode indicate the model name.
  • For Action-Argument Extractor, change the agent_mode to arg and run:
$ python main.py --domain 'win2k' --agent_mode 'arg' --predict_net 'both' --train_mode 'frl_separate' --result_dir 'test_frl_arg'

You can easily change the parameter --domain to 'cooking' or 'wikihow' and repeat the procedure to train models for the other two sub-domains.

Train DQN-alpha model

Take win2k sub-domain as an example.

  • To train and test the Action-Name Extractor, run:
$ python main.py --domain 'win2k' --agent_mode 'act' --predict_net 'alpha' --train_mode 'single_alpha' --result_dir 'test_dqn_alpha_act'
  • For Action-Argument Extractor, change the agent_mode to arg and run:
$ python main.py --domain 'win2k' --agent_mode 'arg' --predict_net 'alpha' --train_mode 'single_alpha' --result_dir 'test_dqn_alpha_arg'

You can easily change the parameter --domain to 'cooking' or 'wikihow' and repeat the procedure to train models for the other two sub-domains.

Train DQN-full model

Take win2k sub-domain as an example.

  • To train and test the Action-Name Extractor, run:
$ python main.py --domain 'win2k' --agent_mode 'act' --predict_net 'full' --train_mode 'full' --result_dir 'test_dqn_full_act'
  • For Action-Argument Extractor, change the agent_mode to arg and run:
$ python main.py --domain 'win2k' --agent_mode 'arg' --predict_net 'full' --train_mode 'full' --result_dir 'test_dqn_full_arg'

You can easily change the parameter --domain to 'cooking' or 'wikihow' and repeat the procedure to train models for the other two sub-domains.

frl's People

Contributors

acelove avatar frl2019 avatar

Stargazers

Habibur Rahman 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.