A Guess LLaMa? game in session; The theme is 'Cat'
I've had this concept for Guess LLaMa? for a while. tl;dr: Guess Who? you play with your bot.
The original version was written in C with Raylib as a GUI.
I realized that a NodeJS version with a webUI would likely be easier for people to play with, so I had my bot port the C/Raylib version to this NodeJS version.
llm-guess-llama-nodejs is the NodeJS version.
Concepts:
- It can work with any 24 characters. A 'cast' of characters for any theme.
- You can generate the character images.
- stable-diffusion.cpp's
sd-serverAPI should be compatible as a generation backend. This is the completely local option. - It should also work with the openrouter image API if you don't want to generate images locally.
- stable-diffusion.cpp's
- You can upload 24 images from your device.
- You can have the server fetch 24 images from URLs you supply.
- You can generate the character images.
- It sends the character image(s) to the visual multimodal LLM for the stages of the game.
- When you ask the LLM a question about its character it gets its own character image with the question in context.
- When the LLM is asking you a question it gets the character images that it hasn't eliminated yet in context.
The game flow:
- Enter a theme. Cat, Dog, Capybara, Llama, Clown, etc.
- Generate or supply the 24 images for that theme.
- If generating the images, list or have the LLM list 8 distinct items to include with the characters to make each image unique. (Otherwise it could generate 24 of nearly the same cat, etc.)
- If supplying the images, upload the images or list the URLs.
- Ask the LLM a yes/no question about its character.
- Eliminate the character(s) that contradict the answer.
- Have the LLM ask you a yes/no question about your character.
- Answer Yes/No. The LLM will be prompted to eliminate character(s) that contradict the answer.
- Loop from step 3 until someone wins.
Win Conditions:
- Player wins if:
- The player eliminates all characters except the LLM character.
- The LLM mistakenly eliminates the player character.
- LLM wins if:
- The LLM eliminates all characters except the player character.
- The player mistakenly eliminates the LLM character.
Being able to supply the images via URLs adds the concept that people could make image lists. For example: 24 Star Trek characters. 24 Celebrities. 24 Minerals. 24 Pokemon. 24 Horses. Etc.
I've included 24 FLUX.2 Klein generated cats as an example theme. The image generation logic is extremely basic. There's probably lots of room for improvement there.
I mainly tested it with Qwens(3.5-3.8). Other visual multimodal models should work but may vary in quirks and quality. They need to be able to take in 23 images at a time and output consistent JSON.
Note: vite.config.ts#L9 needs to be edited with an allowed host or removed AFAIK. This is here because on my LAN I have a DNS entry such as ai-box.lan that I have pointing to my LLM rig that I use to access the game through http://ai-box.lan:5173. Consult your bot if that's confusing.
It's a basic game, but it's one that visual multimodal LLM can solve. Without visual LLM, someone would need to list all possible attributes for the sets of images for the game to work.
Enjoy. It's all free software, feel free to fork it and improve it if you have ideas.
Source: r/LocalLLM · by /u/SM8085
