Gym for your AI to connect with the internet and play around.
Project description
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 languageAction.args
: This dictionary is automatically extracted from thetext
and before calling each action user has to fill this usingAction.fill_values()
method. Any discrepancy is automatically caughtAction.step()
: This method recieves theselenium 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:
- Machine Learning Street Talk - Francois Chollet - On the Measure Of Intelligence
- ARC Challenge
- Intelligence Wikipedia
- AGI Wiki
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file igym-0.0.3.tar.gz
.
File metadata
- Download URL: igym-0.0.3.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ff463f0d6c1f8a75ff9e37cf505231b5e7dc7c8de57b1b07dcedd7275e4dc21 |
|
MD5 | 871ad6b04d0cc1a6479e5ab22c2db941 |
|
BLAKE2b-256 | fa4c3f1e5b3ad1fb5558361233ffc682a6285f3529f00790be2321b1d30cb396 |