AI cheats?

I have been modding the game some and decided it would be nice to have subdivisions of the hulls and moved them around in the tech tree as to when you get them. The tiny hull for instance does not come until you research 'basic logistics'. As a result, the AI's do not have immediate access to them and can not build their 'standard scouts'. What then happens is they do not build any scouts, instead concentrating on colony ships and constructors. This is fine, however it rather bugs me that even with no scouting, the colony ships head *straight for* colonizable planets, and the constructors go on a direct path to resources. In other words they definately cheat. I would like to ask that this part of the AI be fixed, I seem to recall numerous posts I've read that stated they do not cheat, so it's calling out time guys   
19,129 views 32 replies
Reply #1 Top
They don't 'cheat'! However the location of the resources etc is known to the AI's to try and give them an edge over the human player.

Never bothered me in the slightest and it has always been made clear this is what they do from the beta testing days.
Reply #2 Top

The AI does'nt know where the good planets are.  They still start out with the flag ship unit.

They probably do know where the galactic resources are, however (very very old code).

Reply #3 Top
The AI does'nt know where the good planets are. They still start out with the flag ship unit.


Is that to say they don't know if a system has colonized planets or not? It seems they do have more than just star locations with Stellar Cartography. Nothing irks me more than to send scout ships out trying to locate planets only to watch the AI go boom boom boom. I like playing on very low planets and stars with medium chance for habitable planets and yet the AI seems to find them extremely fast with just a survey ship.

They probably do know where the galactic resources are, however (very very old code).


Any chance of getting this changed for DA, or at least an option? We are going to be able to edit the AI behaviour, does that mean we will be able to script them sort of like AoE II did? That was probably the most fun I've ever had in 30 years of gaming on computers.

BTW, the support you guys give is excellent, too many companies do not have a clue what support is any more.
Reply #4 Top
I noticed it too that AI is very good at finding habitable planets. My first reaction was that, hey, AI is cheating! Then I thought that maybe it is just sending out colony ships to every star system (the AI has a lot of colony ships in higher difficulty levels) and I did not bother to test whether the AI actually does it.

They don't 'cheat'! However the location of the resources etc is known to the AI's to try and give them an edge over the human player.


It is a slippery slope to try to redefine “AI cheating”. One could argue, for instance, that technically AI can never cheat because cheating means betraying trust and the AI has no conception of trust. However, AFAIK AI cheating is understood as using information denied to player. Knowing the location of a resource without exploration certainly qualifies as AI cheating to me. The fact that this is done to provide challenge to the player is beside the point.

I am disappointed: I really liked to think that AI does not cheat. I appreciate very much, though, how much effort you put into supporting and developing the game. In short, keep it up guys, the game is great and its getting better and better!
Reply #5 Top
The AI does receive (among many other bonuses) a significant bonus to sensor range on the top difficulty levels, so it can scout vast regions of space very quickly.
Reply #6 Top

It seems they do have more than just star locations with Stellar Cartography.

Stellar cartography doesn't give star locations but planet locations

BTW, which AI is colonizing fast? Every AI or some particular AIs? 

Reply #7 Top



The AI does receive (among many other bonuses) a significant bonus to sensor range on the top difficulty levels, so it can scout vast regions of space very quickly.


I just played the start of 2 more games and the range of sensors must be 30 or more. There were 3 colonizable planets near where my custom race and the Iconians started (right beside each other). My scout ships were built every 2 turns and one of them spotted 3 colony ships within sensor range of its 5 movement. I then brought a second ship over to track the three. All of them headed straight for the only colonizable planets. If I was playing on the hardest skill levels maybe I'd be ok with this, but my setting is 'tough' and this behaviour is unwarranted on that level. As far as I am concerned the game is broken. It wouldn't matter if I played on everything abundant as there'd be plenty of planets available, but when there are zero to 3 within a 5 parsec range at game start this is a no way to recover. I end up with my home planet(s) and the AI with the rest.

BTW, which AI is colonizing fast? Every AI or some particular AIs?


I really have not payed alot of attention to all of them, but several games has shown that any AI's in competition to my starting systems exhibit this behaviour.
Reply #8 Top
The iconians know where all the planets are, that's just been said. Stellar cartography does not show star locations, but rather planet locations. Yes, they know where they're going.

