This is a package that uses LLMs (closed and open-source) for planning.
- Python3.9
- (recommended) virtualenv
pip install -r requirements.txt
alfworld-download
pip install -e .
(this installs llamp)
export OPENAI_API_KEY=""
export CEREBRAS_API_KEY=""
- ... (and so on for all the providers you want to use, e.g. Anthropic, Nvidia, Cohere)
- Basic test:
cd test
./test.sh
- More advanced test:
cd root_folder
./playgrounds/run_alfworld_eval.sh test_ours
- Running Eval:
cd root_folder
./playgrounds/run_alfworld_eval.sh cerebras_main
WARNING PACKAGE IS STILL UNDER DEVELOPMENT and requirements needs cleaning up.
- Textworld Game (pip install textworld)
- Textworld Visualisation (pip install -r requirements_textworld_visualisation.txt)
- (install chromedriver or firefox driver)
The following is accepted:
python3 playgrounds/playground_tw_gym.py {human/openai/...} --custom/--simple {PARAMS}
e.g.:
python3 playgrounds/playground_tw_gym.py human --custom 1 2 2
Or:
- (In terminal with browser visualiser)
tw-play tw_games/first_game.z8 --viewer
- (as Gym environement in terminal)
python3 playgrounds/playground_tw_gym.py
python3 generate_games.py --simple/--custom {PARAMS}
e.g.
python3 generate_games.py --custom 2 2 2 1234
-
tw-make custom --world-size 2 --nb-objects 10 --quest-length 5 --seed 1234 --output games/tw_games/w2_o10_l5_game.z8
-
tw-make tw-simple --rewards dense --goal detailed --seed 1234 --output games/tw_games/simple/r_dense__g_detailed__seed_1234.z8
Rewards: (dense, balanced, sparse) Goal: (detailed, brief, none)
Reference: [https://textworld.readthedocs.io/en/stable/tw-make.html#types-of-game-to-create]
Available commands:
look: describe the current room
goal: print the goal of this game
inventory: print player's inventory
go <dir>: move the player north, east, south or west
examine ...: examine something more closely
eat ...: eat edible food
open ...: open a door or a container
close ...: close a door or a container
drop ...: drop an object on the floor
take ...: take an object that is on the floor
put ... on ...: place an object on a supporter
take ... from ...: take an object from a container or a supporter
insert ... into ...: place an object into a container
lock ... with ...: lock a door or a container with a key
unlock ... with ...: unlock a door or a container with a key
- [https://medium.com/@WamiqRaza/how-to-create-virtual-environment-jupyter-kernel-python-6836b50f4bf4]
pip install ipython
pip install ipykernel
ipython kernel install --user --name=myenv
python -m ipykernel install --user --name=myenv