Don't like current DIFFICULTY SCALING;AI is cheating

Commander Bello said:
1) Your proposal exactly describes the way in which the AI is programmed up to now. It is pre-determined - and this is the problem.
What, if somebody modded the game, so that irrigation would have an effect even at despotism? With your proposal, this modding would have become pointless, thus reducing the modding potential of the game.
The AI should interpret the rules settings and then decide whether a certain tile improvement makes sense or not.
I understood what you mean, it's better to program AI to interpret rules. I put it to the simpliest way: we know in despotism irrigation doesn't give any bonus to grassland squares, so let's tell AI to never do this. I'm trying to explain that some fix could be simple enough as this example.

But I agree interpretation is better than simplier routines, as AI could see several possibilities when it will work a square. Maybe interpretation will make the game very slow, who knows? Let's hope it don't make so much difference.

Commander Bello said:
3) Again, the worker/city ratio shouldn't be done per city, but per nation. Workers should primarily be built in cities which already reached the maximum size or are close to it.
Making the optimiziation algorithm exact enough, you could even avoid to have to build certain city improvements in such a town, then.
I think a quantity of workers per nation is not a good idea. When an AI is reduced to some cities, it will try to do more workers than it really needs. In your way, let's say you program to put 20 workers per nation in a standard map. An AI with 4 cities will try to create workers until it reach this number, which is huge enough for 4 cities. And another AI with 30 cities will keep the 20 workers already done, when it needs more.

I still prefer defining a quantity of units accordingly to number of cities. At least in the beginning of the game, we need at least one worker working in each city, because cities will increase and will use more squares, so workers need to improve at least 6 squares per city (in case city won't grow without an aquaduct). As I wrote above, cities with several jungle/marsh squares need more workers to clean these squares, because this action takes a lot of turns. These cities will need a better algorithm to define the best number of workers. These workers can be brought/done from other cities, because these cities will tend to grow slower (due bad tiles).

And when almost all possible squares are improved, I usually join several workers to cities, so they won't cost support. I think current AI uses this kind of algorithm.

I think more experieced players may decide which is better. They know better how to develop cities faster and micromanagement, so they'll know which is better: workers per city or workers per nation. Well, soon someone will come here and say "I never build workers, I always get slaves" :lol:.

Commander Bello said:
4) I would almost all time build the road first, as this will improve your wealth and will speed up all your units.
Oh, yes. That's what I do, but I think you meant the inverse.

About 5, I forgot to mention it: when I build some embassies, I usually see AI's capitals size 1 and doing settlers :(.

Commander Bello said:
Forgive me, but this is crap.
The AI should check for luxuries (access internally or by trade), if there are enough military police units and then play around with the internal advisor.
You used the wrong word: it is not crap, it is incomplete :p. You're right, these are the first points. When AI can't get another luxury from trade and increasing the amount of military police won't do anything, then use luxury slider, as well changing some workers to artists.

Building an improvement which makes people happier also help, but it should be build before people becomes unhappy. If city will soon grow and the next one will be unhappy, AI should try to build a temple soon to avoid this problem.