Also, the AI does NOT know which planets are best. Frogboy has, in a previous post, shown the line of code used for colonization, and the AI is either guessing or has been there before. The game is not broken, they aren't cheating. It's as simple as that. They HAVE to see a planet before they can judge whether it's colonisable.
Reply #9 Top
but when there are zero to 3 within a 5 parsec range at game start this is a no way to recover.


I can understand why you might believe that. However, I do believe it is possible to compete from a position like that and believe I did once.

Reply #10 Top
If the AI is cheating, it's being pretty stupid. I can't count the number of times it's grabbed a 5-7 instead of going 2 more tiles to get to a 17 or 26.

I haven't tested, but I think the AI is geussing (it knows where the planets are). With abundant habital worlds, it probably looks like cheating. The trick would be to play at the rare setting.

However knowing how many bugs there have been in this game, it wouldn't suprise me if there was a mistake in the code. (something like the AIs sharing the explored part of the map in-advertently)
Reply #11 Top
Knowing the location of a resource without exploration certainly qualifies as AI cheating to me. The fact that this is done to provide challenge to the player is beside the point.


I couldn't really call this cheating. It's a real trick that the AI is even capable of not knowing everything about the map, almost every 4x or RTS game ever made does this. I'd much rather have other races colonizing planets it can't see than failing to make obvious moves because of a random glitch.
Reply #12 Top
couldn't really call this cheating. It's a real trick that the AI is even capable of not knowing everything about the map, almost every 4x or RTS game ever made does this. I'd much rather have other races colonizing planets it can't see than failing to make obvious moves because of a random glitch.


I do not quite get your line of argument. In my opinion, the code "cheats" whenever it provides resources (typically information or production boost) to AI that is denied to the player. Usually it is done purposefully to provide challenge to the player (this includes "cheating" to make the game "work") but sometimes it is unintentional (as it appears to be the case with the AI knowing the location of recourses in GalCiv II - i.e. an old code). If this is not your definition of cheating, what qualifies as cheating to you? Can you point out a game where AI "cheats" for other reasons?

Or is the word that bothers you, i.e. "cheating" because it denotes behavior that is considered morally wrong? May I point out that AI is not a moral agent - it cannot act morally right or wrong - and the aim of the programmers to make the AI cheat is, I believe, laudable: to make a better gaming experience. Reading your last sentence again, it seems that you define "cheating" on the basis of whether it gives good or bad gaming experience. But such definition would make "cheating" utterly subjective.
Reply #13 Top
I do not quite get your line of argument. In my opinion, the code "cheats" whenever it provides resources (typically information or production boost) to AI that is denied to the player. Usually it is done purposefully to provide challenge to the player (this includes "cheating" to make the game "work") but sometimes it is unintentional (as it appears to be the case with the AI knowing the location of recourses in GalCiv II - i.e. an old code). If this is not your definition of cheating, what qualifies as cheating to you? Can you point out a game where AI "cheats" for other reasons?


I should clarify, I don't consider this behavior cheating because it intrinsic to programming. Games do not really 'provide' information to AIs, AIs are created by processing the available information and choosing a response. Because of this, there are always a huge number of things that the AI knows better than the player, and cheating is a grey area based on how aggressively the AI acts on that information. Stats boosting is definitely cheating, but awareness of environment may or may not be.

If the AI can function intelligently without the old resource code, then it's cheating. If it can't, it has to be measured against the corresponding code that keeps it from acting on that information immediately. As long as it's not being too clairvoyant, it's not cheating.

As far as the moral argument, I don't think any video game cheating is morally wrong unless it affects someone else (i.e. multiplayer or metaverse games). And yes, I believe that 'cheating' is an entirely subjective term. It depends on who's affected and whether they feel cheated.
Reply #14 Top
I don't know, the AI "cheating" really has never been an issue to me. Either I can beat it or I can't. But in reflection of the original post, I do feel that the AI getting "enhancements" so to speak that the actual player doesn't receive is wrong and hence could be termed "cheating". The AI should have no better knowledge of the galaxy with reference to habitable planets. If I can't see them, then the AI shouldn't be able to either, unless there is a specific reason as to why they get that advantage over me. It would still be considered "cheating" but at least a reason wouldn't make it seem so bad, kind of like the old "saying", if you're going to bend me over and break one off, at least make me feel loved a little.... hah! But seriously, if I can't have that advantage, the AI shouldn't either. I think that is what TheWizardKs means.
Reply #15 Top
BTW, which AI is colonizing fast? Every AI or some particular AIs?


