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: LLM-driven Tamagotchi built with JavaScript and local model

2 pointsby ykhliover 1 year ago
Hi HN!<p>This is a local-ready LLM-generated and LLM-driven tamagotchi with thoughts and feelings. 100% Javascript and costs $0 to run.<p>- Try here <a href="https:&#x2F;&#x2F;github.com&#x2F;ykhli&#x2F;AI-tamago">https:&#x2F;&#x2F;github.com&#x2F;ykhli&#x2F;AI-tamago</a><p>This is a personal project I&#x27;ve been hacking on and off for a few months - all ASCII art animation generated from chatgpt.<p>I have been fascinated by how LLMs transformed app logic, so I thought: what’s the simplest game I could build after ai town? A tamagotchi comes to mind - and it’s a perfect study of how to work with LLMs as a programmer. Some interesting things that stood out while building this:<p>- it’s really hard to version control the app logic when you have prompts that return somewhat unpredictable things in the app. Sure, we can put guardrails round the returned result, but there are always corner cases that don’t quite work. Sometimes the JSON output doesn’t return all the required fields, and once in a while it returns empty strings as part of values…<p>- I love that LLMs sometimes outputs crazy things for the tamagotchi. Here are some examples: - It somehow became self aware? “I haven&#x27;t had any food that I liked in a while and I&#x27;ve been cooped up in this virtual environment for a while now.” - It got confused and thought it fed ME: “I had a good day! I played with my owner and fed them tamago (which they love)” … This is when bugs are actually features :)<p>Would love to hear your thoughts!

1 comment

kiwicoppleover 1 year ago
did you also compare how it runs with a larger model like GPT4?<p>I&#x27;m curious if the experience was significantly different for confined use-cases like this