Commander Bello said:
Because a spear makes as much citizens happy as a modern armor.
So, there is no reason to upgrade an ancient unit, given that the town it is in is not located near a potential enemy or the shores.
Upgrading can be done if enough wealth is available (let's say the treasury is already above 5000 gold [figures just for display])
Yes, a spearman can be used as military police, but there's no need to keep spearmen when a city has 4 Mech Infantries, 3 TOWs, 2 Infantries and dozen more units. These units could be moved to cities which really needs military police, but if all cities are already at max MP, why keeping obsolete units? When I find a civilization alone in a small island, its capital always have tons of units, most of them obsolete.

Commander Bello said:
Again, stated in the absolute way as in your posting, I cannot agree to this.
The answer is: optimization.
Upgrading almost always is a better way to get new units compared to disband old ones for the sake of the production of new ones.
There are obvious exceptions from this rule of thumb as "Hannibal ante portas", but except for this the disbanding most times is just pointless.
First, about upgrading units. I agree disbanding units isn't really "lucrative", but keeping very obsolete units, spending 1 per turn each one, is not wise. And updating these units may cost too much, depending which unit it will upgrade to. And some cities can build new units in a few turns (eg: rifleman each 4 turns), leaving the money for better purposes (science, for example). AI could do something as "new unit built, disband most obsolet unit in a city with weak production", it's an idea, what do you think?

Second, about money. I think AI must keep money as one of first priorities, because money goes to: support of units, support of buildings, science, luxury and even can hurry production when highly necessary. So, buildings which gives money are important.

But finding priorities for AI is hard. In Civ3, cities far away from capital must build courthouses first, so corruption won't "eat" most of shield production. Any other building would waste much shield, while this city will stay using 1 shield per turn, even if it produces 20 (corruption get most shields). Also, cities in islands should build harbor so they can receive/send resources - this one when there's no harbors in that island. New cities with a huge culture neighborhood need to build cultural buildings fast or the city will flip.

Your word is correct: optimization. But there must be a huge algorithm to see which to build next instead of using pre-determined building orders (as most games do).

eg577 said:
If we were looking to improve the AI then we should not bother to try to have it 'interpret the rules' so it can play other mods. It is too hard to take everything you know about civ that can be hardcoded into an AI and then generalize it. For example, you might hardcode into the AI how many settlers to build in its first city before stopping based on your own trial and error with the game. Now how would you generalize that number so it is a function of settler shield cost and settler population cost? It just wouldn't work.
That's why I put the idea of avoiding producing settlers in cities with a few population. Let's imagine this theory:

P - number of population removed to produce a settler (2 if not changed)
Tr - number of turns expected to produce a settler in this city (maybe including eventual growth and new shields in use, but not really necessary)
Tg - number of turns expected for this city to grow to P+1 size

If Tr>Tg, then this city can do a settler, if Tg>Tr, then this city cannot produce a settler, because it won't grow fast enough, it will produce the unit and then will wait to grow, wasting several turns when it could produce something else.

Simplifying this idea: produce settlers in cities which size is at least P and which growth is faster than producing a settler. If city size<P, don't produce settlers here.
 
Okay that was a bad example because you are exactly right. Deciding if a city can make another settler is extendedable to work with a general mod.

Here is a better example: How many workers should the AI make per city? Mods could have any number of worker actions. The number of turns to complete one of these actions could be vastly different than the normal rules. Also, the +food/shield/trade bonus could be very different from the normal game, so maybe in this mod terrain improvements make a big impact or maybe they have almost no effect. All of these would affect have many workers you want per city.

If we only had to worry about the default rules this wouldn't be a concern. We could easily devise a good rule of thumb for the number of workers based on our intimate experience with the default rules of the game. It wouldn't be a perfect rule, but intuition would tell us it was pretty good. On the other hand, trying to generate a rule for the number of workers based on all the mathematical worker statistcs is going to be very hard.
 
let me understand: you are discussing how to make the AI more intelligent and unpredictable, and then you want to hardcode how many workers the AI will build in a row in a city (or any other similar implementation) ? Sorry but I wouldn't really like to play against an AI so much hardcoded, it would be laughably predictable and boring.
 
We are discussing how to make AI better. It doesn't think. It works by following rules. Give it better rules and it will work better.

It's as simple as that. Now the proper rule might not be "build 1.2 workers per city", since things like terrain and traits affect the proper answer. It remains that this would be a better rule than the one it has now.
 
Abegweit said:
Your list reminds me of another thing which astonishes me. WTH with putting cities on bonus food? I just razed a city in the latest GOTM with the intention of moving it over one square. Then I found cattle under it! If I hadn't razed the city, I would never have known.

In Civ3 press Ctrl-Shift-M and Ctrl-Shift-N. One will clean up the map and the other will allow you to set options for cleaning up the map so you get to choose what remains visible. Using these two keyes, you can see if there's a bonus resource in the city squares (make cities invisible and bonus resources visible)
 
Brain said:
No it's not. The rate of growth of a recursive tree search is W^D where W is the "width" or the average number of possible combinations at each level in the tree, and D is the "depth" or the number of levels that we consider. In this case we're talking about ~1000 possible combinations in one move. So W is 1000. But D is just the number of moves we want to look ahead. So we have 1000^n for looking n moves ahead.

This is logical. Just look at a roll of a die. Every roll has 6 possibilities. For two rolls we have 6 possibilities for the first roll and 6 for the second. That's 6 x 6 = 36 possibilities. For three rolls we have 6 x 6 x 6, and so forth. One roll = 6^1, two rolls = 6^2, three rolls = 6^3, n rolls = 6^n.

It seems like in Civ though W increases as D increases. In the beginning there's only like 10 possible moves but by the mid game there may be like 100,000 possible move combinations. By the late game when you have planes and stuff there may be over 10,000,000 possible move combinations. So it seems like it would be something like this:

W^D^X

where X accounts for the rate at which the possible move combinations increases and W is thge number of possible move combinations in the current turn. So going deeper in Civ introduces complexity that is exponentially more exponential than in games where the number of possible moves remains more or less constant or even decreases.
 
A good AI will still be dumb in the sense of how it works. Although you can envision an completely unpredicatble AI /thinking AI it isn't possible. You shouldn't assume a hardcoded rule for the # of workers isn't a good because the AI is just being told what to do and it doesn't 'figure it out'. Sure, it would be a good idea to make the rule more complex than a fixed number of workers per city (maybe having a set of rules to take in account how active your current worker force is, or much bad terrain is within your borders, etc.), but however you do it the rule will be completely hardcoded.
 
I don't see the point of this complaint.

Golden Rule: no matter what the difficulty level is, the level of AI is the same. Chieftan AI is as smart (or stupid) as Sid AI.

Now tell me, how the hell would you implement difficulty levels without giving (or taking away) AI bonus?

So it's not a question of the "scaling" of difficulty level. It's the "difficulty level" itself. Either you always play the game on the same level (which I am sure most people would think it's a bad idea since there are so many levels of players), or live with the bonus.

It's the case no matter how good the AI is.

If you think AI bonus is "cheat", just always play Regent and your problem is solved.
 
Th Ai does not cheat it does whatever the progammers say it can do and it follows that in the only way it can. Exactly as is dictated to it. Although at times that RNG does make me think it cheats. If it is then its the programmers fault for allowing a flaw to get in there (if there is one that is)
 
Abegweit said:
(..)I play Bridge. There is no computer bridge programme which is able to play at the level of a good club player - never mind at that of a world champion. A few years ago someone invented a Bridge programme which adopted the chess method (all previous programmes were rules-based) and it immediately began to play hands like an expert. Bridge programmes still suck at bidding, though. That takes judgement and today's computers simply do not have any.
Threadjack warning !!

I play bridge as well. And I think your statement that no bridge programme is able to play at the level of a good club player is incorrect. Do you know the programme Jack ? It hasn't -yet- got the strength of a world-class-player, but most players below that level will loose to it in long matches. It "easily" beats a player of club-level.

End Threadjack
 
microbe said:
I don't see the point of this complaint.

Golden Rule: no matter what the difficulty level is, the level of AI is the same. Chieftan AI is as smart (or stupid) as Sid AI.

Now tell me, how the hell would you implement difficulty levels without giving (or taking away) AI bonus?

So it's not a question of the "scaling" of difficulty level. It's the "difficulty level" itself. Either you always play the game on the same level (which I am sure most people would think it's a bad idea since there are so many levels of players), or live with the bonus.

It's the case no matter how good the AI is.

If you think AI bonus is "cheat", just always play Regent and your problem is solved.
That's why most games have just 2 or 3 difficulty levels. On easier levels AI is programmed to look less variables, so it will make weak and predictable decisions, while on harder level AI will look all possibilities programmed, then it will make better decisions, less predictable.

In Civ-games, I know it is hard to program AI, but we are discussing here the main "stupidities" that AI currently does. I'm sure most people here don't want a very stupid AI, doing things like:
- trying to attack the most unprotected city first, even it's very far away - it will move all units until that city, and you can attack and destroy;
- moving a weak unit to pillage a resource like horse, while I'm in modern age;
- knowing where are all resources, even the those unrevealed (its strange positions for cities and its insistence to walk in my territory tell me the existence of an unknown resource);
- founds a city where there is a bonus resource (that's for Abegweit ;) );
- one transport ship with 3 escort coming to my continent to leave only one unit when I'm taking all its cities (possibly the worst stupidity).

These examples are what I remember now, the list will be huge enough if everyone helps.

We were talking about settlers because we know AI doesn't know when a city can't do one. We were talking about worker actions because these "small issues" decide the whole game: the quantity of shields, food and money got per turn means production - production means units, buildings and wonders - units, buildings and wonders can decide the game for AI or for any player. Micromanagement is the key to decide games like Civ.
 
That's why most games have just 2 or 3 difficulty levels. On easier levels AI is programmed to look less variables, so it will make weak and predictable decisions, while on harder level AI will look all possibilities programmed, then it will make better decisions, less predictable.

So you are saying most games implement difficulty levels by implementing different AIs? Do you have any hard proof?

I would be really surprised if it's the case. Why intentionally implement a more stupid AI if you could make it smarter? Also, if you do not give bonus to AI, you'd have to implement the AI smarter than human beings to make the game actually difficult. I really doubt this is going to work.
 
I don't see the point of this complaint.

Golden Rule: no matter what the difficulty level is, the level of AI is the same. Chieftan AI is as smart (or stupid) as Sid AI.
Well I don't think most of us feel it is necessary for the AI to act differently on different difficulty levels. Having bonuses/penalties to make many difficulty levels out of one AI isn't really the problem. The problem is that the bare bones AI offers only a mid level of competition. Beating higher levels of difficulty isn't very satisfying. If the bare bones AI was higher up on the difficulty scale it would be much more satisfying to play.
 
microbe said:
Why intentionally implement a more stupid AI if you could make it smarter? Also, if you do not give bonus to AI, you'd have to implement the AI smarter than human beings to make the game actually difficult.
Some games really have weaker AIs at easier levels, the intention in this case is for people who don't know the game to learn how it works and harder levels are for those who are well experienced in the game.

Most games who have different AIs are RTS and board games. I know these games are much easier to program different AIs. But in Civ, you can see a huge improvement in AI from Civ2 to Civ3. And Civ4 will surely have a harder AI.

In my opinion, Civ can have easier AIs on 1st and 2nd level (for newer players), removing all bonus for players in these levels, then a 3rd level (regent, no bonus to AI, no bonus to players) using the hardest AI possible and from 4rd to the highest level there can be bonus for AIs.

I know it's very hard to program attack strategies for this type of game. So, all known possibilities will be coded. There are some advanced strategies which can be removed to create an easier AI for easier levels. No usage of bombardments and pillage can be a good option, because beginners may become angry when AI pillages his only resource of rubber or when bombers destroy several buildings in capital. So, let's leave bombardments and pillage for the hardest level. When new players go to a harder level they can see these "new tactics" (for begginers, obvious :p) and then try to beat it.

If Firaxis put the hardest AI possible in every level, experienced players will be satisfied (err, these players will never be satisfied :lol:), but possible newer players will hate it, because "its AI is too hard". And if Firaxis put an average AI in every level, experienced players will say "AI is dumb", while almost all newer players can play it without any problem. That's my point and I know several people here will agree.

AI in Civ3 PTW and C3C too) sometimes makes stupid decisions, I mentioned some of them above, as well some people made it before. If you look in Civ3 forums, there may be much more. And we are complaining about these stupid decisions, because we don't want to see them again in Civ4.
 
Rik Meleet said:
Threadjack warning !!

I play bridge as well. And I think your statement that no bridge programme is able to play at the level of a good club player is incorrect. Do you know the programme Jack ? It hasn't -yet- got the strength of a world-class-player, but most players below that level will loose to it in long matches. It "easily" beats a player of club-level.

End Threadjack
It doesn't surprise me that you play bridge. The Netherlands is probably the most bridge-mad country in the world. :goodjob: As for Jack... yes, I know it. It certainly is by far the best bridge-playing program in the world, GIB's pretentions notwithstanding.

Actually, it's a little hard to compare it to a human. It impresses in some ways. I remember the first time I saw an auction which went 1C-Pass-1NT-Pass-2C and discovered that it had rebid a 4-card suit. Very good to understand that responder had a fit! I can assure you that Bridge Baron wouldn't find the bid. Nor would the average club player.

But, like the Baron, Jack is quite capable of following up with an utterly insane move that no human would ever make. He's no different from the Civ AI in that regard. After thinking about your comments, I believe that you are right; I was doing him an injustice. I usually play in the stronger clubs and I think I was comparing him to my opponents instead of the average player. He is still a loong way from world-class though. And he never will get there. Bridge is less complicated than Civ but it still requires judgement, which computers simply don't have.
 
There will never be a superb computer bridge player because a truly superb bridge player will be able to develop new bidding systems and a computer could never do that.
 
BearMan said:
If i remember correctly, the number one chess player
in the world is a supercomputer (or 2nd) ?

The number chess player is human. He was beaten by a computer once.

Imagine the War Academy texts multiplied by... a few millions(?). That gives and idea of how many chess texts there are. The AI just "read" all of them. And remembers them on he is playing chess.

Even though CFC has a lot of info and advices, doesn't match that. So, we can't have really AI for now, we'll have to stick with a "quantity" balancer of the game.
 
I have an idea to maybe solve the "computer uses workers stupidly" AI problem, such as the example of irrigating squares with despotism.

The computer analyzes all possible workable squares (within city radius) and views what it is currently producing, then what it could be producing with various improvements. The workers concentrate on the squares whose improvements would more closely narrow the gap between "possible" and "current" production per tile. It would go done the list from the "best" tiles and imrpovements, down the the lowest yield ones. Just a thought.
 
Back
Top Bottom