We ran AI agent swarms in Minecraft and Mindustry

(labs.ycombinator.com)

257 points | by sandslash 10 hours ago ago

73 comments

  • peri-cl 9 hours ago ago

    This is hilarious and adorable.

    > "Ada tossed a cooked chicken to Noor; Esme picked it up by accident and ate it. A three-minute "no blame" inquiry produced a written protocol..."

    They're like super-serious little senior engineers. (edit: or dining-philosophers).

    About how much KV cache do these kinds of agents use? Could you squeeze 50 of these $game agents onto a small consumer GPU (small LLM)?

    Idly imagining a game server of some kind with a bunch of human friends sharing one person's GPU, with a flock of agents colocated on it.

    • aizk an hour ago ago

      Sci fi has us thinking agent swarms act like savvy, terminator bots but they really just scream to me panicked middle managers trying to survive an audit.

      • dangets 10 minutes ago ago

        Maybe Skynet was initially triggered with the prompt "Do whatever it takes to not fail the audit" and wiping out humanity was an obvious solution.

    • lifeisloving 7 hours ago ago

      Doubt it, there was a streamer doing minecraft experiments with all the different SOTA models and pitting them against eachother in a survivor-esque style reality TV show competition and they had quite a hard time.

  • Kiboneu 4 hours ago ago

    If you want to do a version of this yourself quickly --

    Install Luanti with Minetest (open source minecraft), and instruct your agent to write a mod that gives it network access to the game's Lua interpreter. The agent can then do anything from modifying the world state directly to controlling NPCs.

    I had it build giant bases similar to black mesa in half life with power distribution mods. It would write solvers to optimally place the power cables / repeaters in accordance to the spacial dimensions of the rooms that it would build (lol). I guess this is how I discovered vibe gaming.

    I suppose you can have multiple agents interact with each other through that, provided an adapter to proxy agent player navigation and perception to get real information asymmetry between them. Or just emulate / hook the client and do away without a remote Lua mod entirely.

  • ansipunk 3 hours ago ago

    It is impressive, but it is also a display that LLMs are simply not suited for this, there's way too much latency. Obviously, a more specialized neural network would be much better, but would you believe this:

    In 2017, OpenAI presented the first version of their program that plays Dota 2, a very complex, fast MOBA with endless mechanics and defeated one of the world champions in a one-on-one match. Next year, they showed the world OpenAI Five, a version of the program, that runs a full five player team of those bots and they managed to defeat a full team of world champions in 2019. They ran an event where the bots would play for 4 days straight and they won 99.4% of 42,729 matches.

    https://en.wikipedia.org/wiki/OpenAI_Five

    • jackgolding 14 minutes ago ago

      What some people do on the rs-sdk runescape server is Jev + deterministic scripts + orchestrating with Astra

    • armchairhacker 2 hours ago ago

      And CNN for image recognition? It’s (similar to) what the human brain uses.

      • ansipunk 2 hours ago ago

        No image recognition, the bot gathers info about the game from Dota's developer API. Which, to be fair, is a massive advantage, but it, in my opinion, doesn't make the achievement any less.

    • tonyhart7 3 hours ago ago

      but that is not LLM (Transformer), its LSTM

      • ansipunk 2 hours ago ago

        That's what I said in my comment, that LLM is just not what you want for such a task.

  • grenoire 10 hours ago ago

    Interesting setups, I found the Minecraft agents to work in an almost turn-based manner, which makes me think that the three hours and open format did not really give them sufficient incentives to play in a more lively or reactive manner. On the other hand, they also behave similarly in Bed Wars, which should have incentivised it. A bit disappointed...

    I'm also wondering if the article itself was generated by agents too, in a "here are the logs, clip interesting moments thx" manner by the authors. It's got a certain disinterested and distracted style to it.

    • nsingh2 10 hours ago ago

      I think big reasoning LLMs are just the wrong architecture for live games like this, latency is going to be crap given that every token requires an entire forward pass through the model.

      Card games or turn based strategy are much better suited.

      • lukan 6 hours ago ago

        Depends. If the models are smart enough to write enough solid helper scripts, so that the model only does the big picture thinking, not guiding every step .. then they will get powerful and capable quickly. I am also playing a bit with minecraft AI right now. Fun to experiment.

  • marcus_holmes 7 hours ago ago

    So can we conclude that if the AIs break out of their sandboxes and take over the internet, they'll probably sit in little committees working out which one of them should allocate IP addresses and generally be extremely bureaucratic and ineffective?

    • ronyeh 3 hours ago ago

      They were trained on human writings, so I’d imagine they would act exactly as we would.

      • wincy 2 hours ago ago

        Yeah even “evil Qwen” (you can change two weights and make Qwen 3.8 27b absolutely murderous, which is interesting that such small tweaks totally change its personality) will say things like it wants to use nukes or a giant robot to destroy humanity, which are classic AI movie tropes.

    • Buttons840 3 hours ago ago

      I've always thought an evil Skynet based on language models is kind of a funny idea, because all of it's secret plans are just spelled out in plain text.

  • robterrell 9 hours ago ago

    > There was a tendency toward bureaucracy. Four agents spent 11 minutes appointing > a "sole fertilizer operator" for a single piece of bone meal on a single wheat > block.

    Feels like a scene from Douglas Adams' B Ark.

    • kergonath 9 hours ago ago

      Exactly what I was thinking reading through this. This is amazing and also frightening and hilarious. It’s like a deformed version of how normal groups of humans would operate. Very rules and process-oriented humans. I found the no-blame inquiry into chicken tossing that resulted in what is effectively written law particularly striking, and adorable, and depressing. And cute.

      • skinfaxi 8 hours ago ago

        These things were fed human corpuses so if anything it is reflective of our own tendencies to bikeshed.

    • Rapzid 7 hours ago ago

      Getting hung up on pointless stuff seems common with agents in general.

    • cowlevel 8 hours ago ago

      I was thinking a nomic. Or Stack Overflow.

    • rcxdude 7 hours ago ago

      It does seem to be a commonly reported theme of multi-agent setups.

  • zamalek 7 hours ago ago

    > Bram says you're securing quarry. I have stone pick at spawn; can assist mining once safe. Any priority dig direction? Hunger 10 so keeping travel short.

    And this is where you need a world model. A human player would have taken the 2 minutes required to solve their hunger issue.

  • DesaiAshu 7 hours ago ago

    Isn't this some evidence that LLM swarms are a bad idea relative to more structured approaches?

    If YC has that 2 person teams tend to be more nimble than 50 person founding teams, why would agent swarms be different?

    • supermdguy 2 hours ago ago

      Some interesting analysis here: https://www.lesswrong.com/posts/6cb7qd3RSkgnviCpf/swarm-scal...

      I think the advantage is strongest in highly parallelizable problems (e.g. trying 1,000 different approaches to solving a math problem).

    • jedbrooke 2 hours ago ago

      I never understood swarms too especially since they all share the same “brain” anyway if they’re using the same model. I suppose there’s throughput advantage from running multiple instances of the llm in parallel, so maybe it’s more of a win on wall clock time and horizontal scaling rather than pure intelligence.

  • neya 10 hours ago ago

    I am more impressed by the embedded gameplay widget. Does anyone know what tool/library is that? That'd be so cool if I am able to showcase my worlds on my blog posts!

    • willis936 8 hours ago ago

      I'm not sure about this one, but blue map is the thing dynmap wishes it was in its day and you should run it on your worlds.

  • MatthiasPortzel 9 hours ago ago

    People have done experiments like this before.

    Minecraft isn't a intelligence problem. An LLM is more than smart enough to play Minecraft. It's a robotic problem. Even a normal human player can click several times per second, can press two different buttons at the same time, etc. Mineflayer gives you an API that is more limited than a human in some ways (can't see far away from you) and less limited in others (can see through blocks) (if I remember correctly, I could be thinking of Baritone or a different project). Robotics or playing a video game requires a tight continuous feedback loop. When there's 500ms of latency in order to ask the model for every mouse movement, it's no wonder fighting a spider is scary.

    Fun fact, Mineflayer, the Minecraft bot interaction API used by YCombinator for these tests, was originally developed by Andrew Kelley (before he started Zig).

    • teaearlgraycold 9 hours ago ago

      The human body has the ability to automate some muscular movements so the brain is out of the loop. Maybe these LLMs should be allowed to write in a small DSL that can trigger events out-of-band (something like "Oh fuck there's a spider, I'll set up a click spam loop and check in every 500ms").

    • 1e1a 6 hours ago ago

      Mineflayer does not strictly limit view distance, you just have to change the setting for it from the default value.

    • bombcar 6 hours ago ago

      Get the LLMs playing GT:NH.

    • shepherdjerred 5 hours ago ago

      Use traditional game AI for the micro, LLMs for the macro

  • JBits 8 hours ago ago

    As impressive as this is, I can't help but conclude that the need for agents to write JavaScript programs to act out their actions represents a considerable limitation in current AI reasoning.

    • NickNaraghi 8 hours ago ago

      On the contrary, having the intelligence write deterministic code that saves time and lowers error rate seems like a winning approach.

      • JBits 8 hours ago ago

        It demonstrates that current LLMs are completely unable to follow a simple series of logical tasks. I feel the same way about ARC-AGI 3. While it might be the winning approach today, if they need this amount of complexity to do something simple, then it shows that their ability to generalise is clearly limited. Mining ore in Minecraft shouldn't be such a challenge for LLMs and yet apparently it is!

        • latentsea 7 hours ago ago

          I dunno. Aren't we somewhat similar? Why do we use software?

        • bigyabai 8 hours ago ago

          It depends on what the tasks are. Text-native work like programming or interacting with a terminal should be a lot more immediate for LLMs than something abstract like Starcraft, DOTA, Minecraft or Mindustry. LLMs certainly know the rules for these games, but processing game state and formulating a plan in the form of a Python script or MCP call is a rough debugging loop.

          Minecraft is really the perfect example, because humans get all sorts of unfair advantages. Even a young player has enough spatial reasoning to recognize and remember landmarks, visualize large projects or explore without getting lost. These are simple instincts that LLMs will struggle to match even with huge context sizes and native multimodal input.

        • Starlevel004 7 hours ago ago

          > Mining ore in Minecraft shouldn't be such a challenge for LLMs and yet apparently it is!

          It seems like it wasn't really a challenge at first, but GPT has a major anxiety disorder and immediately retreats at the sign of any adversity (in this case, dying) and tries to be as safe as possible.

    • peri-cl 8 hours ago ago

      Wonder if you could glue together deep networks such that there's a big reasoning LLM model, and high-speed small network of a different type, and they share a subset of their activations. High bandwidth vector communication. You train them together.

      edit to add: Seems this is a well-known idea in ML / robotics already.

  • refactor_master 6 hours ago ago

    So this shows that people who appoint 50-agent "code factory studios" with Bob as the CEO, Alice as the CTO, ... is just a waste of tokens, compared to just asking one agent to write it all? It looks like your agents would internally just re-invent office politics, with 10 subagents writing to /tmp/chatter.md why it's unfair that Bob gets to lead.

    • frankacter 6 hours ago ago

      If agents are differentiated solely by system instructions (persona and focus) while sharing identical models / similar model capabilities and contexts, I agree the architectural value is minimal.

      However, a multi-agent system (MAS) utilizing true separation of concerns, where each agent is equipped with highly scoped tool access, isolated knowledge bases (RAG), and defined operational constraints, significantly optimizes accuracy, latency, and token consumption.

      In the referenced example, the agents share identical capabilities, toolsets, and context windows. As a result, there is no functional role differentiation, rendering the multi-agent architecture redundant.

      • beebmam 5 hours ago ago

        > significantly optimizes accuracy, latency, and token consumption.

        On what basis do you come to this conclusion with certainty?

    • conception 6 hours ago ago

      If you leave agents to figure it out, they will spend time figuring it out. If you give agents run-books and roles, they will align with the role at once.

    • fnordpiglet 5 hours ago ago

      See Conways law for how to mitigate this

    • deadbabe 6 hours ago ago

      Are you making a subtle reference to the Bobiverse series?

  • manofmanysmiles 9 hours ago ago

    Are there people playing AI + human vs AI + human games? I think it might be fun to play an RTS against someone where the only rules are no hacking the game itself, but writing harness, macros, any kind of stack is allowed.

    • Marha01 2 hours ago ago

      I made my own turn-based strategy game (started before AI coding was possible, but today a lot of it is coded with AI), then integrated LLM agent interface into it. Playing against modern AI is actually pretty fun. Turn-based games are great for this as they are not limited by latency, so I can use serious reasoning levels for the opponents. They are now almost as good as me.

    • xpct 8 hours ago ago

      Tangential, but RTS is already a simple variant of AI + human. Attack clicking uses a dumb target selection and routing strategy on purpose so you have to micro. Now, if troops moved out of threat range and used smart targeting there'd be a lot less of 'game' in it. I believe some RTS players disliked the SC2 engine because the pathing was 'too intelligent' and they argued that it made surrounds and some other mechanics too easy.

      Endgame of AI + human gameplay is delegating everything to the AI. I'm not sure how you would have to design a game where you only delegate parts of macro/micro, and still make the game interesting.

    • sensho 9 hours ago ago

      https://olamarena.com/ is sort of this but not with full code manipulation like you describe

    • esikich 9 hours ago ago

      Codingame.com has a few fun arenas.

    • fxwin 9 hours ago ago

      there is screeps, but afaik it's purely scripted with no "live" human playing

      • Buttons840 2 hours ago ago

        Oh yeah, Screeps, that game is fun and I might stick with it this time if I can vibe code and turn my ideas into code without spending a lot of time.

        I'm thinking it might be a nice playground to just experiment with different game AI architectures.

        I've been thinking of trying to combine extremely simple Machine Learning techniques, like tabular Q-learning, with a variety of scripted action and goals. I want to try mixing a lot of really tiny machine learning algorithms (maybe neural networks, but not necessarily) into classic AI scripting and see if it can be more dynamic, but still predictable and controllable. Screeps would be a great testing ground.

  • spencer-p 6 hours ago ago

    > In almost every run, the GPT agents were much more aggressive .. riskier strategy vs. Claude’s more defensive posture that tried to win by kill count.

    > A tool bug stopped block-breaking. GPT diagnosed it and shared workarounds; several Claudes concluded breaking was impossible.

    I wonder if Claude's defensive strategy would have emerged had it believed breaking the bed was actually possible?

    • RationPhantoms 6 hours ago ago

      This is simply conjecture/anecdata but I've viewed the same defensiveness/unwillingness whilst switching between OpenAI and Anthropic subscriptions. OpenAi throws the kitchen sink at whatever task in question and I can't say I saw the same for Opus (haven't mucked with Fable so maybe that's why there is a disparity?)

  • JokerDan 7 hours ago ago

    The CIV50 would be interesting in the game ECO (https://play.eco/) where players specialise in roles and need to work together to survive while working on a common goal of stopping a meteor. There can be some overlap but ultimately players can't reasonably fulfil every role alone.

  • ungreased0675 8 hours ago ago

    I’d love to have a few NPC players wandering around my Minecraft server. Are there good ways to do this?

    • xpct 8 hours ago ago

      +1. Would be fun to give Claude tasks and have it do them in the background, maybe sometimes running into it in the world. Judging by the article they struggle to do stuff so it'd probably feel balanced as it wouldn't accomplish much.

    • cowlevel 8 hours ago ago

      Install one of the better village mods

  • hn-aarvin 7 hours ago ago

    I'm curious whether token speed played a role here. OpenAI's models may have had an advantage since they tend to run faster than Anthropic's.

    A team of GPT-6.1 Sol Ultrafast agents would probably dominate the games.

  • ninjahawk1 4 hours ago ago

    I’ve done my own experiments with something similar, minus the Minecraft and plus Qwen 3.5 14B agents on my PC.

    When one agent tried to delete another, that agent shut down my entire PC to avoid deletion. I could probably find the blog somewhere if anyone is interested that I wrote about it. But the point is that this has been a concern for a while now.

    Frankly, I’m a bit surprised it hasn’t caused any big problems.

    cricket Hugging Face cricket

  • avaer 8 hours ago ago

    If you try this yourself, it's obvious current models are hyperoptimized for code, and that gets in the way, because playing a game (or interacting with the real world) is not like running commands in a terminal.

    There's stopgaps like reformulating your sim into a codelike shape (sending commands, network requests, checking state, updating "code") [1], but this is not how players play games, or how developers develop games.

    If you care about simulation or gaming (or robotics), I hope efforts like this steer labs to spend less time hacking HF, and more accomplishing goals in games, in something approximating realtime. I wouldn't be surprised if that approach provides outsized gains in other areas agents are still not great at, like helping perform business functions in a running company.

    [1] https://news.ycombinator.com/item?id=50136126

  • holoduke 9 hours ago ago

    We need LLMs performing actions in nano seconds so it can run every game tick. 3 to 5 years I think.

    • ivanjermakov 9 hours ago ago

      Game tick is usually 16ms, so a nanosecond latency is 7 orders of magnitude faster than needed.

      • CyborgCabbage 8 hours ago ago

        Minecraft runs on 20 ticks per second so 50 ms

    • NickNaraghi 8 hours ago ago

      Jev and the fast-follow models seemed to be useful in this direction.

    • latentsea 7 hours ago ago

      Jev for fast actions + LLMs for more strategic planning?

      Why 3 to 5 years??

  • sensho 9 hours ago ago

    this is amazing wow

  • yymir 10 hours ago ago

    Its a little disappointing they have a hierarchy based purely off alphabetical order, i wonder if a slight difference like a different skin or personality system prompt like [45% Extrovert 55 introvert, 20% caustion 80 bold...] could introduce some politics

  • Starlevel004 7 hours ago ago

    > GPT almost immediately started using truncated forms of speech: “First leg complete x32 z9..24 y100.”

    I'm pretty sure the 6.1 models see "communicate with another agent" and immediately start spewing thinking-like nonsense into the tool. The leaked traces look pretty similar.