Richard Heaton Richard Heaton

1.04 AI cheats on tech tree, gets free techs from nowhere (bug?)

1.04 AI cheats on tech tree, gets free techs from nowhere (bug?)

I am not sure if this was a problem in 1.03. The computer will skip techs and cheat to get big ship techs. Here is a saved game which proves the point (.rar format):

http://www.restorethepledge.com/rapacity/GalCiv/techcheat.rar

The Altarians have battleship technology. Now, there are only two ways for that to happen. The first is for them to get it from somebody else. Go talk to the other races. Nobody else has it, so he can't have gotten it from one of them.

The second way is, of course, for him to research it himself. But if you talk to him you'll see that although I have interstellar tactics, he does not. So he can't have researched it. He appears to have simply gotten it from nowhere.

I suspect that the computer is also getting these techs without paying the development cost. Even if I beeline to dreadnaught and and ahead of the computers by a large margin in technological development, they beat me there. They also get dreadnaught technology practically instantly after getting battleship technology, even though it takes my superfueled researchers over 10 turns to research it. This part is harder to be sure about... maybe I'm overlooking something. But at any rate the computer should not be able to develop techs without having the requisite techs, or conjure them out of thin air when there's nobody else to get them from.

-Drake

~SDC~
4,201 views 123 replies
Reply #51 Top
The discussion has been on the Altarians. The Arceans, by contrast, do have a set list of techs they research based on metaverse data. That would require more research to verify if that there's a problem. However, I've been explicitly asking whether this was the Altarians and over and over again the answer has been yes, it's the Altarians.

If someone wants to go over the tech list, I can post it:

Here's the one for the Arceans:
{120,1,7,2,11,122,90,123,119,102,54,8,106,107,129,63,55,95,64,104,69,37,72,100,121,6,126,142,133,118,3,9,92,124,40,41,42,13,33,34,57,58,59,14,17,20,21,38,5,12,66,91,45,98,50,26,101,108,19,109,32,94};

This is taken from the metaverse data of one of the top players.

~SDC~
Reply #52 Top
One for sure problem with that tech list, one maybe.

