General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

Advent of Code 2021 Day 23 (BaseA Style)

jdunkerley79
16 - Nebula
16 - Nebula

Discussion thread for day 23 of the Advent of Code - https://adventofcode.com/2021/day/23

 

330px-Gammarus_roeselii.jpg

3 REPLIES 3
dsmdavid
11 - Bolide
Spoiler
Does "pen & paper" count as BaseA?
If so, easy solve. If not... 😅
Spoiler
#############
#...........#
###D#C#D#B###
  #D#C#B#A#
  #D#B#A#C#
  #C#A#A#B#
  ######### 
  
#############
#B..........#
###D#C#D#.###
  #D#C#B#A#
  #D#B#A#C#
  #C#A#A#B#
  ######### 
  
#############
#BA.......BC#
###D#C#D#.###
  #D#C#B#.#
  #D#B#A#.#
  #C#A#A#.#
  ######### 
  ---
#############
#BA.......BC#
###.#C#.#D###
  #.#C#B#D#
  #.#B#A#D#
  #C#A#A#D#
  ######### 
---
 
#############
#B......C.BC#
###.#C#.#D###
  #.#C#B#D#
  #.#B#A#D#
  #A#A#A#D#
  ######### 

#############
#BB.....C.BC#
###.#C#.#D###
  #A#C#.#D#
  #A#B#.#D#
  #A#A#.#D#
  ######### 
---

#############
#BB...B...BC#
###A#.#.#D###
  #A#.#C#D#
  #A#.#C#D#
  #A#.#C#D#
  ######### ​
I started doing this to get some inspiration for the workflow, but ended up finishing it before getting any idea of how to implement this in a reasonable amount of time...
patrick_digan
16 - Nebula
16 - Nebula

Finally got my stars, I built workflows but had to hardcode some things so that it would finish. Given infinite resources, the logic would work for all paths, but it clearly needed some guiding to finish in a reasonable time.

Spoiler
I mapped the diagram and went through an iterative workflow to process it. The first part is mostly dynamic, but I did have to hardcode one part to get rid of less efficient routes. It's possible a fix for part 2 would make it completely dynamic, but I didn't investigate. For part 2, I had to give it the first 8 steps (I think I got an easy one and it was obvious how you should start). I tried pen and paper but I missed a key step that saved me several hundred energy. It did the rest on it own. In theory it would have solved all the steps without any help, but the size was getting too big too quick. It's possible I could have had logic to reduce it, but nothing was coming to me.

Part 2 macro:
 patrick_digan_0-1640310833265.png

 

mmontgomery
6 - Meteoroid

Brute force by hand p1 and p2. P2 below by hand. I used alteryx for the sum/calculations

 

Spoiler

#############
#...........#
###D#A#A#D###
###D#C#B#A###
###D#B#A#C###
###C#C#B#B###
#########

A up 1;
A left 4;

A up 1;
A right 4;

D up 1;
D right 2;

A up 2;
A left 7;

B up 2;
B right 1;

C up 2;
C right 2;
C down 4;

B up 3;
B left 1;

C up 4;
C right 2;
C down 3;

B right 1;
B down 4;

B left 3;
B down 3;

B left 5;
B down 2;

D up 1;
D left 5;

A up 2;
A right 1;

C up 3;
C left 2;
C down 1;

B up 4;
B left 4;
B down 1;

D right 5;
D down 4;

D up 1;
D right 6;
D down 3

D up 2;
D right 6;
D down 2;

D up 3;
D right 6;
D down 1;

C up 4;
C right 4;
C down 1;

A right 1;
A down 4;

A right 2;
A down 3;

A left 7;
A down 2;

A left 8
A down 1;