Skip to main content

internet-gym

Gym for your AI to connect with the internet and play around. This framework is written with language models in mind as the actions are described in natural language and agent has to understand that in order to get to target. Read how below.

Installation

Install using pipy as:

pip install igym

Usage

The syntax is same as OpenAI gym while the internals are completely different.

from igym import InternetEnv, DefaultActions

# initialise the environment
env = InternetEnv("path/to/chromedriver")

target = "Google Elon Musk"  # type instruction and send to your model
while True:
  action = model(target, DefaultActions, env.state)
  env.step(action)
  
  if target_achieved:
    break

There are ofcourse challenges here such as open-ended generations and no rewards. Still confused, check out this notebook.

How?

At the core of this framework is igym.core.Action which has two attributes and one method:

  • Action.text: Template string that explains the purpose of this Action in natural language
  • Action.args: This dictionary is automatically extracted from the text and before calling each action user has to fill this using Action.fill_values() method. Any discrepancy is automatically caught
  • Action.step(): This method recieves the selenium WebDriver object and it performs the action on the driver.

The text of Action and step() are thus a pair and agent has to navigate this to complete the objective.

Sample

A sample using Language models can be found in this notebook.

Why?

There are a tonne of good ideas and philosophy of what intelligence exactly is, some of the things:

and on ... and on ... and on. However only a few people write about the use the AI as a tool and when they do mention it, it is usually as the assumption and focus is on generalisation or solving a specific problem / benchmark.

I am arguing that form follows function and thus the building blocks of AGI should be based on function.

This project aims to test the ability of language models to travel the internet and answer questions. If it can travel the internet, then it can answer questions far better than any human individual can based on the amount of cached information on Google.

Metadata

Release files for igym 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for igym 0.0.3
File Size Uploaded
igym-0.0.3.tar.gz 5.2 kB Details

Release files / igym-0.0.3.tar.gz

Download URL igym-0.0.3.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5ff463f0d6c1f8a75ff9e37cf505231b5e7dc7c8de57b1b07dcedd7275e4dc21
BLAKE2b-256 checksum
How to use checksums
fa4c3f1e5b3ad1fb5558361233ffc682a6285f3529f00790be2321b1d30cb396
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page