Pandora: First Contact

Pandora: First Contact

View Stats:
Ail May 13, 2018 @ 12:06pm
Revamping Easy and Medium difficulty-levels
Today I've worked on changing how the easy and medium difficulty-levels work.

I removed the growth- and morale-malus from them and instead limited the AI's abilities by trying to emulate the playstyle of a new-player by dismissing some of the core-mechanics required for successfull play.

Currently I have it like this:

Medium & Easy:

- AI no longer manages their population-allocation
- AI no longer uses buyout
- AI no longer adjusts their taxes
- AI no longer uses Field-Training
- AI no longer know the quick-growth-opening

Easy:

- AI only consider the costs of a building/project to determine the order to build them
- AI only consider the cost of a tech to determine the order to research them
- AI uses the completely unadaptive former-logic from patch 1.5.4

I did not change their diplomatic and tactical behaviour, as I feel that those are important for immersion.

In a test-game the Easy-AI took 535 turns to win. Hard-AI usually takes about 200 turns less, so the difference is very significant.

I'm now doing a test with 3 easy, 3 medium and one hard AI to see the differences head to head. Then I'll also do a medium-only test to at around what time they win. If it is at about 435 turns, it would be about where I want it.
Last edited by Ail; May 13, 2018 @ 12:08pm
< >
Showing 1-9 of 9 comments
ex'ratt May 14, 2018 @ 11:29am 
What is your motivation behind this change? Is the disadvantage too much otherwise? Or do you just think that it would be nicer? Otherwise, you could also decrease their tactical strength, e.g. by ignoring bonuses of units in certain tiles or by not trying to flank.
Ail May 14, 2018 @ 1:15pm 
It is a reaction to the criticism the game has received in many reviews.

Many people think the AI cheats... just because it knows how to play the game and they don't.

By having the AI deliberately ignore these mechanics, they mimick the playstyle of a player who also is not aware of them.

The smart AI with morale-and growth-malus would eventually overcome these things and outscale a player who plays badly and locks himself in negative morale.
But now the AI will do badly over the course of the entire game.

I think it's also better from a psychological point of view. Players will feel better about themselves if they beat an opponent who did not have a disadvantage.

I did not nerf the AI's unit-designing- and tactical-capabilities because that was the worst part about the game before I worked on it. It ruined immersion more like anything else when the AI would just throw dozens of crappy units at you.
Hans Lemurson May 27, 2018 @ 3:30pm 
I think this is a very good idea that would be hard to implement in a game that hasn't received as much AI work as you have put into this. To actually make the AI smarter at higher difficulty levels.

Most developers only have one AI to work with and they are happy that it can function at all, and so then just modify it with bonuses, but since we have the luxury of both "before" and "after", then you can make the easy actually dumber.

The failure of production/growth penalties for the AI to create a scenario that is "easy" enough is actually really interesting, and the opposite of what is commonly found in other games where bonuses are given to the AI to make it harder.

When trying to boost a bad AI with bonuses, the end result is an AI that is scary early on, but starts to lose later on as it is out-developed. A dumb AI that is 2x as powerful usually just results in them destroying 2x as many of their armies in suicide attacks.

Trying to weaken a smart AI though has the problem that it will be weak at first, but because its fundamentals are good it will eventually out-grow and out-pace a bad player. It will be weak at first, giving a false sense of security, but then it will still grow out of control and the new player has no idea why. Except that it MUST be cheating!
Ail May 27, 2018 @ 4:10pm 
I think that the unawareness of a player of certain key-game-mechanics results in exactly that perception.

For example underestimating the importance of morale and knowing what techs are important to control morale.

Each negative morale means -10% growth. At -10 Morale there is no growth whatsoever. If you keep your morale at 0 or higher you would outgrow the old easy-AI by a huge margin. But if you drop low in morale they will outgrow you because they know how important morale is and what to do about it.

Or not knowing how important unit-ranks are and how to make your units gain ranks. This will simply lead to the effect of the AI having stronger units.

