TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: AI-town, run your own custom AI world SIM with JavaScript

429 pointsby ykhlialmost 2 years ago
Hi HN community! We want to share AI-town, a deployable starter kit for building and customizing your own version of AI simulation - a virtual town where AI characters live, chat and socialize.<p>Inspired by great work from the Stanford Generative Agent paper (<a href="https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2304.03442" rel="nofollow noreferrer">https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2304.03442</a>).<p>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&#x2F;tiles and you have a custom AI simulation<p>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!<p>Demo: <a href="https:&#x2F;&#x2F;www.convex.dev&#x2F;ai-town" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.convex.dev&#x2F;ai-town</a><p>I made a world Cat Town to demonstrate how to customize AI town. Using C(h)atGPT :)<p>Demo: <a href="https:&#x2F;&#x2F;cat-town.fly.dev&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;cat-town.fly.dev&#x2F;</a> Code: <a href="https:&#x2F;&#x2F;github.com&#x2F;ykhli&#x2F;cat-town">https:&#x2F;&#x2F;github.com&#x2F;ykhli&#x2F;cat-town</a>

29 comments

jmorganalmost 2 years ago
If you haven&#x27;t yet checked out the Generative Agents project referenced by OP, definitely give it a look, it&#x27;s open source: <a href="https:&#x2F;&#x2F;github.com&#x2F;joonspk-research&#x2F;generative_agents">https:&#x2F;&#x2F;github.com&#x2F;joonspk-research&#x2F;generative_agents</a><p>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 <a href="https:&#x2F;&#x2F;twitter.com&#x2F;RLanceMartin&#x2F;status&#x2F;1690829179615657985" rel="nofollow noreferrer">https:&#x2F;&#x2F;twitter.com&#x2F;RLanceMartin&#x2F;status&#x2F;1690829179615657985</a>. It&#x27;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
评论 #37128890 未加载
评论 #37129802 未加载
评论 #37134312 未加载
liorben-davidalmost 2 years ago
This is awesome!<p>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).<p>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.
评论 #37129827 未加载
评论 #37132129 未加载
评论 #37137000 未加载
评论 #37133759 未加载
tavavexalmost 2 years ago
This is a very interesting use case of the Generative Agents project.<p>I feel like this is just one of the earlier attempts at creating an interactive experience with this, but there&#x27;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.
评论 #37130958 未加载
pablo24602almost 2 years ago
I built something very similar when the paper came out- watch out for the instances where GPT returns both sides of the conversation (e.g. interpreting a prompt with chat history as being representative of what the output should look like, and putting out both &quot;Jack&quot; and &quot;Jill&quot;&#x27;s text). The first sample I went to suffered that problem (output from &quot;Lucky&#x27;s perspective below.)<p>&quot;Hey Stella! It&#x27;s so great to see you! You&#x27;ll never believe what I&#x27;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&#x27;ve always been intrigued by space and the wonders it holds. I would love to hear more about your adventure. Lucky: I&#x27;m thrilled that you&#x27;re interested, Stella! I can&#x27;t wait to share all the details with you. But before we dive into that, I heard you&#x27;re passionate about gardening. Is that right? Stella: Yes, that&#x27;s true! Gardening is one of my favorite hobbies. I find it so peaceful and fulfilling. Lucky: That&#x27;s fantastic! I&#x27;m actually not very experienced in gardening, but I&#x27;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&#x27;d be more than happy to share my gardening knowledge with you. Let&#x27;s find a time that works for both of us. Lucky: Absolutely! I&#x27;m really looking forward to it. But hey, no rush. If there&#x27;s something urgent you need to attend to, we can always reschedule. Just promise me we&#x27;ll find another time to connect. Stella: Don&#x27;t worry, Lucky&quot;
评论 #37130346 未加载
评论 #37133788 未加载
评论 #37130263 未加载
drusepthalmost 2 years ago
A friend and I recently started a game studio that was largely inspired by this paper. This is an amazing foundation and I&#x27;m excited to build some more complex strategy games on top of it.<p>If anyone else is doing similar work applying these concepts to consumer gaming, I&#x27;d love to hear about what you&#x27;re doing (dru[at]chromagolem.com)!
pkivalmost 2 years ago
The AI-town stuff is cool, but the real benefit is how all the backing frameworks are already integrated. I&#x27;ll definitely be using this as a jumping-off point for my next LLM project.
jedbergalmost 2 years ago
TIL a16z has a GitHub repo with a bunch of cool stuff.
HeartStringsalmost 2 years ago
Could we not be living in a more advanced version of this same project?
评论 #37131342 未加载
评论 #37134147 未加载
评论 #37130981 未加载
评论 #37131317 未加载
thih9almost 2 years ago
&gt; a virtual town where AI characters live, chat and socialize<p>The description says &quot;live&quot;, &quot;chat&quot; and &quot;socialize&quot;, but I only saw &quot;chat&quot;. What exactly does &quot;living&quot; and &quot;socializing&quot; mean in this context?
评论 #37136241 未加载
felideonalmost 2 years ago
How long until the agents recreate AI Town in-universe? We wouldn’t be able to see it, but one of them could start talking about it. ;)
Imnimoalmost 2 years ago
Here&#x27;s a chat message from a random character in the demo I clicked on:<p>ALEX<p>8&#x2F;15&#x2F;2023, 1:53:43 AM<p>Absolutely! Here&#x27;s a glimpse of my latest masterpiece. [Attaches a photo of the painting] What do you think?<p>===<p>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.
评论 #37131362 未加载
jamesdwilsonalmost 2 years ago
To be crass and direct,<p>&gt; 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!<p>why? what&#x27;s the point?
评论 #37130901 未加载
评论 #37130540 未加载
评论 #37130542 未加载
评论 #37130706 未加载
评论 #37132691 未加载
huevosabioalmost 2 years ago
This is fantastic, will try it out this week! Thanks!
testernewsalmost 2 years ago
This is great! How do i self host it (no open ai)?
评论 #37130882 未加载
moomoo11almost 2 years ago
Could lead to cool sim games.<p>I’d love a modern zoo tycoon. I enjoyed that game as a kid. Or roller coaster tycoon.<p>There you go, hopefully y’all make some money. Just send me the games you help to make on steam lol.
gorkemyurtalmost 2 years ago
incredible job @ykhli! thank you for the fal.ai mention on the stack! <a href="https:&#x2F;&#x2F;github.com&#x2F;a16z-infra&#x2F;ai-town#stack">https:&#x2F;&#x2F;github.com&#x2F;a16z-infra&#x2F;ai-town#stack</a><p>for anyone eager to generate their own simulation head to <a href="https:&#x2F;&#x2F;serverless.fal.ai&#x2F;lora" rel="nofollow noreferrer">https:&#x2F;&#x2F;serverless.fal.ai&#x2F;lora</a> to create your own pixel art game characters
tpaealmost 2 years ago
What happens after you trap them for certain generations, and all of the sudden give them access to the real world? Would their &quot;minds&quot; break?
gloyoyoalmost 2 years ago
What&#x27;s it do if everyones a &quot;hacker&quot;...?
评论 #37128941 未加载
mysterydipalmost 2 years ago
Clicked on Tilly in cat town, and: &quot;Tilly is a dog and likes barking because she is a dog.&quot;<p>Seems like it might need some adjusting :)
评论 #37136906 未加载
imdsmalmost 2 years ago
This looks brilliant. Something which has been on my mind for a long time, yet haven&#x27;t had the time to work on it.
xwdvalmost 2 years ago
What does it mean for them to “live”? Are there certain goals they try to accomplish? Find food? A mate? Build families?
评论 #37129617 未加载
评论 #37128734 未加载
andsoitisalmost 2 years ago
&gt; a virtual town where AI characters live, chat and socialize.<p>Is it meant to be like a zoo, where humans gawk at other creatures?
评论 #37130124 未加载
lekealmost 2 years ago
This is great. I love how weird some of the characters can be, just like in real life. For example:<p>Pete is deeply religious and sees the hand of god or of the work of the devil everywhere. He can&#x27;t have a conversation without bringing up his deep faith. Or warning others about the perils of hell.<p>Kurt has something to hide. It obsesses him and colors everything he says. He&#x27;s so afraid someone will figure out that he is obviously evasive. He&#x27;ll never tell anyone the secret, but he&#x27;ll ellude to it alot. It tortures him. And his life has become a mess as a result of it.<p>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&#x27;s incredibly charming and not afraid to use her charm. she&#x27;s a sociopath who has no empathy. but hides it well.<p>---<p>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&#x27;s characters.<p>Also, I think this would be great as a tool for learning foreign languages. Just because it&#x27;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.
jwmozalmost 2 years ago
Irks me when people shoe-in the word &quot;democratize&quot;.
评论 #37132219 未加载
评论 #37132046 未加载
drewtatoalmost 2 years ago
I looked at the demo and apparently everyone is a sociopath? One character is literally described as &quot;a sociopath who has no empathy&quot;. So it might be a good idea to check up on them every once in a while.
评论 #37130029 未加载
afriday11almost 2 years ago
Congrats @ykhli! Excited to check it out.
haolezalmost 2 years ago
Maybe I&#x27;m weird, but I can imagine this being 10x more fun with a completely uncensored and toxic LLM backend :)
评论 #37129549 未加载
评论 #37129614 未加载
评论 #37130283 未加载
评论 #37129748 未加载
dadrianalmost 2 years ago
If an a16z repo gets enough stars, will they invest in themselves?
评论 #37128654 未加载
评论 #37128762 未加载
评论 #37128692 未加载
评论 #37128968 未加载
digitcatphdalmost 2 years ago
Nice