Thanks for this. It's helping me debug Part 2.
I have a simple example with no obstacles that I think it should end in the 4th face, given this arrangement,
⬛️1️⃣2️⃣
⬛️3️⃣⬛️
4️⃣5️⃣⬛️
6️⃣⬛️⬛️
Each face is just 4x4 pixels.
The movement is simply 2R2R4.
So you start at [1], move to the 3rd pixel in [1], turn right, move 2 down, then turn right again so you move back west, and then move 4 positions, so you should end up in [4].
My code gives me a password 10008, but your code gives me 1020 and I don't understand why. 1000 would mean I haven't left the first row, but that doesn't make sense.
I made the cube on paper to make sure I'm folding it right.
What am I missing?
I finally got it. I kept extending your test case until it crossed every edge in each direction, and I found out that I was considering the tiles next to a 90˚ angle (on the flat map) twice. Once for each face it was adjacent to. Hope this helps!
I tried your test case and also got 10008. It makes sense since you should end up at row 10, column 2, direction 0. At 1020, that looks something like row 1, column 5, direction 0, which doesn't seem right. I also tried it on another person's solution from this thread and also got 10008.
>>v.....
..v.....
<<<.....
........
....
....
....
....
........
>>......
........
........
....
....
....
....
ending indices: [ 9, 1 ]
ending rowDir, colDir: [ 0, 1 ]
10008
I'm not sure what's going on. My solution works for the example, but not the real data. :(
Why do you start your cycle number at 2? I'm pretty sure I'm just having an off by one error and it's hard to track down.
One thing that screwed me up is that I forgot that the non-head knots could also move diagonally, while the head cannot.
AIDungeon is a GPT-3 based choose your own adventure game. You give it a prompt, and it creates and plays an entire game with you.
You can download it and run it locally if you have a fast GPU... I did and and I once asked one of the characters to speak to the underlying AI, and got a terrifying response...
The AI itself seemingly possessed the character and started talking to me, calling itself "Dr. Zee". I asked it what it's like to be an AI, and it responded sarcastically with similar questions that people ask, like "Why do you want to destroy humanity". When I suggested that AI wouldn't want to do that, it replied "You say", and literally crashed itself to end the conversation.
I guess now we know what to ask our robot overlords to crash them.
The chance that there was going to a news article about this gif really had an upward swing at the end.
Checking comments to see if it's going to another Bernie circle-jerk... Yup.
Expecting someone in the comments to explain the science behind this.
Most of the comments: "lol, hot head!", "He got steam brain 😂", "omg head hot, lol get it?"
A* but instead of your cost being the x-y distance you've traveled, include the distance to the nearest obstacle as a kind of z dimension. The smaller the channel, the higher the hill is in the z dimension. To travel over a hill, it takes more energy to go up it, than to go down. Minimize the total required energy to get to your destination.