Arceans and Altirians seem to be the fastest collinizers on my games, do they have a common AI derivative?

Fate,
Reply #16 Top
To start with, I am not trying to pick on any one person, but the poster I quote had most of the important issues I am concerned with commented on. I am also not trying to flame anyone, nobody wins in that situation. If I seem to be, please accept my apologies.

The iconians know where all the planets are, that's just been said.


Do they know where all the habitable planets are, or just locations from the stellar cartography? If they know the former then they are cheating unless it is a race trait that I have not paid attention to, and if so, where does it say they get this?

Stellar cartography does not show star locations, but rather planet locations. Yes, they know where they're going. Also, the AI does NOT know which planets are best.


Yes, I made a late night mistake on planet/star terminology. I knew what I meant, but didn't say it correctly. Still, the yes they know where they are going...heck I know where I am going too, but when I get there I see zero habitable planets alot. And how can you say the AI does not know which planets are best? Just because they choose not to colonize the class 17 but instead grab the 6 does not prove or disprove that statement. A dev also posted that sensor range is improved, so maybe they do know but choose one randomly.

Frogboy has, in a previous post, shown the line of code used for colonization, and the AI is either guessing or has been there before. The game is not broken, they aren't cheating. It's as simple as that. They HAVE to see a planet before they can judge whether it's colonisable.


That code would be nice to see, but after searching for an hour I could not locate the post. Still, what I am seeing in my games definately contradicts the 'guessing or has been there before' statement. With no access to scouts at all, the AI can not be scouting to have been there before. So perhaps they are buying a colony ship every turn and sending it out to every system, but if so, the ships do not cost what they do a human player as the graph clearly shows the credits do not plummet like they should. Try playing a game on 'number of stars: rare', 'number of planets:occasional', 'number of habitable planets: occasional', map size to gigantic, 9 races, tough difficulty setting. Then modify the tech-tree file to not allow any hulls besides cargo to start. Then tell me the code is even-up. If you do not do this, you do not have anything to base your statements on if you attempt to proclaim facts.

I also realize that the AI is given bonuses per difficulty as well, perhaps they get 5 colony ships to start, I don't know, but if so, that in itself, on 'tough' difficulty, is again, cheating. Perhaps there needs to be a re-thinking of the benefits of each difficulty level. Perhaps the code has been spaghetti'd so much that no one really knows what happens. Lots of questions, not so many answers. The original intent was to determine if the AI actually is priviledged to information that the human player is not, and that has been answered yes. To me that is cheating. If you (the developer/programmer) can not beat me with your ability to program intelligent decisions into your game, but instead rely on 'unfair means', then you are taking the easy way out. Suppose the game used the theory:

Game time: 4 turns, pick a random colonizable planet and colonize it.
Game time: 7 turns, pick a random colonizable planet and colonize it.
Game time: 15 turns...etc..

It would soon have several planets, not all of them optimal picks, but it would give you a challenge for sure. Would that be fair? Cheating? Where is the difference?

Sorry to ramble on so, but I've had a few days to think on this.

Reply #17 Top
They have access to scouts. Every game, they start with one scout. Also, if they're on an autopilot course towards a planet, if it's habitable they'll continue. If it's not, and there's another habitable planet nearby, they'll head towards that planet, and often they don't need to change direction, yet they have changed their destination.

As to your point, if the AI colonized like you suggested it would be a pushover to anyone who knows how to effectively outpace them. I can outcolonize them any day of the week, but I still can't win at higher levels. If they really were just taking random planets, any competent player who knew how to counter that algorithm has automatically won the game. The AI doesn't work like that, it heads on a course to planets and then picks a planet and colonizes it. It can (and has, in front of me) made mistakes doing this, but it is having to scout out and work.

Also note that a lot of the time the AI and players scout out with colony ships.
Reply #18 Top
I think the way the AI plays the start is pretty much perfect, advantage or not. They need any advantages they get. Removing those would drop the difficulity a couple levels at least. AFAIC, no change is needed.

Reply #19 Top
should clarify, I don't consider this behavior cheating because it intrinsic to programming. Games do not really 'provide' information to AIs, AIs are created by processing the available information and choosing a response. Because of this, there are always a huge number of things that the AI knows better than the player, and cheating is a grey area based on how aggressively the AI acts on that information. Stats boosting is definitely cheating, but awareness of environment may or may not be.


I got it now. It sounds convincing, and, given my very limited programming experience, I do not feel to be in position to question your statements what is intrinsic to programming.

