🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

space strategy game AI

Started by
16 comments, last by Qatal 22 years, 5 months ago
I am working on a game called SOL, which is an extremely advanced space strategy game (mmorts) to rival the hypothetical "homeworld-VII". Part of what our designer says makes it so "advanced" is that it has an AI (my responsibility to code) that is capable of playing at least as well as the average player, and not "cheating". how would one do it? I have coded other such games in the past and got to the "basic actions" level intact, and completed most of that, but actually tying it all together at a level higher than the "whims of the ship commanders" is quite difficult implementation-wise, NN, GA, FuSM, etc have all been read up on, but I can''t quite find a good solution. PLEASE HELP! I want the AI to be capable of running via TCPIP on a low-end PC (=P90 ish) and hooked up using DCOM to the big servers. Also, how does one make an AI that can interpret limited english and respond appropriately without "hardcoded commands" that you have to type. die or be died...i think
die or be died...i think
Advertisement
I intend to write an article on exactly that in the next week or so - I''ll send you the link when I''m done.

Has your designer actually got any ideas for the AI, or have they just "designed" the game on the basis of having a great AI and left you to code it?

Actually writing a decent AI is not an easy problem and requires an excellent understanding of the game itself. The architecture of the AI is probably less important than your understanding of strategy and general game theory.

As for the "limited english", search the web for basic natural language processing. You should be able to define a small vocabulary for your users pretty quickly.

>Has your designer actually got any ideas for the AI, or have >they just "designed" the game on the basis of having a great AI >and left you to code it?

I think that most of the "nailed-down" stuff largely concerns comms between AI and human players. Everything else is a little sketchy.

He had an idea that the AI could be comprised of a number of FuSMs with a chain of command, mimicing the way the military does operate. Each capital ship would have an AI "captain" who was responsible for deciding the tactics, maneuvers etc of that ship, a fleet would have assigned to it higher-ranking officers up to Admiral, who would issue "high-level" very general commands to lower-ranking entities.

The AI was to emphasise the smooth running of services that "are there" in a futuristic, explored galaxy, such as a trade network, or perhaps several running concurrently, as to throw a bit of the old business simulation in there, and shipyards, etc for bigger ships that a player does not possess facilities to produce...

Being a multi-player game, it is important to delegate the powerful but routine and having-to-be-there positions to AI to prevent newbie players getting wiped out.

Qatal

die or be died...i think
die or be died...i think
Hmm I''m not really sure what your goal really is in this case.

Do you want AI as a player? Or do you want it as a simulator for an environment ? There''s a big difference between the two...

in a way, both. though it must *appear* to be very,very intelligent.
die or be died...i think
Sorry, but Im finding this thread to be very hard to answer. It is basically another how do I make AI for my game situation which no one can answer but you.

There are a huge number of undefineds for us readers!!!
-what AI agents do you need/have: your using chain of command, so some agents take orders, some take and give orders, and some just give orders. Other agents? Is this strickly military or are civilian? You said trade, so a freelancing style agent needs to be designed.

-How does your universe work?? You say its an rts, so read up on the other threads about RTS AI, SPACE CHASING AI, or search this forum for similar ideas like RPG AI. Like terranfury suggests... INFLUENCE MAPS(3D form for this type?)

-Design of AI? Sounds like Event-driven AI is surely the way to go for Passing messages to game objects and will come in very handy for tcp/ip. I havnt implemented AI yet, but usually SCRIPTING may be necessary. You hardcode functions, but you dont hardcode the data... that is a fact in any game development, not just AI. FSM are fairly simple in concept, so why not start with that and add GA or other latter?

From the looks of it, i think you need to set up a meeting with your "designer" and find out what he wants and to have him spill the beans! If he is in-charge of how the game should operate, then you need to get serious with him...else he is just saying "get it done". If thats the case...good luck, youll need it!


Edited by - GalaxyQuest on January 11, 2002 3:39:25 PM
I''m agreeing with GalaxyQuest here. You need to find out exactly what the AI needs to do. Simulation != Competition.
Sounds like you''re on the right track here with the idea of a chain of command based AI. Combine this with specific ''needs'' and you should have a fairly good idea of how to start implimenting it. Let me give you an example to illustrate what I mean:

Lets say you start with an Economic AI. This specific AI looks at the resources available and sees they need more of the metal Frustrum to keep up economic production. So, the Economic guy sends a ''need'' to the military AI stating ''we need more Frustum''.

The Military AI at the Admiral level sees this generated need and looks around the starmap for a star system that has known quantities of Frustum that they don''t own. Then the Admiral AI ranks the systems in order of most Frustrum for least work (ie, the weakest defended system that has the most available Frustrum). It then sends a ''need'' down to the sector commander saying ''Take the HighMineral system''.

The Sector Commander AI then looks around it''s section of the galaxy and pulls ships from various other places to create an assault force on the HighMineral system then sends it off.

On reaching the HighMineral system, the Task Force Commander AI takes a look around the system map and positions it''s forces to destroy the enemy Zap ''O Gun posts then sends a ''destroy target'' need down to the forces.

Individual captains then manuever to destroy the Zap ''O Guns, thus satisfying the need.
"Diplomacy is the ability to tell someone to go to tell in such a way as they look forward to the trip."
If you are making the AI do things that involve moving around goods and other units for Trade and Supply, it would be a good idea to look into Linear programming, and Management Science which describes exacting ways to formulate what ''Truck'' or ''Ship'' goes where and when. It would help your AI be smarter than the average joe when issueing some commands, and without Cheating either.
As humans we are all gods, just to different extents of power.
As regards the human-like speech interface without specific commands:

Did you ever play the game Starship Titanic designed by the late Douglas Adams? To tell the truth the game itself was a bit of a disappointment, but it featured just such an interface, which proves it is possible, even if, as in my experience, it only seemed to respond when you swore at it ;-)

I''m not at home at the minute, otherwise I could possibly find the box and tell you the name of the software that did this, as I''m fairly sure it was a 3rd party contraption with seperate trademarks. If you look up info on the game though you might be able to find out something about it - it sounds like you''re working for a commercial outfit here, so you may be able to save yourself some headaches by buying such a product in.

Sorry for being so vague, but it was a long time ago that I last looked at it.

John

This topic is closed to new replies.

Advertisement