Live data from Hacker News

Asking LLMs to create my game Shepard's Dog

github.com

1–10 of 65 posts

Re: Asking LLMs to create my game Shepard's Dog

#2
Shepherd's Dog is a game I've wanted to create for a long time, but I never got the sheep flocking behaviour just right. The goal of the game is to herd all the sheep into the pen before nightfall. I've asked several models to create this game and I'm particularly impressed with what Claude 3.7 could do with a one-shot prompt.

- You can play the Claude game here (note: doesn't work on Safari for some reason): https://html-preview.github.io/?url=https://raw.githubuserco...

- o3-mini's version is here: https://html-preview.github.io/?url=https://raw.githubuserco...

Results of other models and a leaderboard is here: https://github.com/vnglst/when-ai-fails/blob/main/shepards-d...

Some videos: https://hachyderm.io/@vnglst/114125938185826311

Re: Asking LLMs to create my game Shepard's Dog

#3
post #2

Shepherd's Dog is a game I've wanted to create for a long time, but I never got the sheep flocking behaviour just right. The goal of the game is to herd all the sheep into the pen before nightfall. I've asked several models to create this game and I'm particularly impressed with what Claude 3.7 could do with a one-shot prompt. - You can play the Claude game here (note: doesn't work on Safari for some reason): https:/…

Since you’re releasing the code to GitHub, do you think you’ll eventually run into issues with the training data including prior versions of the game?

Re: Asking LLMs to create my game Shepard's Dog

#4
Seems o3-mini implements the 'boids' algorithm for flocking (likely due to its prevalence online), but I find that here it doesn't really fit.

Indeed in boids each element has a constant (or minimum) velocity, s.t. the sheep never stop 'running'. I find the Claude flocking behaviour looks more natural, for sheep.

Re: Asking LLMs to create my game Shepard's Dog

#7
post #2

Shepherd's Dog is a game I've wanted to create for a long time, but I never got the sheep flocking behaviour just right. The goal of the game is to herd all the sheep into the pen before nightfall. I've asked several models to create this game and I'm particularly impressed with what Claude 3.7 could do with a one-shot prompt. - You can play the Claude game here (note: doesn't work on Safari for some reason): https:/…

Here is an attempt using Google Gemini 2.0 Pro Experimental.

https://gist.github.com/jchv/e8869a7cbe2d854a0ec93e946030d90...

It seems like it has some issues, but the result is interesting nonetheless. Just a one-shot like the others, needed a single "Keep going" but otherwise this is the vanilla output from the prompt.

Edit: Looks like you can share an HTML preview of a gist using html-preview.github.io, so here's that. https://html-preview.github.io/?url=https://gist.githubuserc... - It'll go to level 2 if you refresh the page and hit Restart, but I don't think it's possible to clear Level 2. The flock stays too far apart to fit enough sheep in the pen.

Re: Asking LLMs to create my game Shepard's Dog

#8
post #2

Shepherd's Dog is a game I've wanted to create for a long time, but I never got the sheep flocking behaviour just right. The goal of the game is to herd all the sheep into the pen before nightfall. I've asked several models to create this game and I'm particularly impressed with what Claude 3.7 could do with a one-shot prompt. - You can play the Claude game here (note: doesn't work on Safari for some reason): https:/…

Just tried a 1-shot on Grok3 - Thinking and it couldn't get past the start button. Throws an error: | "67:39 Uncaught ReferenceError: startGame is not defined"

Scope issue.

No barking or dog player model but pretty similar in style to Claude's output.

What's interesting to me about playing with AI Codegen is each model has specific and sometimes overlapping output errors. Claude 3.7 really like to solve errors by returning dummy data as a 'fallback' when doing client or server calls. A little prompting can reduce this but not eliminate it. 'The tests always pass if you return dummy data'

https://jsfiddle.net/aL3ugtj1/

Re: Asking LLMs to create my game Shepard's Dog

#9
post #2

Shepherd's Dog is a game I've wanted to create for a long time, but I never got the sheep flocking behaviour just right. The goal of the game is to herd all the sheep into the pen before nightfall. I've asked several models to create this game and I'm particularly impressed with what Claude 3.7 could do with a one-shot prompt. - You can play the Claude game here (note: doesn't work on Safari for some reason): https:/…

Since you’re releasing the code to GitHub, do you think you’ll eventually run into issues with the training data including prior versions of the game?

The implied scenario being that the memory of its own output would result in the model producing degraded future output? Why is that a given?

Re: Asking LLMs to create my game Shepard's Dog

#10
post #6

All the demo sites are flagged by Microsoft Edge as - "This site has been reported as unsafe". The irony is the demos are hosted on github pages.

Are they doing this now? Oh brother! And here I was thinking WASM would be a good solution to the desktop exe signing problem for my community's roguelike. Instead browser vendors are likely just going to ban the site.
Post reply on HN