Remix.run Logo
JumpCrisscross 7 hours ago

Has anyone built better AIs for this?

egeozcan 6 hours ago | parent | next [-]

When I was a teen I was mostly writing RA2 custom map scripts and rules/units for my friends and watch them battle with my rules in internet cafes. When that was not possible, I was creating custom RA2 AIs, but it was very hard.

These days, I'm having incredible fun developing good old AI scripts with LLMs, for my own vibe-coded RTS game. Just choose all AI players here to make them battle each other: https://egeozcan.github.io/unnamed_rts/game/

I even let the LLM generate a tournament script to make AI scripts from different LLMs battle (headless): https://github.com/egeozcan/unnamed_rts/blob/main/src/script... GPT-5.5 leaves all in the dust currently. I cannot beat most in the game I set the rules myself :)

If you are like me, you can just make LLMs create your personal RTS game and also develop custom AIs. It's so much fun.

wahnfrieden 6 hours ago | parent | next [-]

Were you familiar with my modding site RA2Factory?

egeozcan 5 hours ago | parent | next [-]

Yes! I downloaded a lot of shps voxels and map packs from your site! I think it was the beginning of 2000s? Anyway, a very delayed thank you!

yard2010 4 hours ago | parent | prev [-]

You are awesome, thank you for being such a magical part of my childhood

b112 4 hours ago | parent | prev [-]

Huh. You know, I wonder. The API provided to AI scripts must have enough info for limited strategies, but I've never seen what's what. You have.

What are the possibilities for just giving Claude that each turn. Yes, insane over kill, but in a couple of years Claude level AI will run locally on laptops...

egeozcan an hour ago | parent [-]

I'm really not sure about the timelines, but I can easily speak to the state of things for today: LLMs are very wasteful and slow for real-time decisions. The "thinking" ones have no chance and if you disable thinking, they really struggle with querying the context with the right calls. For the once in a moonshot scenarios that they have enough context and ample time to react, they are great!

Developing AI scripts, however? They are crazy good! I try to re-balance the game to give a little edge to the humans, then it takes a single iteration for your not-even-sota LLM to destroy me. I mean I'm not the fastest RTS player but for the lack of skill, I have the advantage of being the designer of the game :)

About the RA2 AI scripts: You can react to enemy faction, composition etc. but it's impossible to program it to pull back its tesla tanks when they are under threat from a bunch of rocketeers. Those things are hard-coded in the game engine. I think the only exception was the DeeZire mod which patched the game exe, if I'm not hallucinating.

apitman 4 hours ago | parent | prev | next [-]

I know you meant player AI, but now I'm imagining an RTS where every unit is running a small reasoning LLM.

doublerabbit 4 hours ago | parent [-]

It's already in the works. NDA but the studio I gig at, their Ai love to send NPCs off cliffs.

Because there is no collision between the sky and floor it determines that this is the quickest route. Even with zoning it does something you'll never think of.

Using LLMs as NPCs can be hilarious to watch.

_superposition_ 3 hours ago | parent [-]

I need to hear more. That or start my own NPC circus.

logdahl 7 hours ago | parent | prev | next [-]

I might suck but I found it really hard iirc :^(

dogma1138 6 hours ago | parent [-]

AI in strategy games always cheats I haven’t seen a single game where the AI wasn’t built around cheating. Once you figure out how it cheats it’s usually a combination of resource multipliers, build time multipliers and not having a fog of war it becomes much essier to beat at any difficulty.

ben_w 6 hours ago | parent | next [-]

Not always.

For a lot of games it can be surprisingly easy to make an AI which beats the median player even when limited to just basic strategies, simply by not getting distracted by the gut feelings that humans have.

Even for more complex strategy games like say Starcraft II where that's not enough, there's this: https://en.wikipedia.org/wiki/AlphaStar_(software)

jtolmar 4 hours ago | parent | prev | next [-]

There's a whole scene around making bots for Starcraft: Broodwar, using an API (BWAPI) that doesn't allow cheating. They're quite good now, better than most humans. But the top bots still can't beat a pro, or even a high ranked ladder player.

invader 6 hours ago | parent | prev [-]

Often, but not always.

I hate the term "AI" applied to games, since AI means so many things and usually implies something smart, "intelligent". But in reality, it is more like a "bot" or a "computer player". And the main goal is not to be super-smart, but to be plausible enough and provide an appropriate challenge to the human player.

There are some "fair" bots in games - like in my favorite turn-based Mechanized Assault and Exploration from the mid 90s. Computer players follow the same rules as the human ones - e.g., if something is not visible to the radar, the computer will not see it. The only "cheat" is the resource boost computer players can have on the higher difficulty settings, but it is totally optional. And as an experienced player, you always let the computer have it, since you want a challenge, and without that boost, it has no chance whatsoever.

Sharlin 6 hours ago | parent [-]

Real-time strategy AI is absolutely AI in the standard Russell & Norvig sense of AI. There's nothing about the computer science concept of AI that implies "super-smart" or always trying to outsmart the player (rather than trying to be entertaining).

Continuously shifting the goalposts of what "AI" is is, of course, a well-known phenomenon, giving rise to what's called the AI effect or Tesler's theorem [1].

[1] https://en.wikipedia.org/wiki/AI_effect

invader 5 hours ago | parent | next [-]

Maybe it is, given that the classical AI definition is so broad, it can mean almost anything. But for me, there's a fundamental difference between something that "tries to be intelligent" and something that "tries to appear to be intelligent".

That is why I prefer to call them "bots" or "computers" - just to separate them from a shifting mess of definitions of what "AI" actually means. It reminds me of "Destination Void" by Frank Herbert, where the main characters were trying to build artificial consciousness and were struggling to define what it actually means.

stephantul 5 hours ago | parent | prev [-]

Thanks for introducing me to the article! I’ve experienced this myself but didn’t know it had a name.

singpolyma3 6 hours ago | parent | prev | next [-]

Does the project allow AI?

tremon 6 hours ago | parent [-]

Old-skool AI, aka cpu opponent.

9dev 7 hours ago | parent | prev [-]

Pitching in on this with a tangent - how good are LLMs with RTS games these days? As someone without friends into that genre, it’d be pretty cool to play eg. AoE II against a capable computer that play like a real human…

clates 6 hours ago | parent | next [-]

Depends on what you mean, LLMs can probably _make_ pretty good AIs. It'll have all the AI scripts in the base game, including the three iterations (base, FE, DE) all the user generated ones ( including barbarian ) and then able to consume the language schema. Rig up a baby model that takes the matchup during loading and hot swaps one of your pregenerated AI scripts.

If you meant _playing_ raw based on LLM input - that's probably the wrong tool for the job. The latency for you to react to a mango shot is faster than a billion tok/s lol

yard2010 4 hours ago | parent | prev | next [-]

Instead of driving the agent with an llm, it might work to use the agent to hard code heuristics, and use some kind of a simulation to benchmark its skills? Then feeding the results back to the agent so it can improve the heuristics?

HeavyStorm 6 hours ago | parent | prev [-]

It's improving but sota models are now too slow for a real time game. Training a specialized neural network would be more effecient.