Need features for my RTS-AI Asset

Hey fellow devs,
After studying games programming for one year, I am facing my first bigger task which will also be a big part of my portfolio.
I have around 4 more weeks to find my topic and then I have around 6 months of developing time. The first year I found a lot if interest in programming AI and for my local job opportunities a RTS style AI would be very fitting.
Ideally I want to reach a quality which is worthy to put on the asset store in the end( basically my goal beside making a great project).

So finally my question for you guys is:

What features would you expect from an Asset that helps you with your AI in an RTS game?

This is a big topic. You built any heavy weight AI before? Building a generic RTS AI is a huge job. Anyway, enough on that.

Features I would like

  • Path finding
  • Local unit avoidance
  • Resource gathering
  • Attacking
  • Defending
  • Basic diplomacy
  • Fog of war
  • Exploration
  • Goal setting
  • Modes (aggressive, defensive, technology)
  • Tech tree negotiation

That’s off the top of my head.

Hey,
firstly thanks for you input.
Besides writing a basic a star and writing my thesis(which is not to big at our school ~10k words) about this topic and reading books about it not really. I have a lot of time for this in the half year and if needed I can scope the features I expect to get done for the practical task in my school, and work later on the others before releasing it.
And thanks for the features seems like a solid list already :slight_smile:

Other people will probably add more things to the list. Just be cautious of the scope of this project. It has the potential to get massive on you. Do you have a working RTS frame work to start development with?

No, to be honest I didnt even consider it yet. I was going to start from zero and did consider to maybe use a working a star as a start to get that off the list.

Even A* requires you to know underlying structure: what exactly you receive? Tiles/graph? How many nodes can there be, how many neighbours node can have, what are specific movements between nodes you need to know? You know, tank can’t climb a ladder. And as generic solution you need to be able to work in any cases (=isn’t optimal performance-wise).

Building a generic A.I. is so huge project that I doubt you won’t really go farther than behaviour trees (already existing asset) or state machine (also exists). It would need to know what it can do (Can it move unit? Can it use skills on units? Can unit access other objects?), know what happens as a result (that part is still manual; there’s no way for A.I. to know what happens when unit it controls accesses terminal/building/whatever on level) and evaluate what it should do at given amount of time (what formula? In general case there’s none, so that’s machine learning - which is pretty very hard to control and get good results from). Also how would you plan out different strategy levels: Unit is operational level - then how would you do squad Tactical level based on what a single unit can do? How do you mix squads and decide what to create/build in Strategy level?.

Or you’re doing framework with ā€œwrite A.I. based on thatā€ which isn’t really helpful as good A.I. programmer already knows what he needs and framework will most likely limit him.

1 Like

There has been a RTS Starcraft AI tournament the last couple of years (link 2015)

I would seriously give this a look as they will already be breaking new ground and improving the level of AI in RTS games and they will be more focused on AI in RTS games than a general game engine forum.

Rock Paper Shotgun article on the tournament (link) that talks about the different strategies the bots have used.

1 Like

Thanks for your input guys.
The overall impression seems like a generalized rts A.I. with a niveau that is ready for the store seems pretty unreachable, and I really understand your arguments.
Since I know I am bad with coming up with great ideas and often underestimate the scope of things I am posting this with a month time to find the right thing.
I will think about your arguments a bit more, the first thing that comes to my mind is maybe making a small game with RTS AI features that I choose like adding formations, local unit avoidance when moving and open source it for others in the end
(which maybe would lower the bar and help other people).

ProgBombo I like your interest in the subject and your wanting to make an RTS AI. Personally, I have a need for an RTS AI right now. I was planning (and still am) on making it myself, but I’m always looking for assets that can make my job much easier. The main reason for this is because I need the AI to work with all of my systems and code architecture that has slowly accumulated over time.

I’m telling you this because if you try to make an RTS AI, it will somehow need to be super flexible, and highly modifiable in my opinion. BoredMormon already mentioned most, if not all, of what I would look for in an AI, but I’ll give you what I would want:

  • Ability to analyze map/terrain for resources, and send units to collect those resources
  • Ability to place buildings and detect if other structures or units might be in the way before placing them
  • Attack the player
  • Have at least a low level understanding of unit composition and be able to defend attacks (without ā€œcheatingā€)
  • Be able to prioritize certain tasks if needed (like should I be building an attack unit now, or a resource collector)

As I have not yet delved into the depths of AI, I’m not sure how hard any of this is going to be. But I know it needs to customize to fit to my game, and how my game is structured.

I think if you choose to do an RTS AI, you might get overwhelmed (especially if you are just starting programming), but I don’t think you should let that dissuade you though, because it will probably be a great learning experience. :slight_smile: Because no matter what you do, everyone has to start somewhere. And even if you fail, or only manage to have the AI do a few tasks, you’ll learn a lot in the process. Good luck with it.

Hey Velo,
thanks for your answer. I slowly realize how general, open and modifiable it needs to be.
On one site I want to put an impressive portfolio piece and push myself to the limit , but on the other site I need to predetermine the features and reach them for my school project, so I sadly need to stay realistic :).
But since I have around a month more time , I am sure I will find the right thing!

You could create a configurable AI system that is in essence quite basic, e.g. expects to sit on top of a system that has basic RTS system like pathfinding.

But you can configure the strategy or style of the bot e.g. Defensive, Aggressive, Limit Branches of Tech Tree.

Then add a genetic algorithm to find optimal island’s, levels of play and you have a basic RTS AI system that people can build into their games.

Arowx what do you mean by ā€œoptimal island’sā€. Are you referring to certain states of the AI?

You reminded me though something I forgot to say to ProgBombo, that in my own case, I already have an existing RTS framework essentially, so I would just need an AI that works with that framework. Because things like Pathfinding, and Fog of War, etc… (like Arowx mentioned) I already have built-in to my system.

With any kind of search be it pathfinding or optimal strategy there can be islands within the search space that are sub optimal.

Think of any kind of search or AI as a way to explore a landscape of potential solutions, within that landscape there are hills and a mountain range and a highest peak. That highest peak is the optimal/ideal solution within that search space. But it is very often depending upon how wide you search to find your AI system works it’s way to a hill/lower peak or island within the search space.

In some cases this is computationally very expensive e.g. to search the impact of choosing what unit in an RTS to build and how to use it could be very large, think: map size, enemy actions, temporal space, unit specific actions.

And this expense limits your AI’s breadth and depth of search within the landscape.

Ah, I see. Conceptually, I can kind of understand what you’re saying. I feel like I’m nowhere near the knowledge level required to practically implement something like that yet. It would be cool though lol.

Sadly the same for me :smile:

AI is all about moves or choices, does a piece move here or here, the search then has to play the opponent’s potential moves.

Choices can be as wide as choosing an RTS faction or as small as moving a single unit. The art of AI is searching this massive potential space in a smart way. e.g. Building only miners will not win an RTS game (or could it?).

But if you separate the ā€˜AI’ into sub systems, scouting, harvesting, defence, attacking you could make a good or even great modular AI system.

Maybe just giving the Developer the chance to weight the areas like I used it at an easy flocking combination