Here is that list as expressed in Tech Name (it's a little easier to understand this way):

#1 Align: 0 Name: CommunicationTheory
#2 Align: 0 Name: UniversalTranslator
#3 Align: 0 Name: Diplomacy
#4 Align: 0 Name: NanoElectronics
#5 Align: 0 Name: Sensors
#6 Align: 0 Name: MedicalTheory
#7 Align: 0 Name: BasicEnvironments
#8 Align: 0 Name: IndustrialTheory
#9 Align: 0 Name: PropulsionTheory
#10 Align: 0 Name: ArtificialGravity
#11 Align: 0 Name: ControlledGravity
#12 Align: 0 Name: Trade
#13 Align: 0 Name: InterstellarBusiness
#14 Align: 0 Name: InterstellarMarketing
#15 Align: 0 Name: ZeroGravityResearch
#16 Align: 0 Name: NanoFrequencyElectronics
#17 Align: 0 Name: NanoMetalComposition
#18 Align: 0 Name: Nanobots
#19 Align: 0 Name: BrainMapping
#20 Align: 0 Name: AdvancedDiplomacy
#21 Align: 0 Name: TerraComputers
#22 Align: 0 Name: OrganicPiecing
#23 Align: 0 Name: AdvancedArtificialIntelligence
#24 Align: 0 Name: AdvancedTrade
#25 Align: 0 Name: DefenseTheory
#26 Align: 0 Name: Deflectors
#27 Align: 0 Name: BattleArmor
#28 Align: 0 Name: AdvancedEngineering
#29 Align: 0 Name: SpaceMilitarization
#30 Align: 0 Name: WeaponsTheory
#31 Align: 0 Name: Phasers
#32 Align: 0 Name: Shields
#33 Align: 0 Name: EnergyChanneling
#34 Align: 0 Name: InterstellarTactics
#35 Align: 0 Name: ImpulseDrive
#36 Align: 0 Name: Antimatter
#37 Align: 0 Name: WarpDrive
#38 Align: 0 Name: Battleship1
#39 Align: 0 Name: InstantCommunication
#40 Align: 0 Name: _1DPhasing
#41 Align: 0 Name: HighDensityMetals
#42 Align: 0 Name: BistrontAlloy
#43 Align: 0 Name: LargeScaleBuilding
#44 Align: 0 Name: Battleship2
#45 Align: 0 Name: Alliances
#46 Align: 0 Name: StarDemocracy
#47 Align: 0 Name: StarFederation
#48 Align: 0 Name: GeneticMapping
#49 Align: 0 Name: Photons
#50 Align: 0 Name: Drones
#51 Align: 0 Name: VirusElimination
#52 Align: 0 Name: ImprovedEnvironments
#53 Align: 0 Name: NanoMining
#54 Align: 0 Name: InterstellarDamageControl
#55 Align: 0 Name: TurboPhasers
#56 Align: 0 Name: Hyperspace
#57 Align: 0 Name: CulturalTrade
#58 Align: 0 Name: InterstellarCapitalism
#59 Align: 65 Name: XenoTradePersuassion
#60 Align: 0 Name: CulturalFocus
#61 Align: 70 Name: HyperWarp
#62 Align: 0 Name: DefensivePhasers

The first problem is Tech ID #4, ColdFusion is not researched. Cold Fusion is a prerequisite for Impulse Drive.

The second problem, which might not be a problem, is that both XenoTradePersuasion and HyperWarp are "Good" only techs, Alignment over 65 and 70. If there is an additional alignment check prior to research this is not an issue, however, if there is no check and the Arceans remain true to their Neutral roots, this would be a problem.

~SDC~
Reply #53 Top
Brad, it seems like the problem described in this thread would be in AreTechParentsKnown(). The code snippet you posted does seem straightforward.

Once again, I can't speak for everyone posting in this thread, but my intent is not to accuse the AI of cheating, or you of coding it to do so. I think you've been presented with excellent data in this thread to to help you track down an annoying bug that doesn't (I believe) represent the way you intend for the game to play.
Reply #54 Top
Sadly source code is all Greek to me. Let me pop in again to say that we LOVE this game and think you did and are doing a GREAT job. That's actually why we are so anal about it. We have become totally engrossed in it. And if the AI does things we can't do, and it's not worth the time it would take to change it, fair enough. It's impossible to ask you to write and AI that can simulate a human well enough to play a versatile game and beat the player without any aids. But we want to know that that is the case.

We'll settle for an AI that is more genuine than that in any other game, even though it doesn't play 100% like a human. Really, we will. Better than anything that came before it is quite good enough. But we want to KNOW why these anomalies are cropping up. That's all. We're not putting in hours of coding and reading whiny complaints, but we have taken this seriously and backed up our claims rather than simply making vague accusations. I mean, how do you argue with the saved games I posted? Altarians have battleship research. Nobody else does. Altarians do not have interstellar tactics. Espionage screen shows "battleship technology" as most time intensive research for Altarians. How do you argue with that? It doesn't take an expert in microcode to figure out that something funny is going on.

Again, we love this game and your work on it. If this problem is not worth your time to figure out, we'll accept that. You have already given us more than any other game developer has. But it's not all in our heads.

-Drake

~SDC~
Reply #55 Top
CM, are you sure that you are in contact with EVERYONE.

Often times I've seen minor races pop up in the middle of nowhere who come complete with more tech than I have.

Is it possible that in some corner of the galaxy a minor civ you've not yet met appeared loaded with tech which they then promptly traded away.

That said, I wouldn't be opposed to a limiter like Civ III had where you could only trade for tech you had the prerequisites to. After all it makes little sense to be able to start building a Ranger (a cloaked ship) if you don't have the secrets of cloaking.
Reply #56 Top
CM, are you sure that you are in contact with EVERYONE.
End of quote


Yep, 100% certain. It's a small map, it didn't take me long after I saved this game to finish exploring every star on the map to be certain. I wouldn't have even posted that I had found this if I wasn't certain. I saw the apparent glitch, I made the save, then I continued playing to make sure I wasn't missing a minor, but I wasn't. The Drengin and the Arceans had Space Militarization, but lacked the pre-reqs, something is amiss other than my perception.
Reply #57 Top
Uhmm just my $.02 (as usual). I think this discussion is very interesting.
I really don't care if the AI is "cheating" or not. I like understanding how things work,
for example all this anomalities that people have reported in this thread. I think many
people share my desires, which is why I post it. So, developers (Frogboy), I wouldn't see
this discussion as a 'the AI is cheating' but more along the lines of 'how does the AI do that'?
If the AI has a strategy that we humans don't understand, then to me it robs some of the fun
out of the game. I don't really need to know the code, but if anyone has an idea how the Alterians
can jump to battleship tech so readily then i think we would all be interested in this strategy.
To me, the AI behavior is very interesting, especially since they are completely unlike any 4X
game before (and I've played many). So far, I am stumped, and i guess many others are stumped.
Reply #58 Top
It's interesting to see a snippet of source code. But the comments here from Brad
do not address 90 percent of the patiently presented evidence in this thread.
Obviously everybody should avoid the word "cheat," which causes Brad's rationality
to falter. So we should use a new word. I suggest "hyperventilate." Thus, it is
obvious to me that the AI hyperventilates when it acquires certain crucial techs.
It's still a great game, and I still win regularly at "painful" level. But I'd
prefer it if the AI did not hyperventilate so often.

In reference to another comment above, I've also noticed that the research
summary at the end is unreliable. Practically every game I've won, I've noticed
that I have obtained (through research and through acquisition) many more techs
than any other player, and yet one or more of the AIs is given a higher research
score. The only way that could be accurate is if there is another fundamental
component of the final research score (such as, perhaps, research capacity) that
is not reflected on the final screen. If so, that's poor interface design, since
the form of the report implies a summary of all components that comprise the final
total score.
Reply #59 Top
To Frogboy:

I hope that ulBestTechAmount and ulBestTech are properly cleared somewhere outside of your snippet.

Also is the technology choice presented to the player is produced by listing unknown derivatives from the known technology instead of looping through technology and checking AreTechParentsKnown, error in AreTechParentsKnown may produce the problem.

All this is relevant if anybody can confirm that this problem has been observed with Altarians. I think I've seen it myself few times, but I'm not 100% sure, because I've attributed it to creativity bonus and didn't bother to triple-check.
Reply #60 Top
#49 by Citizen Twirlip - 6/2/2003 1:33:30 PM

Sigma 7 --

Try it. You can type in any number you choose, but it'll reset to 0 for 0 unless this has changed recently.
End of quote


Yeah, just noticed that. But in any case, the limitation does provide an exact insight of the economy of the other player, regardless of espionage level. This is a minor issue that should be looked at anyway, especially since the AI doesn't have this insight.

Now, as for Frogboy, the problem is most likely found in "AreTechParentsKnown()". I've had trouble myself in determining the parents, even with Perl's excellent data structure management system. There were two different methods used to reference the parent tech, one by number and one by name. It required a two-pass reader that needed more than several attempts to write.

If you wish, you can show us the source code for that function - perhaps many eyes can find the loophole...



[Message Edited]
Reply #61 Top
In the case of the "phantom techs", one save from one game probably isn't enough. Someone has to be able to produce comprehensive and repeatable evidence to get this situation analyzed quicker. Several saves from several games, or, better yet, a progression of saves from the same game properly logged and annotated to explain what is happening with things would probably be the smoking gun to prove a problem is there once and for all. Is there an error in the Parent tech subroutine? Is the AI using an alternate tech tree? Is there really a problem with mystery tech appearing out of nowhere at all? I do not know. But a determined person could document enough to get attention from the team.
Reply #63 Top
Frogboy,

Well, I see several potential bugs. The first is AreTechParentsKnown() is quite possibly buggy, and you don't show code for that. Since it's pretty obvious we're talking about the problem of researching without the prerequisite techs, it's a little gloss over that part of the code. You claim that this is the same code to display the tech tree, but if it was you'd be using a common function, wouldn't you? So I'm sure you *think* it is the same code, but it quite possibly isn't.

A second is that it seems to me your morality check could be backwards. I can't be sure since your variables aren't documented here, but if the Tech file is any indication, Morality is a scale from 100 - 0 where 100 is ultimate good and 0 is ultimate evil. The code looks okay, but a double-check is in order.

There are numerous other potential problems. The ulAlignmentCategory element may not be being initialized correctly... neutral techs don't even have an entry for it, so I don't know how you read that into your structure. Another thing - some techs (not many) have a "Tech_Requirement_ID" flag in the tech file. This appears to be a way to set requirements via ID number isntead of text string, presumably because text strings were sometimes changing. The problem is this sets up a possibility where one or the other is not being valued correctly.

Code is a complex thing. Your attitude seems quite dismissive, though. Myself, I seriously want to help figure out this bug. I'm not here to mindlessly flame your work; if I was I'd write a couple paragraphs on bad coding style (lack of comments and not using curlys on every if statement).

Bruce
Reply #64 Top
This question and it is posed with no knowledge as to how tech trades are handeled between ai's but has anyone checked ee if when an ai trades for Tech A they are always reciveing Tech A perhaps the source of "Unavailable" techs is that the ai is tradeing for one tech and receiveing another thru some cross refernce error. Just a random thought.
Reply #65 Top
AreTechParents known is used throughout the code. If it were "buggy" it would cause massive problems everywhere.

Here is what I think:

That the problem wasn't the Altarians but rather the Arceans or one of the other races which has a pre-defined tech list where for whatever reason one of the pre-defined lists has an error or something in it.

At some point in the future we'll revisit this and see how many engineering resources we have available to address it. I don't think it's affecting the "Fun" factor of the game. It certainly affects the Star Trek conventioneer demographic but I'm not sure that rises to the threshold of making it a priority to look into at more depth. For now, if someone wants to run around saying the AI cheats, more power to them. This is an "issue" that had to have been in there for months and months and months without anyone (including us) ever noticing. Plus there's always the signficant possibility that it's user error. That's what it's been when I have looked at it in depth in the past. There won't be any more updates until 1.1 which is the expansion pack so perhaps by then we'll have time to revisit this issue.

~SDC~
Reply #66 Top
Hmm... so getting the floor wiped with your face because the AI jumped to Battleship tech while you were spending three years of game time actually getting there legitimately doesn't affect the fun factor? Interesting viewpoint there.

I find you attitude somewhat understandable but also disheartening because what you should be saying is, "Wow, we've done a really great job on cleaning up the real issues in the game if people are now only finding such obscure and difficult to spot problems with the game to complain about", but instead you once again choose to lump the people who are actually playing the game the most and understanding its intricacies the most as "Star Trek Conventioneers". Sure, your profit is no different from the guy who picked the game up at EB and played it four times before tossing it on the monstrous pile of 'games to never be visited again' versus someone like me or RayChua who have been playing the game nigh daily since nearly its release. OTOH, what I think you should be considering is the casual EB guy probably has little if any idea that Stardock did the game and he's no more or less likely to pick up another one of your products, but that the faithful here on this board "bitching and moaning" will be bank rolling you for years to come with OD and DN subs if you don't alienate us too much by dismissing us as trekkies and people prone to 'user error'.
Reply #67 Top
code monkey i find your attitude to be typical of the kind of people that spoil communities.

nit picking gets old after awhile. i've been playing galciv since the beta and it's still fun even after all this time. in my games i've never noticed or found that the ai had any unfair advantages over me. maybe they got battle ships without one of the dozens of prereqs. i don't know. but it didn't affect my enjoyment. and like brad says they can look into it into the future. but if it went this long without it being a problem it doesn't need to be looked at right this second just because a few people are spazzing about it.
Reply #68 Top
CM: Don't kid yourself. You're not representative of the people of this forum. You seem to be blind to the fact that Brad and Co. don't have to do anything to address any of this. Nearly everyone likes the game as-is. And you and like minded people don't do yourselves any favors with your rude and demand tone in your posts. If I were in Brad's shoes, my response woudl be "Screw you guys and the high horse you rode in on."

And why shouldn't you get dismissed as "Star Trek Conventioneers"? Have you read your posts? They sound like kind of compulsive picky stuff you'd hear in one of those Shatner / fan QA sessions: 'remember in episode 3SG13 where in the one scene Spock's hair is all messed up but in the next scene it's normal? Ha Ha, I hope someone lost their job over that screw up!"

I find your attitude obnoxious and unconstructive. If the game's been out this long and no one has noticed this problem then the proper attitude would to to politely list it as a bug and get it added to the list. By antagonizing and berating developers who have done an excellent job in supporting their game you actually decrease the chances of getting your pet peeve fixed. I surmise that we all have our own private list of things we think should be addressed in future updates. By shouting and being obnoxious you alienate your fellow users and the developers alike.
Reply #69 Top
CM: Don't kid yourself. You're not representative of the people of this forum. You seem to be blind to the fact that Brad and Co. don't have to do anything to address any of this. Nearly everyone likes the game as-is. And you and like minded people don't do yourselves any favors with your rude and demand tone in your posts. If I were in Brad's shoes, my response woudl be "Screw you guys and the high horse you rode in on."
End of quote


Whatever folks. If losing games because you're not paying enough attention to realise a bug robbed you of your victory doesn't phase you, fine. Like I just said in another thread, it's the 'ignorance is bliss' axiom in action.

I still enjoy the game, I still play the game. But, I believe this bug is of far more significance than people realise. Just because it wasn't confirmed until recently, doesn't make it any less destructive to the overall integrity of the way the game works.

The short answer is we don't know how often it occurs. It takes special circumstances to be able to know it has. In most games, you have no way of knowing for a fact that they couldn't already have Dreadnought tech so you grit your teeth and fight on assuming they must have one heck of research econ going. That still doesn't mean you apologists and everyone else reading this thread probably hasn't lost a significant number of games not because of something stupid you did, or somehting good the AI did, or even just a bad start, but because a bug allowed the AIs to circumvent the rules of the game and effectively time travel 5 years into the future to kick your butt. You can dislike me, you can call me obnoxious, I don't much care. That is a significant flaw in the game no matter what spin Stardock and other people want to put it on it.
Reply #70 Top
Well, it certainly doesn't affect my fun with the game. The only reason I even added my experiences with it to this thread, was because I was trying to help point out what seemed to be a potential bug. Sorry if it was taken as complaining about the AI cheating. I know I personally, could care less if the AI cheats, if it makes the game more fun for me.

The main reason I thought it was a bug in the first place, was because I had never seen behavior like this prior to 1.04, and now, everyone I know that plays the game has seen it since 1.04.

In the future, I guess I will email any potential bug reports instead, or at least avoid any thread with the word cheat and ai in it, since those words seem to take over the entire thread, and make everything else insignificant.

Regardless of whether this gets further attention or not, thanks for the great game. And what is Star Trek?

Reply #71 Top
JG and TheHamster, did you read his posts in this thread? I don't always agree with CM but he's been nothing but constructive in this thread. You guys, on the other hand, are out of line. Frogboy, what's with the swipe at trekkies? Not a fan myself, but that was kind of out of character for you. AI jumping techs is a bug, not a balancing tweak. I know you'll fix it when you get time to track it down, but don't bugs get a high priority for engineering time? Folks, pointing out bugs is one of the main purposes of this board. Communities like this get ruined, not by the people trying to fix problems, but by the trolls who blindly attack the game or by the fanboys for whom any complaint, legitimate or not, is nothing short of heresy.

Have a nice day
Scott
Reply #72 Top
Bralex maybe you should read the other posts CM has participated in. It's like the resident critic of all things inconsequential.

There is a bug list thread already and it has lots of items in it. So why should this 'bug' get priority over any of those other ones?
Reply #73 Top
I have, that's why I specified "in this thread" :) It's up to the devs to decide priorities, but they can't know something is a bug unless it bites them while they play (do they even play the game? I know I'd probably be sick of it!!! :)) or someone tells them. Sometimes what I think is a bug (this has happened several times) is just a tweak, sometimes it isn't. If you think something is inconsequential and I don't, who wins? Again, it's up to the devs. There's a few people that need to be a bit more civil about it. What's been really nice here is that the devs aren't just paying attention they are participating in the discussion.

