Topic: Rework Atlantean Crystal Mine
WorldSavior![]() |
Posted at:
2018-02-23, 17:15 UTC+1.0
That's not my thesis, it's teppo's
That's not what I observed For example, if an atlantean weapon smithy gets full supply and no limits by economy settings, it will work according to the pattern 1 2 3 4 5 1 2 3 4 5 1 and so on. But if a dungeon gets full supply and only three rookies go in there, it will work according to the pattern 1 1 1 2 2 2 3 3 3 4 and so on.
This would probably achieve that more quartz would be find indeed. And I thought about another solution which wouldn't contradict yours: What if the probabilities in the "mine"-lines get increased so much that they make sure that the efficiency of the mines will be 5% indeed?
Me neither... Wanted to save the world, then I got widetracked ![]() ![]() |
GunChleoc![]() Topic Opener |
Posted at:
2018-02-24, 10:45 UTC+1.0
Found the program selection for the trainingsites:
And the production site has:
So, you're right, it's indeed different. There's a lot more code to dig through though before I understand what's really happening, because it also depends on when this function is called and what happens then...
Edited:
2018-02-24, 10:45 UTC+1.0
Busy indexing nil values ![]() ![]() |
WorldSavior![]() |
Posted at:
2018-02-26, 11:34 UTC+1.0
I don't understand exactly everything of trainingsites neither, but probably most things... Wanted to save the world, then I got widetracked ![]() ![]() |
hessenfarmer![]() |
Posted at:
2018-02-26, 21:27 UTC+1.0
Just found another issue with the crystal mine. I have tried to improve AI performance for Atlanteans on Fullmoon Map which is very poor. The reason is with startin option HQ AI has 4 miners and 8 picks. As AI starts to build 2 crystal_mines as soon as they are allowed. there are only 6 picks left. As usually at least one pick is used for a stonecutter, and 3 are used for a coal mine there is no pick left for an iron mine which lead to a shortage of metal which leads to no pick can be produced and every iron_mine built is dismantled after 6 minutes of unoccupation. This is really kind of a deadlock. Currently I am trying to improve the situation but did not found any other solution than prohiniting the crystal_mine for a very long time, which is not optimal at all. Any ideas? ![]() ![]() |
hessenfarmer![]() |
Posted at:
2018-02-26, 22:30 UTC+1.0
Ok I found out the reason for this behaviour: Mines which produce Building materials have a minimum amount of 2 hardcoded in defaultai.cc. Currently these are empire_marble_mines and atlanteans_crystal_mines. So currently I see 3 solutions: I would vote for option c) as it should have minimum impact on empire (they should build a second mine as soon as their marble supply drops) and gives the atlanteans AI a much better chance in the early game. ![]() ![]() |
Tibor |
Posted at:
2018-02-26, 23:37 UTC+1.0
I think upgrading was involved in that logic - if we have two of the kind we can safely upgrade one of them. But of course, if mine is not upgradeable, 1 should be enough. But I must admit I dont remember clearly intentions behind the code.. ![]() ![]() |
GunChleoc![]() Topic Opener |
Posted at:
2018-02-27, 09:14 UTC+1.0
I agree with c) - we shouldn't change game balance if it can be fixed in the AI. The enhancement is a valid point, you could check for
instead and let the genetic algorithm take care of the rest.
Edited:
2018-02-27, 09:15 UTC+1.0
Busy indexing nil values ![]() ![]() |
Tibor |
Posted at:
2018-02-27, 09:43 UTC+1.0
This part of logic is not controlled by GA at all.. But we can change the logic like:
But this must be tested because it can have unexpected consequences...:) ![]() ![]() |
WorldSavior![]() |
Posted at:
2018-02-27, 15:54 UTC+1.0
If your fix will not work for what reason ever, you could also think about giving the AI a limit for crystal mines of 1. I mean, for what does an AI need several crystal mines anyway? In most situations it's perfect to build less than 2. By the way, the crystal mine should be build in almost every match after the three other types of mines... Let me guess: It would be too complicated to code that the AI can kick out some miners if the tool-economy is not complete yet? I've observed another idiotic behaviour of the AI. If a mine is not occupied yet, the AI will always dismantle it after a while. Wanted to save the world, then I got widetracked ![]() ![]() |
Tibor |
Posted at:
2018-02-27, 18:53 UTC+1.0
Good idea, can you create good and simple rule for AI to find out which mines should be limited to 1? Hard-listing is bad approach...
This is not easy, AI usually build mines as it conquers territories with various ores..
There is nothing like "tool-economy" for AI, though I roughly understand what you mean. But when I recall amount of time spent on coding and follow up tweaks and discussion about basic economy, I am not much eager to create another "economy"...
This can be easily tweaked, so what should be "timeout" for unoccupied mine (before AI will dismantle it)? ![]() ![]() |