Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
umair-nasir14 committed May 22, 2024
2 parents 997fc15 + b2fe49b commit 45d4792
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ Install the environment and activate it:

```
cd Word2World
type > word2world/.env
conda env create -f environment.yml
conda activate word2world
```

Add your API key to the .env file created in word2world folder:

```
OPENAI_API_KEY="sk..."
```

Run with default configs:

`python main.py`
Expand All @@ -34,7 +41,7 @@ python main.py \
--min_story_paragraphs=4 \
--max_story_paragraphs=5 \
--total_objectives=8 \
--rounds=3 \
--rounds=1 \
--experiment_name="Your_World" \
--save_dir="outputs"
```
Expand All @@ -44,7 +51,7 @@ To play the generated game:
```
python word2world/play_game.py "path_to_game_data\game_data.json"
```
where `game_data.json` is generated when the Word2World loop is finished and is saved to `\outputs`\game_data.json`. This can be modified in `configs` or as `--save_dir` arg.
where `game_data.json` is generated when the Word2World loop is finished and is saved to `\outputs\game_data.json`. This can be modified in `configs` or as `--save_dir` arg.

To play an example world:

Expand All @@ -69,8 +76,18 @@ python word2world/play_game.py
![world_6](https://github.com/umair-nasir14/Word2World/assets/68095790/d92fa869-82de-4e97-bb77-2eb5fb7d04e2)
![world_7](https://github.com/umair-nasir14/Word2World/assets/68095790/751a753e-9e3d-41da-b146-fa852d0e7f1c)

### Note:

- The most stable model is `"gpt-4-turbo-2024-04-09"`.
- Currently only `OpenAI` models are supported.

### Cite:
```
@article{nasir2024word2world,
title={Word2World: Generating Stories and Worlds through Large Language Models},
author={Nasir, Muhammad U and James, Steven and Togelius, Julian},
journal={arXiv preprint arXiv:2405.06686},
year={2024}
}
```

0 comments on commit 45d4792

Please sign in to comment.