Currently Online

Latest Posts

Topic: Rework Atlantean Crystal Mine

GunChleoc
Avatar
Topic Opener
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-03-03, 11:29

No, it's not. Consider this a wishlist item face-wink.png


Busy indexing nil values

Top Quote
teppo

Joined: 2012-01-30, 09:42
Posts: 423
Ranking
Tribe Member
Posted at: 2018-03-03, 12:17

GunChleoc wrote:

Would it help if the first consume-animate-mine-produce -cycle of mine_quatz in the Atlantean crystal mine would produce at least one quartz, instead of granite only?

I think it would.

How?

Because a failed mining step might fail the whole program. See the discussion above how the whole program is aborted, never reaching the later stages where it actually produces a precious stone.

Anybody against doing just this?


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-03-04, 19:13

Tibor wrote:

WorldSavior wrote:

Tibor wrote:

WorldSavior wrote:

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.

Good idea, can you create good and simple rule for AI to find out which mines should be limited to 1?

I thought about the AI-limit of crystal mines in the lua-files. I know that something like "weak_ai_limit" and "very_weak_ai_limit" exists... Does also an "ai_limit" exist?

No, but it is probably good approach, at least this is not first time it is asked for

Every mine which is not the crystal mine shouldn't be limited to 1. face-wink.png

Hard-listing is bad approach...

Why, because of possible new tribes in the future?

That.

Okay. I think the "normal_ai_limit" would help here, as it's not easy to create a simple rule for the AI which mines should be limited to 1.

+ changing atributes of current mines (like production programs)
+ renaming such mines

I hope that no mine will be changed that much...

By the way, the crystal mine should be build in almost every match after the three other types of mines...

This is not easy, AI usually build mines as it conquers territories with various ores..

It would help if the crystal mine would get the highest number at "prohibited till", wouldn't it?

Yes, it would "HELP", but would be no guarantee that all other mines are built before that time limit

Okay...

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?

There is nothing like "tool-economy" for AI, though I roughly understand what you mean.

Tool-economy is the part of the economy which creates tools.

AI does not recognize anything like this. It might take ~20 hours to code the thing IMHO

Maybe the tool economies should be included in the basic economies... But as it contains mines, it could be difficult.

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.

This can be easily tweaked, so what should be "timeout" for unoccupied mine (before AI will dismantle it)?

They shouldn't dismantle them, check out hessenfarmers posts...

Even if the AI has 20 unoccupied mines?

In that case, it's already too late. But then they could dismantle some mines.

hessenfarmer wrote:

Tibor wrote:

The idea of dismantling is just to expel any miner that might be in it. I personally prefer get rid of such mine (keeping minimal count of course) then keep it for perhaps hours, but it is just matter of opinion and any change should be tested...

Problem is this leads to dismantling - building another mine of this type - dismantling cycles which are spoiling precious building materials. expel any miners from not fully occupied mines and wait if enough miners will be produced in the meantime makes more sense from an AI point of view) as a human would do so as well. an empty mine does not consume any ressources (cause AI sets input to zero if not occupied) so it is cheaper to keep the building and just expel the workers.

Well observed

Perhaps building new mines should be tweaked here. Or both, dismantling and building as well.

If you think so....

GunChleoc wrote:

GunChleoc wrote:

teppo wrote:

WorldSavior wrote:

While barbarian iron mines need 20 times more resources when depleted, atlantean iron mines need 50 or 100 times more. I don't think that this is how it was intended... And it's not fair.

Would it help if the first consume-animate-mine-produce -cycle of mine_quatz in the Atlantean crystal mine would produce at least one quartz, instead of granite only?

I think it would.

How?

Because a failed mining step might fail the whole program.

Yes, I know, but then the crystal mine will execute program 2 and then program 3. As program 2 has the main output quartz, it should also have the main output quartz when the mine is depleted. As program 1 has the main output granite, it should have the main output granite in the depleted case, too.

