AI coding can be frustrating

life with DA

I am having some pain on the AI.

You know you see the computer players do something dumb and you instantly think that the AI programmers must not know what they're doing. "Why didn't they think of X".

But normally the thing is, the AI developer DID think of X but the AI still isn't doing it.

I have this marvelous bit of code that the AI intelligently weights how close good planets of other environments are, how far they are, and how close other opponents are to it. It then is supposed to prioritize researching those colonization techs.

Tonight, I saw the AI research barren planet technology. One problem: No barren techs.  The AI shouldn't even try to research the tech. I stare at it with no avail.

Found the cause later tonight but ack, so frustrating.

 

83,821 views 18 replies
Reply #1 Top
I can imagine it's difficult to get the AI to do what you want, even when what you want them to do is both theoretically and practically feasible. Two questions: is the pop up with the information about what the Korath are researching a debug feature or a new espionage interface? And I almost don't even want to ask so as not to cause any more headaches, but any luck in using the same marvelous bit of code to change how the AI evaluates the colonization techs for trade?
Reply #2 Top
is the pop up with the information about what the Korath are researching a debug feature


Yep.
Reply #3 Top
Hmm this could be useful. Personally I never had the motivation to dig up what a race is currently researching, as it was buried deep in civilization statistics or some place like that.

With my very limited programming experience I can only imagine whats it like to code a complex system like AI. Now that I have seen couple reacent block buster game releases with terrible AI, I appriciate draginols coding skills even more
Reply #4 Top
Ick, i couldn't get past basic classes and functions in Java, how the heck you code this amazing AI with a crew of like, what, 2? (you and frogboy?) i have no idea

and on the note sam0t brought up - why the heck don't more big 'blockbuster' games have good AI? is the single player genre just that dead to the populace? *sigh* so much for being anti-social
Reply #5 Top
It's times like this some forms of weak scripting aren't bad or unrealistic- no matter how much you guys try to stick with your no-scripting rule.

As a player, I don't mind scripting if it fits these two criteria

a) It scripts to avoid something a human player who has played a couple of games would never do

b) It isn't exploitable by the human

Two areas of particular concern

1) The AI putting the wrong improvement on a bonus tile, when there aren't other non-bonus tiles avaliable.

2) Researching an environmental tech when there's no planet of that type avaliable, or when all known starts are surveyed. Also, in those cases, the value of that tech to the AI should be scripted to 1.
Reply #6 Top
(you and frogboy?)


Draginol *is* Frogboy
Reply #7 Top
"and on the note sam0t brought up - why the heck don't more big 'blockbuster' games have good AI? is the single player genre just that dead to the populace? *sigh* so much for being anti-social"


In my own pathetically limited experience with AI, I've learned that 'think-ahead' has to be tied to how much the AI knows about how its environment works. In games where the AI isn't learning from scratch, there is level of foresight as to whether the next move will actually produce a desired result. I mean, that's we know better than wasting our time.

Awareness is the key. In systems where the AI is too aware, it's as if they can predict the future. In systems where they aren't aware enough they seem bumbling or random. The amount of awareness an AI has is keyed to how much the AI can sense, and how it senses it, and how it can relate those sensations to what it knows about the task at hand.

...which creates overhead. When you look at a game like, say, Oblivion, that can become staggeringly complex. People complain about pathing issues, etc., but how many billions of years have gone into your ability to maneuver around the environment, and if you codified that subconscious knowledge, what would be the cost of such a resource in terms of system resources?

I doubt it is easier in a game like this, only different. There's a reason that people get years and years of higher education in things like economics, business administration, and even military tactics. Translating that to AI in such a way that the AI performs well without being "God" is a daunting task, no doubt.

Reply #8 Top
Coding AI can be frustrating?

It sounds to me like an open admission that coding AI can be frustrating.
Reply #9 Top
Coding AI can be frustrating?

It sounds to me like an open admission that coding AI can be frustrating.


All coding *can* be frustrating

Coding AI *is* frustrating.

Especially when some dumbass professor gives you the design... that is bogus... and... ugh... if you code AI you are a better man than I
Reply #10 Top
Draginol may be Frogboy, but he still counts as 2. He's THAT good.
Reply #11 Top
I think what needs the most work is the diplomacy screen AI. I mean, I've had it where I was offering the AI something like 20,000 credits in exchange for only 2,000 and the AI refused. The AI should *never* refuse any offer like that! I mean, If I offered you 100 dollars in exchange for 10 dollars, there's no way you would refuse. It gets frustrating, because sometimes you really want something that the AI has, like a resource star base, but you can't make them "an offer you can't refuse", you could offer them the grater part of your empire and that stubborn AI would still say something like "do you think I'm stupid?"
Reply #12 Top
For challenging, normal and below, such trades would kill the ability to sell the game. At higher levels, however, the diplomacy screen should be more reasonable.

I've moved away from tech trading. I leave it on but just about any tech can give the AI a late game advantage. Not interested in helping the enemy at all.
Reply #13 Top
I just played my first suicidal game today, and it seemed to me that the only thing that got fixed in the diplomacy screen is that the AI wouldn't let me sell a technology for many thousands of credits, bankrupting them and making myself rich. In fact, there seemed to be a cap of about 1000 credits, past which they wouldn't deal with me.
Reply #14 Top
Being a former programmer, now retired, I can sympathize with your sense of frustration. On the flip side, however, I see the task of successfully tracking down some elusive program bug as representing a win in what is the ULTIMATE computer game. Personally satisfying, yes, but you get very little in the way of high fives, back slaps, or applause.
Reply #15 Top
p with the information about what the Korath are researching a debug feature or a new espionage interface? And I almost don't even want to ask so as not to cause any more headaches, but any luck in using the s


QFT.

Reply #16 Top
Just to say it, though it has already been stated many times before, I love this game! I do not yet have even a preorder of DA, but hope to have one soon.



Okay, back to what I was going to post about>.>...



I am an amateur programmer, currently learning C and C++. I love games and have made a very basic RPG that wont turn into something without bugs because of my team being afk constantly...damn people and having lives! Well, AI for my RPG is rather dumb, but it serves its purpose.



This game is better then the AI in all games that I have played in the TBS genre, and it uses the types of attack and defense well. I have not had the pleasure yet of seeing a minor race, but like the idea of seeing what they can do.



I can see how AI is hard to code. How many people other then Draginol are there on the AI team? I give all accolades to you Draginol if you are truly the only one coding this marvelous game. Do you do everything in C++? or do you use other languages as well? Also, do you have each civ's AI have its own complete file or are they split up (Economics, Military, Research, etc...)?



I am looking forward to playing DA and hoping it comes out soon.



GalenEvil

Reply #17 Top
I hope it will be in our life time that computers start to code themselves. That would make for some interesting AI.
Reply #18 Top
If Stardock had the resources, they could hire some high-powered people with Ph.D.'s who wrote their dissertations on this subject. The problem is we've all got six-figure jobs in the business sector instead. But when you talk about coding an AI, that is the calibre level of work you're talking.