Mining tweak

A place to post suggestions for new features, new bugs, and comments about the existing code.
Spunkmeyer
Posts: 2013
Joined: Fri Jun 27, 2003 7:00 am
Location: Contact me regarding: CC, Slayer and AllegWiki.

Post by Spunkmeyer »

This is related to the discussion we have going in CC now, but it's not really the same thing:

Right now miners return home when they need a new order (done mining, mostly) if they are more than 50% full, so if it's a normal/high capacity miner they usually come back home somewhat empty (usually 5600 or so instead of 7200 or 9000 in case of Giga)

I've tried a simple tweak which seems to work well but needs discussion:

Current:
If we are not 50% full, find the next rock to mine in any sector, otherwise go home.

Tweak:
Same as above, but if we are 50% full, then:
*If we are not 75% full, see if there is a rock to mine in the same sector (don't look into any other sectors, we are not going on a long haul trip).
*Then see if the rock is closer than the base (again we are not going on a long haul trip)
*If it's close enough, mine the rock first (which usually leads to a full miner)
*Otherwise go home.


Want bigger games? Log on to play at the official game time: 9pmET/8pmCT/7pmMT/6pmPT every day of the week. Also Saturdays 8pm UTC.

BillyBishop
Posts: 476
Joined: Thu Sep 02, 2010 7:52 pm
Location: Calgary Montreal Vancouver (depending heh)

Post by BillyBishop »

That I like.
Spunkmeyer
Posts: 2013
Joined: Fri Jun 27, 2003 7:00 am
Location: Contact me regarding: CC, Slayer and AllegWiki.

Post by Spunkmeyer »

This reminds me.. there is an inconsistency which mainly concerns mining in neutral sectors. If you send a miner to a neutral sector, whether it goes back there entirely depends on whether it was full when it left the sector.

If it was full when done, it'll go back to the last rock it was mining because it remembers that order.

But if it wasn't full (usually the case if you didn't micro it after it was done mining), it won't because it picks a new default order. It'll go elsewhere or sit in base, because neutral sectors are not allowed when it's picking a default order.

It'd be trivial to make it not return regardless. But since you sent it there, presumably you want that sector mined till you tell it otherwise (don't override my commands principle). You also don't want to start with a rock that's half-tapped out and may be far away from the aleph.


Want bigger games? Log on to play at the official game time: 9pmET/8pmCT/7pmMT/6pmPT every day of the week. Also Saturdays 8pm UTC.

MrChaos
Posts: 8352
Joined: Tue Mar 21, 2006 8:00 am

Post by MrChaos »

Hey Spunk

I like this one quite alot. I realize it waters down the advantage to the uber comms but makes sense from almost never commands anymore himself perspective.
Last edited by MrChaos on Sun Feb 19, 2012 6:45 pm, edited 1 time in total.
Ssssh
TurkeyXIII
Posts: 1460
Joined: Thu Dec 06, 2007 3:18 am
Location: Melbourne, Aus

Post by TurkeyXIII »

If you're tweaking miner AI, there's one that annoys me when they panic. The ignore their current order and pick a base to go to - even if the current order is to dock at a station, and the aleph they choose to run to is on the other side of the sector.

Basically what I want is for miners to get a grip if they've been ordered to dock somewhere, because that will probably save them. Also if the picking a station algorithm took distance to the aleph into account it would be nice.
QUOTE (Randall Munroe)14.2: Turkey consumption rate of the average American in milligrams per minute[/quote]
Image
Spunkmeyer
Posts: 2013
Joined: Fri Jun 27, 2003 7:00 am
Location: Contact me regarding: CC, Slayer and AllegWiki.

Post by Spunkmeyer »

It's not what you want, but see this which should help a lot in general:
http://trac.alleg.net/ticket/266

They ignore their current order, but they should pick the closest base to their position?

Although we should probably check if the destination is a ref first anyway, so might as well include a dock order in there.
Last edited by Spunkmeyer on Sun Feb 19, 2012 11:50 pm, edited 1 time in total.


Want bigger games? Log on to play at the official game time: 9pmET/8pmCT/7pmMT/6pmPT every day of the week. Also Saturdays 8pm UTC.

Spunkmeyer
Posts: 2013
Joined: Fri Jun 27, 2003 7:00 am
Location: Contact me regarding: CC, Slayer and AllegWiki.

Post by Spunkmeyer »



Want bigger games? Log on to play at the official game time: 9pmET/8pmCT/7pmMT/6pmPT every day of the week. Also Saturdays 8pm UTC.

Spunkmeyer
Posts: 2013
Joined: Fri Jun 27, 2003 7:00 am
Location: Contact me regarding: CC, Slayer and AllegWiki.

Post by Spunkmeyer »

What I did to make the mining behavior consistent between the rock being mined out and miner running out of room is to remember the sector being mined until sent elsewhere and return to this sector regardless of how the last mining run ended. It will also not make a bee-line for the now partial rock it was previously mining, but pick the closest suitable rock.


Want bigger games? Log on to play at the official game time: 9pmET/8pmCT/7pmMT/6pmPT every day of the week. Also Saturdays 8pm UTC.

JimmyNighthawk
Posts: 1370
Joined: Mon Jul 07, 2003 7:00 am
Location: Lebe hinter dem Mond.

Post by JimmyNighthawk »

Spunkmeyer wrote:QUOTE (Spunkmeyer @ Feb 17 2012, 03:30 PM) This is related to the discussion we have going in CC now, but it's not really the same thing:

Right now miners return home when they need a new order (done mining, mostly) if they are more than 50% full, so if it's a normal/high capacity miner they usually come back home somewhat empty (usually 5600 or so instead of 7200 or 9000 in case of Giga)

I've tried a simple tweak which seems to work well but needs discussion:

Current:
If we are not 50% full, find the next rock to mine in any sector, otherwise go home.

Tweak:
Same as above, but if we are 50% full, then:
*If we are not 75% full, see if there is a rock to mine in the same sector (don't look into any other sectors, we are not going on a long haul trip).
*Then see if the rock is closer than the base (again we are not going on a long haul trip)
*If it's close enough, mine the rock first (which usually leads to a full miner)
*Otherwise go home.
WoW1 didnt have had such a nice techincal vision for a quite too long time...2nd'ed you (s)PUNK(y) „”… »÷«
Beschenkt die Starken!
Schröpft die Schwachen,
und die Armen schlagt ans Kreuz!

Wir hängen nicht am Leben,
doch an einem Traum!
Evan
Posts: 67
Joined: Wed Jul 02, 2003 7:00 am
Location: Boston

Post by Evan »

Honestly, mining should not require as much micro-managing as it does to run an efficient econ.

I know it was a litmus test for commander competency in the past, but it was really just laziness on MS's part.

This may not be the ideal behavior, but on a cursory look it is far, far better than current implementations.

I wish there were a way to designate non-automatic mining though, to allow comms to mine strategically without the miner being dumb and going back once a sector he was remote mining being occupied by a new enemy base.
"I remember Evan more for his almost-british levels of abuse" - Agricola
Post Reply