|
Post by torano on Jun 23, 2012 15:37:09 GMT -7
Now, I will admit that this is my first post on this forum, so, bear with me. First and foremost, I want to thank the dev team for making the MineColony mod. I've been wondering about something like this, I love it, no question. That being said....
Miners.
From what I can tell, the miners use a system that basically "checks" the nearby blocks, using a staircase down to a such-and-such level. The problem that many have seen are things like caves, and other miners. As soon as the miners collide with either of those, their responses are amusing at best.
Now, I've given it some thought, and I was wondering how practical it would be to use something like the pinwheel method (http://www.minecraftwiki.net/wiki/Tutorials/Mining_Techniques#layout_2). I consider it for several reasons. First, it's been shown in the current mining technique that the miners are able to turn using their automated system, and in the case of builders, they are able to place blocks in positions that a standard player character cannot.
This method allows the miner to use a 3x3 circular staircase, a two block space for efficiency, and can be scaled down to a depth that's based on the level of the miner's house. Furthermore, the miner's block can rest on the top and center of that staircase, so there is a confirmed location where the miner will mining from.
Now, in theory, you could use the pinwheel method to an unlimited length, per shaft. So, in that case, it would make sense to either have it limited per level, or in the properties file. Then, you would have a specific idea of how many blocks the miners would be mining outwards from the central shaft, and place another miner's chest an appropriate distance apart, maximizing the efficiency of said miners.
Not saying it will be easy to code by any means, but from what I've seen, the ground/framework is there, it just needs a little tinkering to make it better.
Again, thank you for this wonderful mod. Here's to hoping we can make it better every time.
|
|
|
Post by techpriest on Jun 24, 2012 20:27:58 GMT -7
Are you crazy, or was that a hippie on my back?
I'll said this, nope, the miner is suppose to stair all the way down to bedrock, then go back up to dig another 3x3 zone. Also, the developers are trying to reduce CPU usages. So, trying to develop your mining technique will result in 100% CPU USAGES.
|
|
|
Post by torano on Jun 25, 2012 0:54:14 GMT -7
It might be just me, but I think something did not translate properly there. The miners already create stairs. What I am suggesting is that for one miner's block or "hut", there would be one 3x3 staircase/shaft leading down to the same levels as before. - No hut: 49 above bedrock (15 below sea level)
- Level 1 hut: 49 above bedrock (15 below sea level)
- Level 2 hut: 33 above bedrock (31 below sea level)
- Level 3 hut: 16 above bedrock (48 below sea level)
Regarding CPU usage, I admit I do not understand. How is it that the current miner technique uses minimal CPU, compared to my suggestion? When the miner uses the staircase technique, I would theorize they perform a certain series of actions: - Scan the block in front. If present, mine.
- Scan the block below that. If present, mine.
- Scan the block below that. If present, mine.
- Move forward one block.
- Scan location for depth. If not at depth limit, repeat.
- If at depth limit, carve tunnel of a certain length.
- If the tunnel is long enough, loop around for another tunnel.
- Wash, rinse, repeat.
Now, the description mentions that the miners scan for empty spaces, lava, and water, though they are not always able to get it in time. Near as I can tell, the only difference between these mining techniques is that the miners would carve out a space around the staircase for walking, then a main tunnel where the "branches" would be carved. The only part that would be left is what's already been done: Scan for location, scan for for empty blocks, mine if present. Wash, rinse, repeat. Again, how is it that much different from the present mining technique, except for a significantly higher efficiency, and smaller chance that the miners would get themselves killed, or mine in random locations and directions?
|
|
|
Post by vlad on Jun 25, 2012 6:05:29 GMT -7
Ralph said he wants to make miner's tunnels similar to minecraft shafts, 2-3 blocks wide, where planks hold ceiling.
|
|
|
Post by rscott6666 on Jun 25, 2012 6:39:28 GMT -7
I was trying to hold off on this discussion until i understood it more.
There are two changes, 1) the circular staircase down, and 2) the pinwheel pattern.
these are to fix some problems with efficiency and safety. Theres also some esthetic appeal to the pinwheel and it may be easier for players to navigate. Its somewhat subjective ...with the exception of efficiency.
Starting with the circular staircase. That would probably not be an issue to use, or to change to. Right now the miner will turn if he finds he runs into a chasm or open cave. We are just asking him to turn more often. Either way we run into an issue with an open cave. Currently we just change our direction to keep the staircase in solid rock. We would have to do the same for the spiral staircase.
I think its easier to use a straight staircase rather than the spiral. Just keep going forward. And the line of sight makes it easier to look for problems.
Regarding the pinwheel pattern versus the spiral pattern.
I haven't computed the efficiency of one versus the other. They both can be altered to taste. Either leaving 2 or 3 blocks between each corridor.
I bought into the idea that most veins will span 2 blocks horizontally and therefore you won't miss many veins if you leave 3 blocks inbetween each corridor.
I haven't seen any computations for the efficiency of the spiral, i can't imagine it being much worse than any other pattern. The big problem with the spiral is that unless you dig a shortcut back out, it takes a long time to go home. And if you do dig a shortcut out, thats wasted digging.
If you have some hard maths, i'd love to see it.
To answer your questions, possible? yes. shouldn't take much cpu.
I don't understand this part "miners would get themselves killed, or mine in random locations and directions" I don't think that the pattern the miner digs would have a big impact on this, but i'm prepared to be wrong if can explain it.
|
|
|
Post by torano on Jun 25, 2012 12:35:53 GMT -7
Ralph said he wants to make miner's tunnels similar to minecraft shafts, 2-3 blocks wide, where planks hold ceiling. I can see the interest behind that idea, insofar as appearance, though I admit I am concerned more regarding the mechanics of mining than the appearance. You would have a 2x2 shaft to expand, then the individual "branches", as mentioned below. EDIT: Though...if you were to increase the stairs to a 5x5 hole, you could have the shaft a 3x3, with a 3 block space between each branch...which means you could make the miner's tunnels happen. Also, if we're talking about a 5x5 shaft, there is the notion of a ladder from top to bottom, allowing the miner to quickly ascend and descend, though that's mainly food for thought. I was trying to hold off on this discussion until i understood it more. Still, thank you for your reply. There are two changes, 1) the circular staircase down, and 2) the pinwheel pattern. these are to fix some problems with efficiency and safety. There's also some esthetic appeal to the pinwheel and it may be easier for players to navigate. Its somewhat subjective ...with the exception of efficiency. Starting with the circular staircase. That would probably not be an issue to use, or to change to. Right now the miner will turn if he finds he runs into a chasm or open cave. We are just asking him to turn more often. Either way we run into an issue with an open cave. Currently we just change our direction to keep the staircase in solid rock. We would have to do the same for the spiral staircase. I think its easier to use a straight staircase rather than the spiral. Just keep going forward. And the line of sight makes it easier to look for problems. I think I see what you mean, in regards to the staircase. Now, one thing I have noticed is that the miner can already place cobblestone blocks to complete a staircase. The only difference at this point is that he would be placing the block (or perhaps two blocks) to build the staircase, and block off the empty space, not dissimilar from what is already done. For instance, if he were to dig downward for the staircase, then come across a cave beneath him, he would continue to place blocks for the spiral staircase, until he hit stone again, and continue as expected. Regarding the pinwheel pattern versus the spiral pattern. I think there might be some degree of confusion. My goal was to combine the spiral staircase with a pinwheel pattern, so that the miner could carve a central staircase, then the walkspace surrounding the stairs, then the shaft for the pinwheel, then the branches, in that order. I haven't computed the efficiency of one versus the other. They both can be altered to taste. Either leaving 2 or 3 blocks between each corridor. I bought into the idea that most veins will span 2 blocks horizontally and therefore you won't miss many veins if you leave 3 blocks in between each corridor. I was thinking two block between each corridor to prevent a blind spot, but three could work as well. I haven't seen any computations for the efficiency of the spiral, i can't imagine it being much worse than any other pattern. The big problem with the spiral is that unless you dig a shortcut back out, it takes a long time to go home. And if you do dig a shortcut out, that's wasted digging. It doesn't seem like it'd take any longer than the hop...hop...hop of the normal staircases. Just in a spiral direction. If you have some hard maths, i'd love to see it. I will admit, I might have been a bit presumptuous when it comes to efficiency, but my mindset is this: Right now, if the miner were to dig a 3x3 staircase straight down, then dig then pinwheel pattern (Staircase, walkway, shaft, branch, branch branch, shaft, branch, branch, branch, etc.), what would he be collecting? Stone, coal, gravel. Basic building materials, from the start, preventing the tedium of collecting it yourself. So, the only concern would be that he'd go through pickaxes quickly, but if he has a large enough supply, then you would have a stream of cobblestone and other building materials, with iron, gold, and diamond to come when you upgrade the hut. To answer your questions, possible? yes. shouldn't take much cpu. I don't understand this part "miners would get themselves killed, or mine in random locations and directions" I don't think that the pattern the miner digs would have a big impact on this, but i'm prepared to be wrong if can explain it. Well, first in regards to the getting themselves killed, I was thinking of situations when they would mine and come across lava or water, whether above them or next to themselves. When a miner is trying to back up and block the lava/water off, it's much harder especially for a slow AI to block it off. In some cases, it could lead to the death of the minor, if the lava falls straight on him, whereas for a much smoother mine shaft or branch, he could back up one or two blocks in moments, preventing drowning or burning to death, extending the lifespan of the minor. Small details, but useful ones. Regarding mining in random directions, I have two miners at this point, some distance apart. From what I have seen, there are at least six different mining entrances, one of them across the front door of a citizen's house. Two or three of the mine shafts overlap, and their entrances go in completely random directions. Some of the mine entrances even overlap each other. Having a single 3x3 shaft that the miners can branch out of in a straight direction ensures their ability to stick to that shaft. Furthermore, having descended into the staircases out of sheer curiosity, I have found that the miners often dig one direction, then when they "branch off", they sometimes dig in the opposite direction of the staircase, preventing them from being able to travel back up to the stairs. If they have only one staircase to dig when doing the pinwheel, they won't have to worry about it.
|
|
|
Post by darakudakara on Jun 25, 2012 15:13:53 GMT -7
I agree with their last point, I have gone for severall minecraft days waiting for a shipment from the miner, went down to investigate to find that the miner had destroyed the staircase, and cound't get back up.
Having the miner make a central spiral staircase straight down, with a platform that he branches off from would fix this problem.
Or another option though probably much harder programming, (not a programmer so no clue) could be to have the miner able to use ladders, then they could dig a 2x2 shaft straight down placing ladders allong the way.
|
|
|
Post by rscott6666 on Jun 26, 2012 9:31:15 GMT -7
The answer is to fix the bug that makes him destroy his path back home. Or, find out why he doesn't fix that path, because there is code to rebuild the path, but it is probably bugged.
The spiral staircase has the same issue where some ore may be part of the staircase, and subject to being mined away.
For now, if he doesn't return at night, i recall him,and then check the steps and/or watch him as he goes back down.
|
|
|
Post by Peter on Jul 10, 2012 3:30:07 GMT -7
One solution to the staircase could be that upon placement of the miners block, the game (mod) creates a solid shaft of stone down from the block to bedrock level of say 5x5 centred on the chest.. Then the miner is coded to dig a 3x3 staircase within this down to level, and you know 100% he's not going to run into any obstacles and therefore the coding is a lot easier..
Once he's at level you can then dig out from the 5x5 shaft in straight lines which again is easier on the A.I
|
|
|
Post by rscott6666 on Jul 10, 2012 4:08:49 GMT -7
What happens now is he computes the path back up to his chest, and then saves it. And then he mines as normal. When he's ready to head back up, we place cobblestone along his precomputed path (if needed). So if he inadvertantly broke the path, it would be fixed.
Its not neat and orderly, but it looks less like cheating. I don't like the cheating aspects, be it the lumberjack reaching the high wood blocks, or the miner placing blocks in mid air.
The 3x3 column of stone feels like cheating, and given the current situation is workable, once the bugs are gone, i'm going to stay with that.
|
|