from Hacker News

Asking LLMs to create my game Shepard's Dog

by vnglst on 3/8/25, 10:06 AM with 61 comments

  • by vnglst on 3/8/25, 10:06 AM

    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

  • by frotaur on 3/11/25, 1:58 AM

    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.

  • by franze on 3/11/25, 8:49 AM

    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...

  • by shever73 on 3/11/25, 10:14 AM

    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...

  • by the_arun on 3/11/25, 2:12 AM

    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.
  • by owenpalmer on 3/11/25, 2:04 AM

    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!
  • by boredhedgehog on 3/11/25, 10:25 AM

    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.

  • by h4kor on 3/11/25, 9:17 AM

    Quiet impressive!

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

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

  • by 4ndrewl on 3/11/25, 7:13 AM

    Ha, I've been creating this on-and-off for a while. Just last night I asked various LLMs to implement a boid-with-predator algorithm and all failed hard.

    Instead I spent an hour reading through a description and implementing manually and it at least worked.

    But yes, boids is a good start, but it requires some work to make it more natural for mammals, who can have a 0 min speed.

  • by franze on 3/14/25, 8:40 AM

    Here an updated version using ChatGPT o1 Pro, Claude, and Cursor https://news.ycombinator.com/item?id=43360648
  • by cainxinth on 3/11/25, 1:01 PM

    I finally got around to playing Red Dead Redemption 1 recently and was surprised at how much I enjoyed the cattle driving missions.
  • by viccis on 3/11/25, 9:12 AM

    Brought me back to the cowherding missions in RDR. Not a fond memory, but still a memory nonetheless.
  • by unwind on 3/11/25, 9:27 AM

    Meta: strange typo in title, "Shepard" should be "Shepherd".
  • by pesterazor on 3/11/25, 10:55 AM

    Yes but... Why don't you see elephants hiding in trees?
  • by oneeyedpigeon on 3/11/25, 11:02 AM

    I wish GitHub would do a:

       pre { text-wrap: wrap; }
  • by panglesd on 3/11/25, 8:30 AM

    Interesting experiment.

    Would love to see a multiplayer version of this game!

  • by tobyhinloopen on 3/11/25, 7:24 AM

    That's actually a fun game hah
  • by superflow on 3/11/25, 11:55 AM

    The political views of flags is a instant stop for me. I wonder what radobank thinks of that. Keep politics out of tech, and especially if you are in the dutch market, it's such a small market, that you would not want something like that to stop a contract in the future, especially seeing that you user to be a zzp'er.