Readit News logoReadit News
vnglst · 6 months ago
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

Keyframe · 6 months ago
Shepherd's Dog is a game I've wanted to create for a long time

Not sure if you're aware, but there was a game like that for playstation and GBA, called Sheep! https://en.wikipedia.org/wiki/Sheep_(video_game) Here's some gameplay footage (player here didn't chose a dog to play with for some reason): https://www.youtube.com/watch?v=SP058CHQj20 Premise of the game is the same, you run the sheep to the designated area over obstacles.

vnglst · 6 months ago
Ah thanks for this. The game above is lovely and it’s really similar to what I had in mind (I was also thinking of lemmings!). I see in the other comments below that this idea of mine has been created as a game a lot of times already. Seems like I’m not as original as I thought haha
AustinDev · 6 months ago
Just tried a 1-shot on Grok3 - Thinking and it couldn't get past the start button. Throws an error: | "<a class='gotoLine' href='#67:39'>67:39</a> 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/

jchw · 6 months ago
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.

n4r9 · 6 months ago
I just played the Claude attempt and found that the "fence" in level 3 doesn't actually obstruct either the dog or the sheep. Otherwise pretty fun.
swyx · 6 months ago
great demos. one shotting isnt really fair imo, i feel like that might be hard even for a human to do (working without feedback). i'd be curious what deepseek would do with a bit more feedback.
breckenedge · 6 months ago
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?
tdy_err · 6 months ago
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?
frotaur · 6 months ago
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.

franze · 6 months ago
ChatGPT o1 Pro

Demo: https://show.franzai.com/a/clean-parrot-brown (Page will self-destruct after 3 months, feel free to host it somewhere else)

Oneshot Prompt https://chatgpt.com/share/67cff8e6-e218-8009-af5b-d91060eaed...

franze · 6 months ago
After some rounds in Cursor using different models

https://show.franzai.com/a/leaf-bug-wasp (LGPT - feel free to fork - Page will vanish in 3 months)

patates · 6 months ago
Best attmpt so far IMHO. Very hard though!
stevage · 6 months ago
Wow, really impressive.
vnglst · 6 months ago
Wow this one is great!
HenryBemis · 6 months ago
Tip: don't push them into a corner! I got up to lvl 7 without a problem, and then I got them stuck in a corner and that was it :( Poor sheep will spend the night in the cold outside the barn!
shever73 · 6 months ago
After nearly 40 years, Shep has finally been released!

See the Crash magazine "Unclear User" parody. Page 125 of the August 1985 edition for context. [0]

[0] https://archive.org/details/Crash_No._19_1985-08_Newsfield_G...

srejk · 6 months ago
That you remember this from one month before I was born is incredible.
the_arun · 6 months ago
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.
NitpickLawyer · 6 months ago
uBO lite as well:

> uBO Lite has prevented the following page from loading:

https://html-preview.github.io/?url=https://raw.githubuserco...

The page was blocked because of a matching filter in OpenPhish Domain Blocklist.

tigerlily · 6 months ago
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.
shakna · 6 months ago
Probably related to this recent chaos. [0]

[0] https://www.theregister.com/2025/03/10/infosec_in_brief/

ido · 6 months ago
interesting, im also using edge (with all security settings set to maximum) and it works fine for me. Maybe the difference is that I'm using it on mac?
owenpalmer · 6 months ago
The one that Claude created was a legitimately fun game! If it implemented boids similar to o3-mini, it would be even better. Slap some sprites on it and put it on steam!
jofzar · 6 months ago
I clicked it and went, oh this is actually fun. It feels very early iPhone days mobile game.
matsemann · 6 months ago
On desktop the map is huuuuge and it's not particularly fun waiting for them to slowly move all the way to the opposite corner. It's cool that one can prototype this quickly, but needs some tweaks from play-testing as with all games I guess.
boredhedgehog · 6 months ago
Claude actually animated the nightfall, unprompted.

I don't think it's fair to say Mistral didn't implement flocking. The force is just very weak.

EDIT: I guess I confused flocking with herding, fair enough.

h4kor · 6 months ago
Quiet impressive!

I've build a very similar game for a 3 hour game jam once :D

https://h4kor.itch.io/herding-simulator

matsemann · 6 months ago
I once made a boid-thingy, which this also reminds me of. https://matsemann.github.io/boids-workshop/ (and since the parent game is mostly boid behavior with a goal condition, I guess that's why the LLM is so successful in implementing it?)

The link is the final result with lots of controls, but the idea is that it's a tutorial/workshop where you build it step by step yourself, in Norwegian though https://github.com/Matsemann/boids-workshop

oneeyedpigeon · 6 months ago
Weird coincidence, but you made the exact same typo the OP made in their prompt. It's "built", not "build" :)