If the AI can function intelligently without the old resource code, then it's cheating. If it can't, it has to be measured against the corresponding code that keeps it from acting on that information immediately. As long as it's not being too clairvoyant, it's not cheating.

As far as the moral argument, I don't think any video game cheating is morally wrong unless it affects someone else (i.e. multiplayer or metaverse games). And yes, I believe that 'cheating' is an entirely subjective term. It depends on who's affected and whether they feel cheated.


If you are right about the so called "gray area" then certain amount of subjectivity is unavoidable. However, I certainly do not agree that "cheating" is entirely subjective term. (Besides, you do not seem to actually think that cheating is entirely subjective, e.g. you wrote "Stats boosting is definitely cheating" You may have meant that this is your entirely subjective view but the wording of the statement does not seem to indicate it)

I am still of opinion that: if it is evident that AI acts on information denied to player, it is cheating. I am inclined to agree that there might be gray areas because the way the AI code processes information is fundamentally different from ours. However, if AI knows the location of a resource without exploring, then it is a clear case for me. The AI cheats regardless of whether it would be able to function EFFECTIVELY without it. It is a question of effectiveness not functioning. I am certain that the AI can very well "function" without knowing the location of resources without exploration. Question is, is it able to function so well that it can compete with a human? Eventually, it is the question how talented the programmer is and how much time he can spend on perfecting the code. Such "cheating" by code may be necessary and laudable considering the limits imposed on programmer(s) but it is AI cheating nonetheless
Reply #20 Top
Try playing a game on 'number of stars: rare', 'number of planets:occasional', 'number of habitable planets: occasional', map size to gigantic, 9 races, tough difficulty setting. Then modify the tech-tree file to not allow any hulls besides cargo to start. Then tell me the code is even-up. If you do not do this, you do not have anything to base your statements on if you attempt to proclaim facts.


Incidentally I play exactly by these parameters except that the difficulty level is usually crippling. I generally try to get scouts based on cargo hulls (such way you can put more engines and sensors on them) ASAP. Still the AI is way better finding habitable planets. I am inclined to agree that the AI knows the location of habitable planets. However, I cannot rule out (because I have not tested) that the AI does effective scouting with its numerous colony ships. In any case, it is evident that AI has far more colony ships and scouts that it could possible afford if it had the same resources as the player. This in itself is cheating. In my opinion, such "cheating" is acceptable on higher difficulty levels, although the bonuses should be documented.

The original intent was to determine if the AI actually is priviledged to information that the human player is not, and that has been answered yes. To me that is cheating. If you (the developer/programmer) can not beat me with your ability to program intelligent decisions into your game, but instead rely on 'unfair means', then you are taking the easy way out.


Care should be taken to not confuse AI cheating and programmers/developers cheating. In the first case the programmers make the AI cheat (with the intention to provide better gaming experience). In the second case the devs "play" unfair, e.g. when they intentionally mislead you. As regards the first case, you could say that programmers are taking easy way out but do you really think that "the hard way" would be commercially viable?

What irks me is when the devs are cheating: they tell you that the AI does not cheat although they know very well that it does. I am not saying that this is necessarily the case with CalCiv II. I was hooked on Galciv II mainly on the promise that the AI is good without cheating. I got the impression from journals and other dev comments that the AI does not cheat on difficulty levels up to "tough". I sincerely hope that this is the case. (The resoruce "cheating" is no problem as long as it was unintentional)
Reply #21 Top
What irks me is when the devs are cheating: they tell you that the AI does not cheat although they know very well it does


Frogboy admitted earlier that the AI does know where the resources are at.
However, I've always been able to win the grab resources part of the game.
It would be much tougher for the human player if possession of resources was a higher priority for the AIs.
I think wars should even be fought over them early in the game.

I was hooked on Galciv II mainly on the promise that the AI is good without cheating.



Same here.
Personally I'm quite satisfied, I believe the developers when they say that the AI doesn't cheat.
The admission of the cheat on knowing resouce locations comes as a small shock -- but like I said the AIs do not use that knowledge effectively and would be tougher opponents if rather than knowing locations they valued them more.