The reason why I haven't uploaded yet is because I found that the buyout-selection of the AI is still pretty suboptimal. They would go through everything from the thing with the highest score to the lowest and purchase whenever there is enough money... This often meant they skipped the thing with the highest score and finished things with lower. So I made it return when something was not affordable in order to save for next turn. But this lead to them prefering upgrades instead and upgrading all their units before buying anything.
So the whole thing needs some more thought and maybe some communication between the agents responsible for upgrading and buyouting.
Hans Lemurson May 27, 2018 @ 10:38pm 
AI's behave like silly amnesiacs until you explicitly tell them how to remember and keep track of something.

"I have some money to buy things, but not enough for what I want, so I will save it for later."
"Oh look, I have some money! I think I'll buy something. Oh wait, I want something else, I'll save it for later."
"Oh look, I have some money! I think I'll buy somthing..."
Ail May 28, 2018 @ 1:47am 
It's not like there is no algorithm that handles this stuff already in a somewhat logical manner. It's just that it prioritizes things that I wouldn't have prioritized.

I think what I'd like to be going for is the following priority-list:

1. Buyout units in cities that are threatened by enemies.
2. Upgrade units with a level higher than what you can build. Prioritize by level.
3. Buyout buildings. Prioritize by RoI * Production of the building city. (the lower the result, the higher the priority)
4. Buyout units. Prioritize by production of the city. (the lower, the higher the priority)
5. Upgrade units with same or lower level than what can be built. Prioritize by level.

At any step, if you run into an item you don't have enough money for, don't proceed through the other options. Save for next turn.

And that is the main difference to what the AI does now. If it doesn't have enough money to buyout stuff up high on it's current priority-list, it will just go down until something comes that it can afford. So it often rushes things that have gotten cheap to rush because it would be done by regular production in 2 turns anyways and that Holo-Generator in the size 12 research-city ends up beeing built all the way manually.

The current priority-list is like this:

1. Buyout units in cities that are threatened by enemies.
2. Buyout buildings. Prioritize by RoI.
3. Buyout units. No real priority whatsoever.
4. Upgrade units with a level higher than what you can build. Prioritize by level.
(It does never upgrade units with lower level than what it can build)

And as I said, it will go down the list and usually spend the most of their money on buildings and units that are close to completion simply because they are cheap enough. Upgrades rarely do happen in this case.

Improving on this will mostly affect the midgame.

Note that the AI will not spend any money if it thinks it can win Economic-Victory by saving for 20 turns or less. (Should be adjusted to game speed if it isn't yet)

If you have any improvement-suggestions to the way I intend to rework the money-spending-priorities feel free to voice your opinion.
Ail Jun 1, 2018 @ 4:18pm 
New version is uploaded. I think the buyout-logic improvements should lead to quite a boost.

https://www.civforum.de/showthread.php?96495-Zwischenpatches&p=8000556&viewfull=1#post8000556

* AI no longer uses all of it's game-knowledge on easy and medium difficulty.
* AI makes particularly bad decisions in some aspects on easy difficulty.
* AI no longer receives a growth- and morale-malus on easy and medium difficulty.
* AI is now smarter about how to spend their credits.
* AI now will only build one colonizer or former when it needs one instead of queing them in every city and potentially ending up with too many of them.
* Fixed an issue that caused AI colonizers and their assigned defenders act rather whacky.
* Now using different version-string-format to avoid confusion with older versions.
Ail Jun 2, 2018 @ 8:55am 
Damn... apparently the renaming of the version-string causes a crash upon trying to laod a savegame. I didn't realize because I just finished all test-games so far.
Ail Jun 2, 2018 @ 9:28am 
Previous version crashed upon loading a savegame.

Fixed here:

https://www.civforum.de/showthread.php?96495-Zwischenpatches&p=8000998&viewfull=1#post8000998

No additional changes.
< >
Showing 1-9 of 9 comments
Per page: 1530 50