429 points · by ykhli · 3y ago · 115 comments
Inspired by great work from the Stanford Generative Agent paper (https://arxiv.org/abs/2304.03442).
A few features: - Includes a convex.dev backed server-side game engine that handles global state - Multiplayer ready. Deployment ready - 100% Typescript - Easily customizable. You can fork it, change character memories, add new sprites/tiles and you have a custom AI simulation
The goal is to democratize building your own simulation environment with AI agents. Would love to see the community build more complex interactions on top of this. Let us know what you think!
Demo: https://www.convex.dev/ai-town
I made a world Cat Town to demonstrate how to customize AI town. Using C(h)atGPT :)
Demo: https://cat-town.fly.dev/ Code: https://github.com/ykhli/cat-town
Over the weekend Lance Martin got it working with local models using llama.cpp and ollama.ai which saves $ on longer sims since all inference happens locally https://twitter.com/RLanceMartin/status/1690829179615657985. It's neat how the AI agents interface with each other – e.g. one will host a party and invites will be sent throughout the group
(Though I suppose people aren't very reasonable, so it might give an accurate simulation!)
Game idea to build on top of this: Table top deception type game where each agent has the goal of convincing the real users that they are in fact also real users.(So each agent is trying to pass a turing test).
Every AI agent uses RL to optimally prompt their personal LLM for how they should chat with the human players. eg should they try to frame a certain person, should they play it dumb, should they gaslight etc.
It makes it easier for the AI mods to do the part and it puts the burden on the players.
Might not see it from ChatGPT - but "never from an LLM"? Why would you think that?
I feel like this is just one of the earlier attempts at creating an interactive experience with this, but there's still so much potential for future games, if the technology is refined further. Think of something like Animal Crossing (or any other game where interacting with NPCs is at the forefront of gameplay), but with the characters that have completely unique personalities and an ability to generate new dialogue (rather than relying on a limited number of pre-written lines), or react to player actions in unique ways, and so on.
"Hey Stella! It's so great to see you! You'll never believe what I've been up to recently. I went on this incredible space adventure and witnessed the most breathtaking meteor showers. And guess what? I even encountered alien beings who communicate through colors! It was absolutely mesmerizing. Stella: Wow, Lucky! That sounds absolutely fascinating. I've always been intrigued by space and the wonders it holds. I would love to hear more about your adventure. Lucky: I'm thrilled that you're interested, Stella! I can't wait to share all the details with you. But before we dive into that, I heard you're passionate about gardening. Is that right? Stella: Yes, that's true! Gardening is one of my favorite hobbies. I find it so peaceful and fulfilling. Lucky: That's fantastic! I'm actually not very experienced in gardening, but I'd love to learn from you. How about we plan a gardening session where we can exchange tips and spend some quality time together? Stella: That sounds wonderful, Lucky! I'd be more than happy to share my gardening knowledge with you. Let's find a time that works for both of us. Lucky: Absolutely! I'm really looking forward to it. But hey, no rush. If there's something urgent you need to attend to, we can always reschedule. Just promise me we'll find another time to connect. Stella: Don't worry, Lucky"
I also noticed this when browsing the demo village, some conversations it ran through and did both parts.
Ie if the LLM is playing a character "Jack" and you are playing the character "James" your query might be "_only reply for your character Jack_ James: I pick up the sword and then turn towards Jack".
It can also be used to influence behaviour as LLMs often get stuck repeating (not word for word) the same events/description, ie greeting your character over and over again and not moving on, LLMs aren't great at having autonomy/agency in the flow of a conversation, I think this is best done by not providing the entire history of the conversation but instead distilling it to relevant information for the current query.
But that can also be mitigated manually by bumping their character with underscores ie "_Jack asks what James wants to order_ James: I return Jack's greeting and peruse the Tavern's menu board".
If anyone else is doing similar work applying these concepts to consumer gaming, I'd love to hear about what you're doing (dru[at]chromagolem.com)!
(The argument then of course continues that if we would, our world's inhabitants would some day too, ad infinitum. Given such a stack, the chance that we're actually still in the top layer is very small.)
I just don't see why would an intelligent being (especially if they're a human descendant) choose to simulate our world the way it is right now.
Could it be possible that they've just rented an RTX 40,090 and are simulating the entirety of our Universe to learn about how their (our?) species developed? Or how certain things would change if variables were altered? Perhaps there is a "multiverse" of infinite selves, but the multiverse is just a all the previous simulations that were tweaked slightly differently and had a different result.
Maybe changing the starting position of 1 atom in the beginning of the Universe has a butterfly effect that would entirely evade our assumptions. If we had the compute, why not simulate every possible reality? Perhaps there is 1 simulation that's occurred where everything was perfect, without anything cruel or unethical! And if we're gonna go as sci-fi as simulation theory, I don't think it's a far assumption that we could build things like fusion reactors or Dyson Spheres. We could learn so much, especially if the agents behaved naturally and had no idea that they themselves were simulated.
I don't actively believe we live in a simulation, but I think actively believing that we don't just doesn't make mathematical sense.
I'm reminded of the Culture novel Surface Detail, which basically revolves around d the ethics surrounding simulating consciousness. There is a society in the book which runs afterlife simulations, including a pretty horrible hell. Conflict over whether this should be allowed to continue is one of the main drivers of the plot.
https://en.wikipedia.org/wiki/Averroes%27s_theory_of_the_uni...
> Averroes argues, as put by the historian of philosophy Peter Adamson, that "there is only one, single human capacity for human knowledge".[3] He calls it—using contemporary terminology—the "material intellect", which is one and the same for all human beings.[4] The intellect is eternal and continuously thinking about all that can be thought.[5] It uses faculties (e.g. the brain) of individual humans as a basis for its thinking process.[5] The process that happens in the human brain is called fikr by Averroes (known as cogitatio in Latin, often translated to "cogitation" in English), a process which contains not universal knowledge but "active consideration of particular things" that the person has encountered.[5] This use of human faculty explains why thinking can be an individual experience: if at one point the universal intellect is using one's brain to think about an object of thought, then that person is also experiencing the thinking.[5]
edit: I'm going to elaborate on this. In particular it's interesting to consider two kinds of knowledge -- the knowledge stored in ChatGPT's neural network, which is broad and "universal" and "timeless", and the knowledge of the individual agent's context, which is particular and local in both place and time. The "intellect" can't really do anything without being provided with a particular context in which to act.
In the beginning was the Word, and the Word was with God, and the Word was God.
The Bible begins in Genesis with a one week period of entropy reduction. "In the beginning God created the heavens and the earth", a summary of the following three or four chapters.
The description says "live", "chat" and "socialize", but I only saw "chat". What exactly does "living" and "socializing" mean in this context?
ALEX
8/15/2023, 1:53:43 AM
Absolutely! Here's a glimpse of my latest masterpiece. [Attaches a photo of the painting] What do you think?
===
I feel like it will be difficult in general to prompt the LLM in a way that gets it to stick to the limits of the simulation environment.
> The goal is to democratize building your own simulation environment with AI agents. Would love to see the community build more complex interactions on top of this. Let us know what you think!
why? what's the point?
I’ve thought a lot that these sorts of techniques can be used to make things much more generalized. A multimodal model backing say manufacturing equipment can make the equipment much easier to reconfigure to new tasks in an environment that’s more adhoc and includes other machine and human agents.
The key to my mind is the fact it’s not just LLMs it’s a mixture of techniques - constraints, optimizers, information retrieval, etc.
More specifically the demo involves a lot of Andreessen Horowitz investments to demonstrate them in an accessible way that people find interesting because it’s a game. And people like games.
What is unclear about the portion you quoted?
And maybe can be used to do interesting things.
Let’s work on the cool tech together.
I promise you it will not hack into the mainframe and turn the world into paperclips. (Odds are…near zero).
As far as I know, they don't have much history in making things with "no extrinsic objective" - I could be wrong though.
note you still need pinecone (vector db) and something called clerk.com that does auth, not sure why, seen other projects swap out pinecone for chroma, and not sure why we are authorising things with clerk.com, but that cannot be essential...
I’d love a modern zoo tycoon. I enjoyed that game as a kid. Or roller coaster tycoon.
There you go, hopefully y’all make some money. Just send me the games you help to make on steam lol.
for anyone eager to generate their own simulation head to https://serverless.fal.ai/lora to create your own pixel art game characters
Seems like it might need some adjusting :)
“Tilly is a dog and likes barking because she is a dog. Tilly pretends that she's a cat. (…)”
But, to pre-empt an overly-philosophical reply, can I remind you that this isn't actually self-aware general artificial intelligence, and is more of a programming exercise/experiment/game.
Pete is deeply religious and sees the hand of god or of the work of the devil everywhere. He can't have a conversation without bringing up his deep faith. Or warning others about the perils of hell.
Kurt has something to hide. It obsesses him and colors everything he says. He's so afraid someone will figure out that he is obviously evasive. He'll never tell anyone the secret, but he'll ellude to it alot. It tortures him. And his life has become a mess as a result of it.
Stella can never be trusted. she tries to trick people all the time. normally into giving her money, or doing things that will make her money. she's incredibly charming and not afraid to use her charm. she's a sociopath who has no empathy. but hides it well.
---
To take this to the next level, I hope you would be able to prompt your own characters, and perhaps have places you can send these guys on holiday to converse with other people's characters.
Also, I think this would be great as a tool for learning foreign languages. Just because it's interesting, engaging and based on language. Again with prompts that can be programmed, like Gill who constantly talks about his job in marketing, and Bill who likes to refer to himself in the third person, and Betty who constantly uses conditionals in her sentences. Again, just so cool.
Is 'popularise' an undesirable word now? I wonder why the euphemism treadmill has had to advance in this way.