See the discussion above how the whole program is aborted, never reaching the later stages where it actually produces a precious stone.

     actions = {

        "return=skipped unless economy needs granite or economy needs quartz",
        "sleep=45000",
        "consume=smoked_fish,smoked_meat:2 atlanteans_bread:2",
        "animate=working 20000",
        "mine=stones 4 100 5 2",  -- let's say this succeeds
        "produce=granite:2",      -- we get granite only here
        "animate=working 20000",
        "mine=stones 4 100 5 2",  -- let's say this fails, then the whole program potentially aborts (needs to be verified, but the code is complicated)

Yes, then this program stops, but as I said, programs number 2 and 3 will be executed next.

        "produce=granite:2",      -- never reached, so nothing produced
        "animate=working 20000",
        "mine=stones 4 100 5 2",
        "produce=granite",
        "animate=working 20000",
        "mine=stones 4 100 5 2",
        "produce=quartz"          -- never reached, so no quartz this time!

Yes, so there will hopefully be a possibility to create quartz in the second program face-wink.png

We should do the same for diamonds.

Sure?

Well, mathematically the same "it's not really 5%" argument holds, doesn't it?

Not really... In program 3, a diamond will be found first, so the problem isn't as huge as in the quartz case.

But: If the mine is not depleted, the chance that program 3 will find one diamond is 200% (it finds two). If the mine is depleted, the chance is only 5%+0.05*5%=5.25%. So in fact the diamond program will work only at 5.25%/200%=2.5125% so basicly 2.5% effectiveness instead of 5%.

hessenfarmer wrote:

Regarding the dismantling of mines if not fully occupied I can't see any logic in that. Instead every worker that might be in this mine should be expelled instead and this should be checked in the interval already given.

+1

You have 300 coal on stock and 10 unoccupied coal mines, and 1 unoccupied iron mine - and AI will forever expel miners from coal mines hoping that once he finally gets into the iron mine and will start working...

Yes, but that's not bad per se - it's the same thing that a human would do. The worker will find his way to the iron mine eventually. Some scoring might help here - maybe devalue building or upgrading a mine if there are too many unoccupied ones.

Yes, it's not that bad.

As far as I know, there is a queue which will make it happen that the iron mine will be reached soon, it is not randomized...

teppo wrote:

GunChleoc wrote:

Would it help if the first consume-animate-mine-produce -cycle of mine_quatz in the Atlantean crystal mine would produce at least one quartz, instead of granite only?

I think it would.

How?

Because a failed mining step might fail the whole program. See the discussion above how the whole program is aborted, never reaching the later stages where it actually produces a precious stone.

Anybody against doing just this?

Against doing what? As I said, the first program already contains a quartz. But this is one which is almost never reached. And why should the "5%" be in reality 2.5%, 1% or 2%, depending on the mine?


Wanted to save the world, then I got widetracked

Top Quote
teppo

Joined: 2012-01-30, 09:42
Posts: 423
Ranking
Tribe Member
Posted at: 2018-03-05, 20:26

WorldSavior wrote:

Against doing what? As I said, the first program already contains a quartz. But this is one which is almost never reached. And why should the "5%" be in reality 2.5%, 1% or 2%, depending on the mine?

Atlantean mines are powerful, until they deplete. It is possible to make maps where Atlanteans can mine large amounts of ore that is out of reach of others.

Perfect balance is difficult as long as the tribes are different.


Top Quote
GunChleoc
Avatar
Topic Opener
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-03-07, 08:25

We now have a branch for testing - see the discussion in https://bugs.launchpad.net/widelands/+bug/1753248

Before:
Before

After:
After

Edited by kaputtnik: Show the images directly

Edited: 2018-03-07, 09:25

Busy indexing nil values

Top Quote
teppo

Joined: 2012-01-30, 09:42
Posts: 423
Ranking
Tribe Member
Posted at: 2018-03-07, 19:09

GunChleoc wrote:

Before:
Before

After:
After

Atlantean player, with depleted crystal mines. Red line shows the amount of acquired granite, green line shows quartz. The setting is that player needs 10 granite and lots of quartz. Before and After refer to trunk and initial commit in associated branch.


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-03-07, 19:37

teppo wrote:

WorldSavior wrote:

Against doing what? As I said, the first program already contains a quartz. But this is one which is almost never reached. And why should the "5%" be in reality 2.5%, 1% or 2%, depending on the mine?

Atlantean mines are powerful, until they deplete.

That's rather something what I would say about barbarian surface mines. Atlantean mines are not that efficient, especially their goldmines, which are very bad. But other Atlantean mines are a good concurrence for deep and deeper mines...

It is possible to make maps where Atlanteans can mine large amounts of ore that is out of reach of others.

Yes. But I've got the impression that noone does that. So it's not really relevant... Or is it?

Perfect balance is difficult as long as the tribes are different.

Yes, I know. Even if one wants to balance them for autocrat only, and only for maps where every resource is well reachable... But for me it looks like empire and atlanteans have much worse depleted mines than barbarians... And the bug makes that worse. So: Fixing it would bring more balance.


Wanted to save the world, then I got widetracked

Top Quote
teppo

Joined: 2012-01-30, 09:42
Posts: 423
Ranking
Tribe Member
Posted at: 2018-03-07, 19:59

WorldSavior wrote:

Atlantean mines are powerful, until they deplete.

That's rather something what I would say about barbarian surface mines. Atlantean mines are not that efficient, especially their goldmines, which are very bad. But other Atlantean mines are a good concurrence for deep and deeper mines...

Very true, the Barbarian shallow mines are cheap to run.


Top Quote
teppo

Joined: 2012-01-30, 09:42
Posts: 423
Ranking
Tribe Member
Posted at: 2018-03-19, 18:41

WorldSavior wrote:

My observation: The crystal mines found many stones and diamonds, but not a single quartz. That's almost a prove for my thesis face-wink.png

This part has now been fixed in trunk.

By the way: Probabilities of (most) mines are bugged. For example, I don't think that a depleted atlantean iron mine has got 5% efficiency when running, but rather 1 or 2 %.

This is still true. Bug or feature?


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-03-21, 22:21

teppo wrote:

WorldSavior wrote:

My observation: The crystal mines found many stones and diamonds, but not a single quartz. That's almost a prove for my thesis face-wink.png

This part has now been fixed in trunk.

Good, thanks

By the way: Probabilities of (most) mines are bugged. For example, I don't think that a depleted atlantean iron mine has got 5% efficiency when running, but rather 1 or 2 %.

This is still true. Bug or feature?

I think that it's a bug. Even without that bug, barbarian depleted mines would be much better than other depleted mines, and this bug makes it worse. So I don't think that it's a feature at the same time...


Wanted to save the world, then I got widetracked

Top Quote