Skip to content

Commit cf5af8f

Browse files
committed
set default actions and systems, fix more yaml extensions
1 parent d76bcf0 commit cf5af8f

File tree

6 files changed

+52
-39
lines changed

6 files changed

+52
-39
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ RUN pip install --no-cache-dir -r requirements/base.txt
77

88
COPY taleweave/ /taleweave/taleweave/
99
COPY prompts/ /taleweave/prompts/
10-
COPY config.yml /taleweave/config.yml
10+
COPY config.yaml /taleweave/config.yaml
1111

1212
CMD ["python", "-m", "taleweave.main"]

README.md

+27-25
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ TaleWeave AI is an open-source game engine designed for creating rich, immersive
55

66
![TaleWeave AI logo with glowing sunrise over angular castle](https://docs-cdn.taleweave.ai/taleweave-github-1280.png)
77

8+
TaleWeave AI is meant for gamers, developers, and researchers. It is a:
9+
10+
- multiplayer text adventure
11+
- Discord role-playing game
12+
- emergent behavior laboratory
13+
- life simulator
14+
- survival game
15+
- game engine
16+
- world generator
17+
- human-machine interface
18+
- multi-user dungeon
19+
- cross-platform gaming experience
20+
- behavioral experiment
21+
822
## Contents
923

1024
- [TaleWeave AI](#taleweave-ai)
@@ -22,20 +36,6 @@ TaleWeave AI is an open-source game engine designed for creating rich, immersive
2236

2337
## Features
2438

25-
TaleWeave AI is meant for gamers, developers, and researchers. It is a:
26-
27-
- multiplayer text adventure
28-
- Discord role-playing game
29-
- emergent behavior laboratory
30-
- life simulator
31-
- survival game
32-
- game engine
33-
- world generator
34-
- human-machine interface
35-
- multi-user dungeon
36-
- cross-platform gaming experience
37-
- behavioral experiment
38-
3939
TaleWeave AI does a few things out of the box:
4040

4141
- Generate a world from a brief text prompt
@@ -47,24 +47,26 @@ TaleWeave AI does a few things out of the box:
4747

4848
TaleWeave AI can:
4949

50-
- Be modified in almost every way - everything is a plugin, including the planning and action stages that drive the simulation
51-
- Be run locally - does not require any cloud services, but does play nicely with them
50+
- Be modified in almost every way - everything is a plugin, including the planning and action stages that drive the
51+
simulation
52+
- Run locally - does not require any cloud services, but does play nicely with them
5253
- Connect to your data - game systems can fetch data for RAG, making responses richer and more consistent
5354
- Export training data - for analysis, visualization, and fine tuning of character models
54-
- Plug in to your workflow - run the simulation step by step in Jupyter notebooks using the TaleWeave AI engine as a Python library
55-
- Connect to your server and vice versa - the Discord bot is a plugin and can be replaced with your favorite chat platform
55+
- Plug in to your training workflow - run the simulation step by step in Jupyter notebooks using the TaleWeave AI engine
56+
as a Python library
57+
- Chat with you anywhere - the Discord bot is a plugin and can be replaced with your favorite chat platform
5658

5759
### Game Actions
5860

5961
TaleWeave AI has in-game actions for:
6062

61-
| Core | Life Sim | RPG |
62-
| ------------ | --------------- | --------- |
63-
| Planning | Hunger & Thirst | Combat |
64-
| Conversation | Hygiene | Crafting |
65-
| Movement | Sleeping | Magic |
66-
| Exploration | | Movement* |
67-
| | | Writing |
63+
| Core | Life Sim | RPG |
64+
| ------------ | ----------------- | --------- |
65+
| Planning | Cooking | Combat |
66+
| Conversation | Eating & Drinking | Crafting |
67+
| Movement | Sleeping | Magic |
68+
| Exploration | Washing | Movement* |
69+
| | | Writing |
6870

6971
1. The core exploration actions provide ways for characters to expand the world by finding new rooms and items.
7072
2. The RPG movement actions provide additional situational movement like crawling, climbing, and jumping.

docs/guides/admin.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ DISCORD_TOKEN=YOUR_TOKEN
303303

304304
### Configure the Discord bot
305305

306-
Copy the `config.yml` file to a file named `custom_config.yml` and edit the `bot` section to use your desired
306+
Copy the `config.yaml` file to a file named `custom_config.yaml` and edit the `bot` section to use your desired
307307
parameters for the Discord bot. Make sure the list of `channels` includes one or more valid channels in the servers
308308
to which you invited the bot. By default, this is a channel named `taleweave`.
309309

@@ -323,7 +323,7 @@ The `name_*` fields are used by the bot to refer to itself in messages.
323323
_Note:_ This step is _required_ if you are using the `--render` or `--render-generated` command-line arguments. If you
324324
launched ComfyUI, do this step too.
325325

326-
In your `custom_config.yml`, edit the `render` section to use your desired parameters for image generation. Make sure
326+
In your `custom_config.yaml`, edit the `render` section to use your desired parameters for image generation. Make sure
327327
the `checkpoints` are valid file names in your checkpoints folder. If you provide more than one checkpoint, one will be
328328
randomly selected for each batch of images. Adjust the `sizes` as needed to match the checkpoint and control your memory
329329
usage.
@@ -356,7 +356,7 @@ render:
356356

357357
_Note:_ You only need to do this step if you want to change the host or port where the websocket server will listen.
358358

359-
In your `custom_config.yml`, edit the `server` section to change the host and port where the websocket server will
359+
In your `custom_config.yaml`, edit the `server` section to change the host and port where the websocket server will
360360
listen for connections:
361361

362362
```yaml
@@ -373,7 +373,7 @@ front of the websocket server.
373373

374374
_Note:_ You only need to do this step if you want to change the size of the world during generation.
375375

376-
In your `custom_config.yml`, edit the `world` section to change the size of the rooms and character inventory while
376+
In your `custom_config.yaml`, edit the `world` section to change the size of the rooms and character inventory while
377377
generating the world.
378378

379379
```yaml
@@ -432,7 +432,7 @@ world:
432432
The world prompt has two parts: the main theme and the secondary flavor text used by the dungeon master and world
433433
builder to make a more unique and interesting world.
434434

435-
Some world templates are provided in the [`taleweave/prompts.yml` file](../../taleweave/prompts.yml), which you can
435+
Some world templates are provided in the [`taleweave/worlds.yaml` file](../../taleweave/worlds.yaml), which you can
436436
use to get started, or create your own prompt and generate a unique world.
437437

438438
Example world templates include:
@@ -468,19 +468,19 @@ server:
468468
```bash
469469
# Start the TaleWeave AI engine
470470
python3 -m taleweave.main \
471-
--config config.yml \
472-
--prompts prompts/llama-base.yml prompts/llama-quest.yml prompts/discord-en-us.yml \
471+
--config config.yaml \
472+
--prompts prompts/llama-*.yaml prompts/discord-en-us.yaml \
473473
--world worlds/outback-animals-1 \
474-
--world-template ./worlds.yml:outback-animals \
474+
--world-template ./worlds.yaml:outback-animals \
475475
--discord \
476476
--render \
477477
--render-generated \
478478
--server \
479479
--rooms 3 \
480480
--turns 30 \
481481
--optional-actions \
482-
--actions taleweave.systems.sim:init_actions \
483-
--systems taleweave.systems.sim:init_logic
482+
--actions taleweave.actions.core taleweave.actions.optional taleweave.systems.sim:init_actions \
483+
--systems taleweave.systems.core taleweave.systems.sim:init_logic
484484
```
485485

486486
This will generate a relatively small world with 3 rooms or areas, run for 30 steps, then save the game and shut down.
@@ -490,7 +490,7 @@ another file named `worlds/outback-animals-1.state.json`. The world can be stopp
490490
although the step in progress will be lost. The saved state can be resumed and played for any number of additional
491491
steps by running the server again with the same arguments.
492492

493-
> Note: `module.name:function_name` and `path/filename.yml:key` are patterns you will see repeated throughout TaleWeave AI.
493+
> Note: `module.name:function_name` and `path/filename.yaml:key` are patterns you will see repeated throughout TaleWeave AI.
494494
> They indicate a Python module and function within it, or a data file and key within it, respectively.
495495

496496
The optional actions are actions that allow characters to explore and expand the world during the game,

taleweave/main.py

+10
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,28 @@ def parse_args():
113113
type=str,
114114
nargs="*",
115115
help="Extra actions to include in the simulation",
116+
default=[
117+
"taleweave.actions.core",
118+
],
116119
)
117120
parser.add_argument(
118121
"--prompts",
119122
type=str,
120123
nargs="*",
121124
help="The file to load game prompts from",
125+
default=[
126+
"prompts/discord-en-us.yaml",
127+
"prompts/llama-*.yaml",
128+
],
122129
)
123130
parser.add_argument(
124131
"--systems",
125132
type=str,
126133
nargs="*",
127134
help="Extra systems to run in the simulation",
135+
default=[
136+
"taleweave.systems.core",
137+
],
128138
)
129139

130140
# generation arguments

taleweave/systems/environment/weather/system.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from functools import partial
22
from logging import getLogger
3+
from os import path
34
from typing import List
45

56
from packit.agent import Agent
@@ -17,7 +18,7 @@
1718

1819

1920
LOGIC_FILES = [
20-
"./taleweave/systems/environment/weather/logic.yaml",
21+
path.join(".", "taleweave", "systems", "environment", "weather", "logic.yaml"),
2122
]
2223

2324

taleweave/utils/world.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def describe_character(
3333
def describe_static(entity: WorldEntity) -> str:
3434
attribute_descriptions = format_attributes(entity)
3535
logger.info(
36-
"describing entity: %s, attributes: '%s'",
36+
"describing entity: %s, attributes: %s",
3737
entity.name,
3838
attribute_descriptions,
3939
)

0 commit comments

Comments
 (0)