The colony rush phase is a lot about micromanagement and getting lucky. 1 or 2 turns late and you'll get pinned in. The AIs have pretty good routines for grabbing a lot of planets.
However I did win the colony rush phase in the game I'm playing: I got 77 planets out of about 480, the best AI got about 65.
The game is 1.31, suicidal, gigantic, scattered, 9 opponents, all abundant except anomalies which are common.
I did have a very good start getting some bonus production tiles on early colonized planets and got enough BC early on from anomalies that I never had to ramp down spending.
My starting position was in a corner but I only had 2 nearby civs pinning me in rather than the normal 3 civs -- so I was able to colonize out into the middle of the map.
BTW, the previous game I played I did get pinned in a corner with only 26 planets with the same game settings -- I was going to win that game but gave it up -- it was a 1.3 game and I didn't like some of the bugs so I gave that game up to start my current 1.31 game.

I know it often looks like the AI starts out with hordes of colony ships but I don't think that they actually do. The AIs do buy colony ships aggressively and probably have some interesting expansion techniques -- So do I.

The bonus's the AIs get at higher difficulty levels are not cheats -- they are there to give better players a game that is challenging and not a walkover.
Just like the handicaps that the AIs get at lower difficulty levels are there for newbies mainly -- so that they can play a game all the way thru to the end while they learn the game.

Bottom line -- The AIs and game are not cheating. ( imho )



Reply #22 Top
I've not seen anything to indicate an AI cheats on colonizing. If anything, I can out colonize the AI with one engine tied behind my back through sheer volume of production. It is possible that some have preknowledge, like the Iconians, but at the same time, there's nothing to say the AI doesn't follow the same pattern of "System sighted, ships built, send forth and see". If there's a planet, hit it, if not, move on.

At the Bright level, where I usually play, they do tend to B-line their progress, especially the Torians. They do tend to follow their explorer ship as its hitting anomalies or exploring without direction (when an explorer ship enters my zone of influence, I usually panic a bit and slam colonize anything I missed), so in that sense, they go with what they can see, but I've also seen races like the Arceans and Drengin balloon in all directions at once.
Reply #23 Top
I think every game I have ever seen, the AI is privy to information that the player is unable to get. I have also noticed the behavior where the AI seems to bullseye for habitable planets. I can still out colonize them by sheer production volume, but that behavior is still there.

I would bet that the AI does know where a habitable planet is, but does not know it PQ value. This would both explain the behavior that TheWizardKs (rushing imediately to a habitable planet) and gallagher118 (picking lesser planets over better planets) have observed.

I am not surprised by this behavior from the AI. In fact the Auto survey function available to the player essentially lets the player collect anomolies with out the need for scouting. The player can set his Flagship to "AUTO SURVEY" at the first turn and the ship will immediately travel to anomolies, even though they haven't been detected yet. The AI will do the exact same thing with their flagships. While its not colonizing habitable planets, it is clear that the game allows for this type of behavior.

Finally, I beleive that the AI should have this advantage with respect to habitable planets. Why? Try this experiment. Build a simple scout ship and set it to "AUTO EXPLORE" in teh begining of the game. Chances are that you'll win the game, before it is finished, especially on larger maps. The Auto explore algorythm available to the player is probably the same one available to the AI (Why make two, after all?) and it is not very efficient. It tries to map the enitre map (which is not needed - except when looking for resources) instead of looking for habitable planets. If the AI depended on this function to find planets, then I don't think that the AI would ever expand, or would expand very slowly (or slower than usual).
Reply #24 Top
I am not surprised by this behavior from the AI. In fact the Auto survey function available to the player essentially lets the player collect anomolies with out the need for scouting. The player can set his Flagship to "AUTO SURVEY" at the first turn and the ship will immediately travel to anomolies, even though they haven't been detected yet. The AI will do the exact same thing with their flagships. While its not colonizing habitable planets, it is clear that the game allows for this type of behavior.


This has been explained in other threads. Survey ships have a device that locates the nearest anomalie. And as you have noticed it is the same for the human player and the AIs.
It also creates a situation where the human player can take advantage of the situation -- at least I do.

I would bet that the AI does know where a habitable planet is


I'ld bet that you'ld lose that bet.



Reply #25 Top
This has been explained in other threads. Survey ships have a device that locates the nearest anomalie. And as you have noticed it is the same for the human player and the AIs.


How convienient. Call a bug a feature. Personally wish they'd address it, along with the retarded auto-explore path finding. For all the amazing things about this game, is it so hard to write the code to do an expanding search pattern ?

I suppose to fix this bug, they'd need to add more options to the auto-survey. ( what's more important, to explore or survey known anomolies)