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
Built Distribution
File details
Details for the file igym-0.0.2.tar.gz
.
File metadata
- Download URL: igym-0.0.2.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 | 9161615d9bd78d9bf57e5afba56a38ee6a9f1006936c9112b6d3fb8096a15e8b |
|
MD5 | 66568b131c7b5327021923ab5d084c3f |
|
BLAKE2b-256 | 1164f850b0f12e34db88f87bb0d932fa93d9595ff21bab891a561213360bfa87 |
File details
Details for the file igym-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: igym-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- 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 | 64e6707751cdbaeaab1f871dc20d2d59fc507d153cac78e14ab892ea995a420a |
|
MD5 | b6df6282eebbc4f2c277310b37819b6b |
|
BLAKE2b-256 | d3912a99ba372b87f363ca9aa3b53c45f641d0667bff232ef539d202e3a3cbcc |