Thistle Gulch Simulation - v0.3

NOTE: Access is now public for the open source thistle-gulch python Bridge, but the Runtime (simulation engine) is still a private beta. You can still sign up here to request access. New cohorts are invited weekly! Thistle Gulch is free, but in active development, so we’re working on slowly ramping up access.

Here’s the latest release notes. Check them out and join the community!

Thistle-Gulch v0.3 includes the following dependencies:

  • SAGA: v0.6

  • Runtime: v1.46 (Beta Access Only)

  • Bridge: v0.3

Lots of useful changes this release! A more powerful API (see docs) with demos for each one that provide a reference implementation on how they each work and that you can use as a basis for your own creations. There’s also the new on_tick() callback, allowing you to react to things as the Runtime simulation progresses.

Runtime 1.46 & Bridge 0.3

Ollama Demo Fixed - Adds Conversation Generation.

The Ollama demo was reworked to allow using a free and self-hosted LLM. It’s not as good as even GPT-3.5, and takes quite a bit longer to generate, but at only 7B parameters, the default Mistral:Instruct model does work most of the time now. Ollama is basically a server that makes it easy to run a whole host of LLMs with optimizations with a few command line instructions, just make sure you have enough GPU memory. We’re looking to collaborate on fine-tuning an open source model for thistle-gulch. Reach out if you’re interested in helping.

The demo now has a debug option, which will print the generations as they stream in, which can be very helpful.

Enable or Disable Agents via API

You can now decide which agents should be active or not. When characters are activated as agents, they generate actions via Skills (SAGA)actions instead of doing their default (scheduled) action and they show a modal of those options to the human to choose from (if you have modals enabled). Previously, you had to set this via cli argument, but now you can do it via code. This helps us provide demos that automatically activate the character you choose. Note that this also allows you to activate multiple characters at any given time.

There is a simple new demo showing this where you type the agent you want and it activates it.

Change NPC Properties via API

Customizing character details is a common request we get. You can now change a subset of the character’s properties via the API.

  • Energy: [0-100] Once a character reaches zero, they “crash”. They basically pass out and need to be revived by Dr. Bones.

  • Summary: One sentence that summarizes the character and what their role is.

  • Description: The outward/physical appearance of the character since these agents can’t actually see (yet). Usually a paragraph.

  • Backstory: What makes this character who they are, what their motivations are, and some of their history. Usually a few paragraphs.

We aren’t allowing you to change their names or add/remove characters yet, but that is on our roadmap.

Override Character Actions via API

The Thistle Gulch characters have "Skills" that are basically things they know how to do. Actions are specific implementations of skills. For instance go_to is a skill with a skill definition below. If you have a character use go_to, to then move to the saloon, then that is an example of an action. Another skill is exchange, but a character could use this skill to rob the bank (receive: gold, give: thank you note), give something (receive: nothing, give: gold), or exchange money with a store to buy an item. There are also skills for converse_with, wait, reflect, interact, and take_to.

Thistle Gulch uses SAGA, which in turn uses an LLM like OpenAI to generate and score action options for you by default, but you can now override this to drive any actions you like, directly from code. Using the same skill definitions as SAGA, you can create your own actions for a character at any time and the character will stop what they were doing and do this new action immediately.

The details of how to turn each Skill into an Action is now in the README.

See the Override Character Action Demo to see it in action.

New on_tick() Event

This new event callback function allows your code to interact with the simulation over time. Unlike on_ready() which only happens when the simulation is about to start for the first time, on_tick() happens every second or so, once for each “Simulation Tick” in the Runtime. For instance, on_tick() will trigger faster if you speed it up the Runtime and it will stop running when the runtime is paused. It returns the current simulation datetime, so you can trigger events to happen when you want them to. The next few demos take advantage of that.

  • Simulation Tick Demo: Pause and Resumes every tick after waiting a time you specify.

  • Rob Bank Demo: Character you pick robs the bank immediately via on_ready(), but the sheriff arrests them 1 sim-hour (1 minute) later using on_tick().

Runtime Version Checks

Each Bridge release now has a specific Runtime version that it’s intended to be paired with. We will do that check for you on start of the Bridge to help prevent things getting out of sync.

Fable SAGA - v0.6

⚠️ Some breaking changes, but it depends on what parts you use. For those just using the server functionality, these changes should be transparent. For those using the python API, like we are doing in thistle-gulch there are some new paradigms to consider, please see the full release notes for details.

  • Upgrade to latest LangChain

  • Reduce dependencies - went from 2.5GB to like ~50MB

  • Generally better typing module support, with stricter mypy validation

  • Use of Generics to define Endpoints (prev called “Servers”), reducing boilerplate

Frank Carey

Fable CTO

Previous
Previous

Thistle Gulch Simulation - v0.5

Next
Next

Thistle Gulch Simulation - v0.2