Live data from Hacker News

Show HN: Smallville – Create generative agents for simulations and games

github.com

1–10 of 33 posts

Show HN: Smallville – Create generative agents for simulations and games

#1
Smallville can be used to create NPCs with the same level of realism as human players without having to pre-program interactions. The agents store and retrieve past memories which they use to create plans so they can decide where to move, what to say, and how to react to observations. Agents are also capable of interacting with the world around them to change the state of objects on their own.

This project was intended to make it easy for anyone to create custom simulations and my attempt to recreate Generative Agents: Interactive Simulacra of Human Behavior. I’ve been working on Smallville for the past few weeks and hope other people also find it useful. Would love to hear any thoughts about the project and where I should take it from here.

Show HN: Smallville – Create generative agents for simulations and games
github.com

Re: Show HN: Smallville – Create generative agents for simulations and games

#3
This is so cool! I have been wanting to see something like this for a few years now. I tried making a demo of something similar (but much more primitive) in Unity back in 2021, but small transformers weren't good enough at the time.

Is there any way to protect against prompt injection here? Looking at the architecture I am thinking it would be possible for users to tell an agent what to do directly by tricking them.

This isn't really a criticism, I think it's actually a cool feature. It might be a fun premise of a game where you know you are in a simulation and can manipulate the NPCs around you.

Re: Show HN: Smallville – Create generative agents for simulations and games

#4
Uh... is there some way to use this without connecting to a server? Like, for a game that can be played offline?

Finding a way to make the machine learning piece a completely self-contained library that can be shipped at scale to run on individual computers is the big hurdle to making AI like this practical for games. If I have to rely on your service staying up for my game to work, that's an unacceptable supply chain risk.

Re: Show HN: Smallville – Create generative agents for simulations and games

#6
post #4

Uh... is there some way to use this without connecting to a server? Like, for a game that can be played offline? Finding a way to make the machine learning piece a completely self-contained library that can be shipped at scale to run on individual computers is the big hurdle to making AI like this practical for games. If I have to rely on your service staying up for my game to work, that's an unacceptable supply chai…

EDIT: Actually there's apparently been a lot of progress recently that I hadn't kept up with; see the replies to this comment.

Original message: From a quick peek at the source, this depends on the ChatGPT API for the underlying LLM. It could probably be modified to use a local copy of an LLM, but most models I've seen are 300GB+ and require significant computational resources to operate (think several $15k NVIDIA A100 compute nodes). There's a lot of effort being put in by the open source community to minimize these models and run them on commodity hardware, but as of yet the quality of the responses from the model are correlated with how large (and therefore how much compute) the model has. Give it a year or two and it'll probably be more reasonable to integrate a local LLM for gaming purposes.

Re: Show HN: Smallville – Create generative agents for simulations and games

#7
post #6
post #4

Uh... is there some way to use this without connecting to a server? Like, for a game that can be played offline? Finding a way to make the machine learning piece a completely self-contained library that can be shipped at scale to run on individual computers is the big hurdle to making AI like this practical for games. If I have to rely on your service staying up for my game to work, that's an unacceptable supply chai…

EDIT: Actually there's apparently been a lot of progress recently that I hadn't kept up with; see the replies to this comment. Original message: From a quick peek at the source, this depends on the ChatGPT API for the underlying LLM. It could probably be modified to use a local copy of an LLM, but most models I've seen are 300GB+ and require significant computational resources to operate (think several $15k NVIDIA A1…

> most models I've seen are 300GB+ and require significant computational resources to operate (think several $15k NVIDIA A100 compute nodes).

What? Where have you been the last 3 months?

> the quality of the responses from the model are correlated with how large (and therefore how much compute) the model has

There's a lot more to this including the model structure, training methods, number of training tokens, quality of training data, etc.

I'm not at all saying that Vicuna/Alpaca/SuperCOT/Other llama based models are as good as GPT3.5 - but they should be capable of this, they still create coherent answers.

You need preferably 24GB of vram, but you can get away with less, or you can use system memory (although that'll be slow).

There is a openai api proxy that might let this work without too much work actually

EDIT: It actually says in the readme they plan to support StableLM which is interesting because at least at the moment that's not a well performing model

EDIT 2: You should try the replit2.8B model - This is surprisingly good at programming - https://huggingface.co/spaces/replit/replit-code-v1-3b-demo

Re: Show HN: Smallville – Create generative agents for simulations and games

#8
post #6

Earlier quoted context omitted.

EDIT: Actually there's apparently been a lot of progress recently that I hadn't kept up with; see the replies to this comment. Original message: From a quick peek at the source, this depends on the ChatGPT API for the underlying LLM. It could probably be modified to use a local copy of an LLM, but most models I've seen are 300GB+ and require significant computational resources to operate (think several $15k NVIDIA A1…

> most models I've seen are 300GB+ and require significant computational resources to operate (think several $15k NVIDIA A100 compute nodes). What? Where have you been the last 3 months? > the quality of the responses from the model are correlated with how large (and therefore how much compute) the model has There's a lot more to this including the model structure, training methods, number of training tokens, quality…

Oh, fair enough. I hadn't been keeping up too much but hadn't realized they had progressed that far. I'll have to do some tinkering this evening.

Re: Show HN: Smallville – Create generative agents for simulations and games

#9
post #6

Earlier quoted context omitted.

EDIT: Actually there's apparently been a lot of progress recently that I hadn't kept up with; see the replies to this comment. Original message: From a quick peek at the source, this depends on the ChatGPT API for the underlying LLM. It could probably be modified to use a local copy of an LLM, but most models I've seen are 300GB+ and require significant computational resources to operate (think several $15k NVIDIA A1…

> most models I've seen are 300GB+ and require significant computational resources to operate (think several $15k NVIDIA A100 compute nodes). What? Where have you been the last 3 months? > the quality of the responses from the model are correlated with how large (and therefore how much compute) the model has There's a lot more to this including the model structure, training methods, number of training tokens, quality…

Even if you're a more lightweight model, it's still not very practical to require a dedicated 24GB GPU for every active gamer, whether local or cloud hosted.

For all intents and purposes, it's as much of a non-starter in a production game as the multiple A100 scenario.

Of course that isn't going to remain the case for long as the recent advancements in optimization make their way into live systems, but still.

Re: Show HN: Smallville – Create generative agents for simulations and games

#10

Earlier quoted context omitted.

> most models I've seen are 300GB+ and require significant computational resources to operate (think several $15k NVIDIA A100 compute nodes). What? Where have you been the last 3 months? > the quality of the responses from the model are correlated with how large (and therefore how much compute) the model has There's a lot more to this including the model structure, training methods, number of training tokens, quality…

Even if you're a more lightweight model, it's still not very practical to require a dedicated 24GB GPU for every active gamer, whether local or cloud hosted. For all intents and purposes, it's as much of a non-starter in a production game as the multiple A100 scenario. Of course that isn't going to remain the case for long as the recent advancements in optimization make their way into live systems, but still.

> it's still not very practical to require a dedicated 24GB GPU

totally agreed, you could get away with 12GB too which is in the midrange.

That said yeah it's still not something you could make a game with yet, I'm just pointing out 300GB+ of VRAM isn't the bar for entry here, it is reachable for medium-high end consumers but that's not really including the games resources either, and most gamers aren't medium-high end so...

Post reply on HN