Jump to content




Advanced Programs: Orefinder, Tunnel.

turtle

253 replies to this topic

#61 DarkriftX

  • New Members
  • 15 posts

Posted 09 December 2012 - 02:58 PM

Yours currently has it digging like this:

X - - - - X - - - - X - - - -

but the problem is there are 2 rows in the middle that are getting ignored (the turtle cannot see them as indicated by red below):

X - - - -X - - - -X - - - -

If you did:

X - - X - - X - - X - - X - -

Then it can see every row and will never miss ores. Yes, it will take longer but I would rather it be more thorough than miss half of the ores in that area.

#62 Henness

  • Members
  • 189 posts

Posted 09 December 2012 - 04:46 PM

View PostDarkriftX, on 09 December 2012 - 02:58 PM, said:

Yours currently has it digging like this:

X - - - - X - - - - X - - - -

but the problem is there are 2 rows in the middle that are getting ignored (the turtle cannot see them as indicated by red below):

X - - - -X - - - -X - - - -

If you did:

X - - X - - X - - X - - X - -

Then it can see every row and will never miss ores. Yes, it will take longer but I would rather it be more thorough than miss half of the ores in that area.

Here I'll explain it with a picture

x++++x++++x++++x
++x++++x++++x+++
++++x++++x++++x+
+x++++x++++x++++
+++x++++x++++x++
x++++x++++x++++x

basically the turtle doesn't just check in front of it and behind it, it also checks to the left and right.

#63 DarkriftX

  • New Members
  • 15 posts

Posted 10 December 2012 - 03:16 AM

I see. So while there are spots that are missed, if you do a large enough area, they are less noticable as they are only on the outside of the square you search. I guess that makes my single width row problematic and I should go back to squares.

I was doing it that way to speed up the process as a 20x20 square took forever from level 20-5 (15 blocks deep shafts) with a single turtle.

#64 Henness

  • Members
  • 189 posts

Posted 10 December 2012 - 09:41 AM

View PostDarkriftX, on 10 December 2012 - 03:16 AM, said:

I see. So while there are spots that are missed, if you do a large enough area, they are less noticable as they are only on the outside of the square you search. I guess that makes my single width row problematic and I should go back to squares.

I was doing it that way to speed up the process as a 20x20 square took forever from level 20-5 (15 blocks deep shafts) with a single turtle.

With the new version I am working on the turtle digs holes based on its cords so you will be able to do one wide ones right next to each other and the turtle wont dig the same pattern as the last row.

#65 vafo

  • Members
  • 10 posts

Posted 10 December 2012 - 04:47 PM

Well what can I say? bring it on! awesome work henness :)

#66 DarkriftX

  • New Members
  • 15 posts

Posted 10 December 2012 - 05:28 PM

Im just glad I found a decent program that is still being worked on. Most of the good ones I find have no updates and while I can figure out the easy stuff from my knowledge of other languages, Im glad this one is still getting improved. I ran it while I slept on a 25x25 area and it worked great (minus a bug that I introduced that makes it quit one row over lol).

I wish they had made these computers visually aware. If they could see 3-5 spaces ahead of them that would be awesome for mining, and for "bodyguard" bots. Sucks that they are blind and have to "feel" the block next to them to Id it.

#67 Henness

  • Members
  • 189 posts

Posted 10 December 2012 - 07:25 PM

View PostDarkriftX, on 10 December 2012 - 05:28 PM, said:

Im just glad I found a decent program that is still being worked on. Most of the good ones I find have no updates and while I can figure out the easy stuff from my knowledge of other languages, Im glad this one is still getting improved. I ran it while I slept on a 25x25 area and it worked great (minus a bug that I introduced that makes it quit one row over lol).

I wish they had made these computers visually aware. If they could see 3-5 spaces ahead of them that would be awesome for mining, and for "bodyguard" bots. Sucks that they are blind and have to "feel" the block next to them to Id it.

Dan should add advanced turtles that can see farther, have color, and mouse control. Maybe even be able to detect what data value the block has.

#68 vafo

  • Members
  • 10 posts

Posted 11 December 2012 - 12:29 AM

View PostDarkriftX, on 08 December 2012 - 09:32 PM, said:

If you look above, the code I posted does that. I just added a few lines of code to the original.
Tried your version, seems to be working fine when it comes to coming back to the start on finish.

The idea of covering the hole with a single cobblestone is also great!

#69 motel6man

  • New Members
  • 1 posts

Posted 13 December 2012 - 07:08 PM

pretty new to the turtles but i installed this script and i see advanced tunnel v1.3.1.txt on my program list but im not sure how to start it ive tried what it shows on the list ive tried just advanced tunnel but nothing works.

edit: fixed by renaming it to AT.txt

#70 DarkriftX

  • New Members
  • 15 posts

Posted 14 December 2012 - 05:01 PM

Found another bug. Refueling. When the turtle waits at the start point for fuel it uses all but 1 of the fuel that you give it.I have seen this happen 5+ times but I finally got a chance to see it when I was expecting it.

Scenario:
Turtle is waiting at chest asking for fuel. Turtle has 2 fuel left. Right click on turtle and drop half stack of coal (32) onto the 2 pieces it has.

Expected result:
Fuel goes down from 34 to 33

Actual result:
Fuel goes down to 1 (actually, what looks like it happens is fuel goes to 0, then jumps to 1 real fast)

#71 Henness

  • Members
  • 189 posts

