• Stars
    star
    260
  • Rank 151,872 (Top 4 %)
  • Language
    HTML
  • License
    MIT License
  • Created about 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MiniWoB++: a web interaction benchmark for reinforcement learning

pre-commit Code style: black

The MiniWoB++ (Mini World of Bits++) library contains a collection of over 100 web interaction environments, along with JavaScript and Python interfaces for programmatically interacting with them. The Python interface follows the Gymnasium API and uses Selenium WebDriver to perform actions on the web browser.

MiniWoB++ is an extension of the OpenAI MiniWoB benchmark, and was introduced in the paper Reinforcement Learning on Web Interfaces using Workflow-Guided Exploration.

The documentation website is at miniwob.farama.org. Development on MiniWoB++ is currently ongoing to bring it up to Farama Standards for mature projects, and will be maintained long term after this point. See the Project Roadmap for more details. If you'd like to help out, you can join our discord server here: https://discord.gg/PfR7a79FpQ.

Installation

MiniWoB++ supports Python 3.8+ on Linux and macOS.

Installing the MiniWoB++ Library

To install the MiniWoB++ library, use pip install miniwob.

Installing Chrome/Chromium and ChromeDriver

We strongly recommend using Chrome or Chromium as the web browser, as other browsers may render the environments differently.

The MiniWoB++ Python interface uses Selenium, which interacts with the browser via the WebDriver API. Follow one of the instruction methods to install ChromeDriver. The simplest method is to download ChromeDriver with the matching version, unzip it, and then add the directory containing the chromedriver executable to the PATH environment variable:

export PATH=$PATH:/path/to/chromedriver

For Chromium, the driver may also be available in a software package; for example, in Debian/Ubuntu:

sudo apt install chromium-driver

Example Usage

The following code performs a deterministic action on the click-test-2 environment.

import time
import gymnasium
from miniwob.action import ActionTypes

env = gymnasium.make('miniwob/click-test-2-v1', render_mode='human')

# Wrap the code in try-finally to ensure proper cleanup.
try:
  # Start a new episode.
  obs, info = env.reset()
  assert obs["utterance"] == "Click button ONE."
  assert obs["fields"] == (("target", "ONE"),)
  time.sleep(2)       # Only here to let you look at the environment.
  
  # Find the HTML element with text "ONE".
  for element in obs["dom_elements"]:
    if element["text"] == "ONE":
      break

  # Click on the element.
  action = env.create_action(ActionTypes.CLICK_ELEMENT, ref=element["ref"])
  obs, reward, terminated, truncated, info = env.step(action)

  # Check if the action was correct. 
  print(reward)      # Should be around 0.8 since 2 seconds has passed.
  assert terminated is True
  time.sleep(2)

finally:
  env.close()

See the documentation for more information.

Environments

The list of the environments that were included in the MiniWoB++ library can be found in the documentation. All environments share the same observation space, while the action space can be configured during environment construction.

Citation

To cite this project please use:

@inproceedings{liu2018reinforcement,
 author = {Evan Zheran Liu and Kelvin Guu and Panupong Pasupat and Tianlin Shi and Percy Liang},
 title = {Reinforcement Learning on Web Interfaces using Workflow-Guided Exploration},
 booktitle = {International Conference on Learning Representations ({ICLR})},
 url = {https://arxiv.org/abs/1802.08802},
 year = {2018},
}

More Repositories

1

Gymnasium

An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
Python
5,815
star
2

PettingZoo

An API standard for multi-agent reinforcement learning environments, with popular reference environments and related utilities
Python
2,392
star
3

HighwayEnv

A minimalist environment for decision-making in autonomous driving
Python
2,382
star
4

Arcade-Learning-Environment

The Arcade Learning Environment (ALE) -- a platform for AI research.
C++
2,078
star
5

Minigrid

Simple and easily configurable grid world environments for reinforcement learning
Python
2,016
star
6

ViZDoom

Reinforcement Learning environments based on the 1993 game Doom :godmode:
C++
1,673
star
7

chatarena

ChatArena (or Chat Arena) is a Multi-Agent Language Game Environments for LLMs. The goal is to develop communication and collaboration capabilities of AIs.
Python
1,227
star
8

D4RL

A collection of reference environments for offline reinforcement learning
Python
1,201
star
9

Metaworld

Collections of robotics environments geared towards benchmarking multi-task and meta reinforcement learning
Python
1,116
star
10

Miniworld

Simple and easily configurable 3D FPS-game-like environments for reinforcement learning
Python
672
star
11

Gymnasium-Robotics

A collection of robotics simulation environments for reinforcement learning
Python
437
star
12

SuperSuit

A collection of wrappers for Gymnasium and PettingZoo environments (being merged into gymnasium.wrappers and pettingzoo.wrappers
Python
432
star
13

MicroRTS

A simple and highly efficient RTS-game-inspired environment for reinforcement learning
Java
267
star
14

MO-Gymnasium

Multi-objective Gymnasium environments for reinforcement learning
Python
241
star
15

Minari

A standard format for offline reinforcement learning datasets, with popular reference datasets and related utilities
Python
219
star
16

MicroRTS-Py

A simple and highly efficient RTS-game-inspired environment for reinforcement learning (formerly Gym-MicroRTS)
Python
210
star
17

D4RL-Evaluations

Python
184
star
18

MAgent2

An engine for high performance multi-agent environments with very large numbers of agents, along with a set of reference environments
C++
183
star
19

stable-retro

Retro games for Reinforcement Learning
C
124
star
20

Shimmy

An API conversion tool for popular external reinforcement learning environments
Python
118
star
21

AutoROM

A tool to automate installing Atari ROMs for the Arcade Learning Environment
Python
75
star
22

gym-examples

Example code for the Gym documentation
Python
66
star
23

Jumpy

On-the-fly conversions between Jax and NumPy tensors
Python
43
star
24

gym-docs

Code for Gym documentation website
39
star
25

CrowdPlay

A web based platform for collecting human actions in reinforcement learning environments
Jupyter Notebook
26
star
26

Procgen2

Fast and procedurally generated side-scroller-game-like graphical environments (formerly Procgen)
C++
24
star
27

momaland

Benchmarks for Multi-Objective Multi-Agent Decision Making
Python
22
star
28

TinyScaler

A small and fast image rescaling library with SIMD support
C
19
star
29

rlay

A relay between Gymnasium and any software
Rust
7
star
30

gymnasium-env-template

A template gymnasium environment for users to build upon
Jinja
6
star
31

farama.org

HTML
2
star
32

A2Perf

A2Perf is a benchmark for evaluating agents on sequential decision problems that are relevant to the real world. This repository contains code for running and evaluating participant's submissions on the benchmark platform.
Python
2
star
33

gym-notices

Python
1
star
34

Celshast

Sass
1
star
35

MPE2

1
star
36

Farama-Notifications

Allows for providing notifications on import to all Farama Packages
Python
1
star
37

a2perf-benchmark-submission

Python
1
star
38

a2perf-web-nav

HTML
1
star
39

a2perf-quadruped-locomotion

Python
1
star
40

a2perf-reliability-metrics

Python
1
star
41

a2perf-code-carbon

Jupyter Notebook
1
star