Page 1 of 1

Veinminer II

Posted: Tue Feb 07, 2023 2:50 am
by [object Object]
This is Veinminer in Hex Casting. It's a redesign of another hex I made along the same vein (ha), but this one works in a single tick, doesn't use wisps, and only takes as much media as it needs to break the blocks it finds. Technically this actually would have been possible (with some modifications) with the lower recursion limit in previous versions — I just didn't think of this method.

As you'll see in the demo, it's currently pretty laggy. I'm not sure if that's from breaking so many blocks at once, from the bad list/set pattern implementations in the mod, or a combination of the two. Regardless, at least for now, I wouldn't recommend setting the block limit much higher than 64.

Trivia: this hex uses a weird pregenerated unrolling technique that I haven't seen used very often. This allowed me to bring the number of patterns a bit lower and keep the stack relatively short (this hex gets very close to the iota limit, so we need every bit of space we can get). It also saves on recursion somewhat, though that's not really necessary with the block limit at 64.

Video demo

Veinminer II
To write this hex, first draw the patterns. Note the comments with recommended places to split across screens. Then, create an offset list using Kirin's Ruler on each block in a 3x3 cube except the center (as below). Finally, use Locator's Scalpel (or Surgeon's Exaltation, if you prefer) to insert that list at the marked placeholder (Bookkeeper's Gambit: --, ie. a straight line with two segments).

If using Locator's Scalpel, make sure you put the list in another list (eg. using Single's Purification) or you'll flatten all the iotas into the hex instead of inserting the whole list iota.

Code: Select all

{
    // set up variables on stack
    // queue, target type, visited (including null so we don't try to visit a null position)
    Nullary Reflection
    Single's Purification

    Mind's Reflection
    Compass' Purification
    Mind's Reflection
    Alidade's Purification
    Archer's Distillation

    Gemini Decomposition
    Surveyor's Purification
    Jester's Gambit
    Single's Purification

    // recursive function, part 1
    {
        // remove visited blocks from queue, and remove duplicates from queue and visited
        Rotation Gambit
        Uniqueness Purification

        Undertaker's Gambit
        Combination Distillation
        Prospector's Gambit
        Exclusionary Distillation
        Uniqueness Purification

        // break current block and add to list of visited blocks
        Speaker's Decomposition
        Rotation Gambit
        Prospector's Gambit
        Integration Distillation
        
        // inner BFS loop
        Numerical Reflection: 20
        Swindler's Gambit
    }
    // recommended: split across screens here

    // pre-unroll and insert inner loop
    {
        // clean up the stack
        Flock's Reflection
        Flock's Gambit
        Retrograde Purification
        Numerical Reflection: 0
        Selection Distillation

        // inner loop to be unrolled
        {
            // get new block
            {
                Bookkeeper's Gambit: - // offset placeholder (automatic)
            }
            Flock's Disintegration
            Prospector's Gambit
            Additive Distillation
            
            // add to queue if new block is the right type
            Gemini Decomposition
            Surveyor's Purification
            Numerical Reflection: 3
            Fisherman's Gambit II
            Equality Distillation

            {
                Integration Distillation
                Bookkeeper's Gambit: v
            }
            Flock's Disintegration
            Augur's Exaltation
            
            Numerical Reflection: 5
            Fisherman's Gambit
            Rotation Gambit II
            Hermes' Gambit
            
            // reset stack for next iteration
            Rotation Gambit II
        }

        // insert current offset
        Numerical Reflection: 1 // index of placeholder
        Rotation Gambit
        Surgeon's Exaltation
        Flock's Disintegration
    }
    Consideration: Consideration
    Bookkeeper's Gambit: -- // manually insert list of offsets here
    Thoth's Gambit
    Combination Distillation
    // recommended: split across screens here
    
    // recursive function, part 2
    {
        // break target
        Break Block

        // halt if queue is empty or reached block limit, otherwise recurse
        Jester's Gambit
        Gemini Decomposition
        Augur's Purification

        Thanatos' Reflection
        Numerical Reflection: 357 // max recursion - block limit - number of offsets - 1 (512 - 64 - 26 - 1)
        Subtractive Distillation
        Augur's Purification

        Conjunction Distillation
        Muninn's Reflection
        {
            Bookkeeper's Gambit: v
        }
        Flock's Disintegration
        Augur's Exaltation
        Hermes' Gambit
    }
    Combination Distillation

    // save on stack space and iota usage by putting function in ravenmind
    Huginn's Gambit
    Muninn's Reflection
    Hermes' Gambit
}
Image

Re: Veinminer II

Posted: Tue Feb 07, 2023 3:58 am
by Robotgiggle
What exactly is the point of the giant image of a sentinel in a glass box?

Re: Veinminer II

Posted: Tue Feb 07, 2023 3:58 am
by [object Object]
Then, create an offset list using Kirin's Ruler on each block in a 3x3 cube except the center (as below).