Posted 15 December 2012 - 12:46 PM

View PostDarkriftX, on 14 December 2012 - 05:01 PM, said:

Found another bug. Refueling. When the turtle waits at the start point for fuel it uses all but 1 of the fuel that you give it.I have seen this happen 5+ times but I finally got a chance to see it when I was expecting it.

Scenario:
Turtle is waiting at chest asking for fuel. Turtle has 2 fuel left. Right click on turtle and drop half stack of coal (32) onto the 2 pieces it has.

Expected result:
Fuel goes down from 34 to 33

Actual result:
Fuel goes down to 1 (actually, what looks like it happens is fuel goes to 0, then jumps to 1 real fast)

I wrote it so the turtle consumes all the fuel but one, so when its mining it picks up coal in that slot and automatically uses it for fuel without asking you. But for some reason when coal is dug up it never gets stacked with slot 16. I'm still trying to find a better way of doing the refuel process. :(

#72 DarkriftX

  • New Members
  • 15 posts

Posted 16 December 2012 - 08:10 AM

The way I would do it is make the fuel slot #1 and make your skip items go after that. It would require very little change to your ignore items loop, and being first would make the coal stack (I am 80% sure it stacks when its the first item). I would however prefer that the bots themselves had a separate fuel slot like any other item in the game that requires fuel.

#73 DarkriftX

  • New Members
  • 15 posts

Posted 16 December 2012 - 08:13 AM

Btw, if you give it 30 coal, and it consumes 29, but only has 3 more holes to dig, does that mean that you lose ~28 coal or does it give them back? I didnt see anything like that in the code.

#74 Cravin

  • Members
  • 2 posts

Posted 16 December 2012 - 12:05 PM

Hey Hennes, since I'm working on a similar mining approach like you, I've run into a similar problem with the refueling process. I have set it up like this: slot 1-3 are ignore slots, with dirt, gravel and smoothstone. Slot 16 is fuel. Once the turtle goes to the dropoff point, it iterates over slots 4-15 and tries to transfer them to slot 16 with turtle.transfer(targetSlot,amount) before dropping them off into a chest.
It helps to know how the turtle choses the slot to put items in. Basically, it tries to put it into the first empty or fitting slot, starting at the currently selected one.

#75 Henness

  • Members
  • 189 posts

Posted 16 December 2012 - 02:42 PM

View PostDarkriftX, on 16 December 2012 - 08:10 AM, said:

The way I would do it is make the fuel slot #1 and make your skip items go after that. It would require very little change to your ignore items loop, and being first would make the coal stack (I am 80% sure it stacks when its the first item). I would however prefer that the bots themselves had a separate fuel slot like any other item in the game that requires fuel.

That's what I'm doing on the version I working on now, I hope it works.

View PostDarkriftX, on 16 December 2012 - 08:13 AM, said:

Btw, if you give it 30 coal, and it consumes 29, but only has 3 more holes to dig, does that mean that you lose ~28 coal or does it give them back? I didnt see anything like that in the code.

If you label your turtle it wont ever loose its fuel, it will just use it the next time you run a program.

View PostCravin, on 16 December 2012 - 12:05 PM, said:

Hey Hennes, since I'm working on a similar mining approach like you, I've run into a similar problem with the refueling process. I have set it up like this: slot 1-3 are ignore slots, with dirt, gravel and smoothstone. Slot 16 is fuel. Once the turtle goes to the dropoff point, it iterates over slots 4-15 and tries to transfer them to slot 16 with turtle.transfer(targetSlot,amount) before dropping them off into a chest.
It helps to know how the turtle choses the slot to put items in. Basically, it tries to put it into the first empty or fitting slot, starting at the currently selected one.

Thats a good idea, I'm gonna keep thinking of a good way of doing it.

#76 DarkriftX

  • New Members
  • 15 posts

Posted 16 December 2012 - 03:35 PM

Awesome. For the last few days I was worried you were losing interest since we hadnt heard from you as much.

#77 Henness

  • Members
  • 189 posts

Posted 17 December 2012 - 11:59 PM

Getting close on my new orefinder version I also made an updater so every time you run my program it will check for a newer version.

#78 vafo

  • Members
  • 10 posts

Posted 18 December 2012 - 08:22 AM

yay!

#79 Henness

  • Members
  • 189 posts

Posted 18 December 2012 - 06:25 PM

I added my new program Advanced Updater, If you enable HTTP and run that past bin command it will download it all you have to do is run the program. Please post any bugs you find.

#80 DarkriftX

  • New Members
  • 15 posts

Posted 19 December 2012 - 12:53 AM

I had an idea but havent dug far enough into the capabilities to know if it will work. I was thinking that you could "teach" the bot what blocks are. This would require the bot to be able to look at a block and see the item ID (possible?). If so, then you could run a command to have it look at some blocks and store those in a list of always ignore blocks. This would allow you to have it ignore more blocks without taking up inventory slots and also make startup faster as you wouldnt have to give it blocks each time.

I was also thinking about a function that it could run before it goes to drop off stuff. If the bot is set to ignore cobble and gravel, it wont dig it unless it has to, but it will still fill up with these. When the bot realizes that it is full, it could start a function that would scan (for example) slots 5-16 to see if any of them contain the items in 1-4 (ignore slots). Then it could find any dirt/cobble/gravel/smoothstone in its inventory and drop them in a hole. This would allow it to go a lot farther before having to unload.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users