Scott "me type good"
[Message Edited]
Reply #74 Top
Bralex - what people like Hamster and Jayg and myself and probably others have a problem with is elitism. Hamster doesn't apparently see this as a big problem. I don't see it as a big problem. Report it as a bug for them to add to their list in the bug thread and move on. It's a game. If CM wants to be a drama queen about his bug then he shouldn't be surprised if someone gives him a reality check. Frogboy was very concrete: They'll look into this 'bug' with the 1.1 updates. Like Hamster said, why should his bug get priority over all the other reported bugs. We all think our pet peeves with the game are 'significant'. CM and others need to let go of their ego and get some perspective.
Reply #75 Top
Bralex maybe you should read the other posts CM has participated in. It's like the resident critic of all things inconsequential.
End of quote


And maybe you should try the same.

Let's see, I've critiqued the AI getting to skip techs due to a bug. I've critiqued (a bit too strongly in hindsight) the over-nerfing of tradegoods without any beta testing. I've critiqued the use of right/left selectors instead of a dropdown for the menu sortings. I've critiqued the AI getting to bankrupt you through a bug in how much they can demand for tribute.

That's pretty much the lump sum of my *critiques* in regard to this game (and, yes, one of them is pretty much inconsequential).

My other posts have been defending Stardock Central against people who can't figure it out and then hurl insults against Brad and Stardock. My other posts have been defending that the endless complaining about being able to sue for peace and re-attack is largely pointless in the context of the game due to the fact that relative military power enforces these treaties, or it doesn't. My other posts have been providing Smart Exception logs for CTDs to help track them down. My other posts have been praising Stardock for their sales model and the best support for a game that I've seen. My other posts have been praising Brad for actually wading in the muck with the masses. My other posts have been providing detailed instructions for using SDC so those same complainers can get up and going.

Just because I point out bugs does not mean I focus on the negatives. It means I want to see a good game get better. You on the other hand glance over everything else I write and choose to dismiss anything perceived by you as inconsequential negativity because I choose to use strong language and sentence structure to make my point.