This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def act(dom_tree, action_history, viewport): | |
""" | |
Perform an action on the DOM tree. | |
Input: | |
- dom_tree: html / xml DOM tree of the page | |
- action_history: action history with instructions from the user | |
- viewport: the viewport of the browser | |
Output: | |
- action: the action performed in WebLINX format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Dict, Any | |
import torch | |
import wandb | |
import numpy as np | |
import d3rlpy | |
from d3rlpy.datasets import get_cartpole | |
from d3rlpy.algos import DQNConfig | |
from d3rlpy.metrics import TDErrorEvaluator, EnvironmentEvaluator |