Giter Site home page Giter Site logo

sheng-j / dom-q-net Goto Github PK

View Code? Open in Web Editor NEW
45.0 2.0 10.0 1.85 MB

Graph-based Deep Q Network for Web Navigation

Python 96.01% Shell 3.99%
reinforcement-learning graph-neural-networks qlearning dqn-pytorch rainbow-dqn graph-based-learning rl

dom-q-net's Introduction

DOM-Q-NET: Grounded RL on Structured Language

"DOM-Q-NET: Grounded RL on Structured Language" International Conference on Learning Representations (2019). Sheng Jia, Jamie Kiros, Jimmy Ba. [arxiv] [openreview]
Architecture

Demo

Trained multitask agent: https://www.youtube.com/watch?v=eGzTDIvX4IY
Facebook login: https://www.youtube.com/watch?v=IQytRUKmWhs&t=2s

Requirement

Need to download selenium & install chrome driver for selenium..

Installation

  1. Clone this repo
  2. Download MiniWoB++ environment from the original repo https://github.com/stanfordnlp/miniwob-plusplus
    and copy miniwob-plusplus/html folder to miniwob/html in this repo
  3. In fact, this html folder could be stored anywhere, but remember to perform one of the following actions:
  • Set environment variable "WOB_PATH" to
    file://"your-path-to-miniwob-plusplus"/html/miniwob
    E.g. "your-path-to-miniwob-plusplus" is "/h/sheng/DOM-Q-NET/miniwob
  • Directly modify the base_url on line 33 of instance.py to
    "your-path-to-miniwob-plusplus"/html/miniwob
    In my case, base_url='file:///h/sheng/DOM-Q-NET/miniwob/html/miniwob/'

Run experiment

Experiment launch files are stored under runs For example,

cd runs/hard2medium9tasks/
sh run1.sh

will launch a 11 multi-task (social-media search-engine login-user enter-password click-checkboxes click-option enter-dynamic-text enter-text email-inbox-delete click-tab-2 navigation-tree) experiment.

Multitask Assumptions

State & Action restrictions

Item Maximum number of items
DOM tree leaves (action space) 160
DOM tree 200
Instruction tokens 16

Attribute embeddings & vocabulary

Attribute max vocabulary Embedding dimension
Tag 100 16
Text (shared with instructions) 600 48
Class 100 16
  • UNKnown tokens
    These are assigned to a random vector such that the cosine distance with the text attribute can yield 1.0 for the direct alignment.

Acknowledgement

Credit to Dopamine for the implementation of prioritized replay used in dstructs/dopamine_segtree.py

dom-q-net's People

Contributors

sheng-j avatar

Stargazers

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

Watchers

 avatar  avatar

dom-q-net's Issues

Trying to reproduce facebook login

Hi,
I am trying to reproduce facebook login demo by running the hard2medium9tasks and facing the following challenges -

  • Linking the code to live browser instance and sending commands from terminal: I came across demo.py file and it looks like it runs on the miniWob examples. It will be great if you can provide a demo file which can be used to test on any website through command input via terminal.
  • Generalization accuracy for facebook (or other websites) login - I trained the hard2medium9tasks model for 30000 iterations and tried running login user scenario for miniWob websites and the average reward is consistently 1. But when I used this model on facebook webpage (passed the static webpage content through miniwob), the reward is -1. I can see the model able to detect the input fields but not able to paste the right username and password fields. I would like to know if I have to run for 150000 iterations or I can see better results at a lower number of iterations.

Question about PR - It will be great to know if your repository is open for PRs and open-source contributions.

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.