Posted 26 February 2015 - 01:06 PM
I'm looking for a turtle program that digs everything it touches, and everything that touches those blocks, and so on. Effectively, digging everything connected to a block. (Think floodfill, replacing blocks with air.) (Mainly for cleaning up skyblock structures).
I was thinking about writing a program to do this, but figured someone else has to have done this already. However, I checked the program subforum and couldn't find one. So… is there one already? Or is there a program that already does this sort of recursive search? I figured that some programs may use this sort of thing for ore vein digging or treecutting, but most treecutters seem to be hardcoded, and most digging programs are quarry-style.
And if there isn't, does anyone have any suggestions as to how to write a program that does so relatively efficiently? The niave method (keeping a stack of blocks to check and always checking the last block in the stack) ends up being relatively slow and moves a lot unnecessarily, as it'll end up generally digging one block / move. Looping through all blocks to detect to determine the position/orientation that ends up with the most blocks checked / move ends up with way too much computation, and is complex besides. Doing a brute-force computation of possible moves is even slower.
Also, is this the right subforum for this sort of question? And is there a thread somewhere with a sorted list of programs? The programs subforum is for released programs, not questions. And this forum seems to be mainly about coding questions, not suggestions of programs.
I was thinking about writing a program to do this, but figured someone else has to have done this already. However, I checked the program subforum and couldn't find one. So… is there one already? Or is there a program that already does this sort of recursive search? I figured that some programs may use this sort of thing for ore vein digging or treecutting, but most treecutters seem to be hardcoded, and most digging programs are quarry-style.
And if there isn't, does anyone have any suggestions as to how to write a program that does so relatively efficiently? The niave method (keeping a stack of blocks to check and always checking the last block in the stack) ends up being relatively slow and moves a lot unnecessarily, as it'll end up generally digging one block / move. Looping through all blocks to detect to determine the position/orientation that ends up with the most blocks checked / move ends up with way too much computation, and is complex besides. Doing a brute-force computation of possible moves is even slower.
Also, is this the right subforum for this sort of question? And is there a thread somewhere with a sorted list of programs? The programs subforum is for released programs, not questions. And this forum seems to be mainly about coding questions, not suggestions of programs.