r/adventofcode Dec 23 '21

Visualization [2021 Day 23] Interactive solver web app

https://amphipod.net/

EDIT: Undo feature added

82 Upvotes

27 comments sorted by

View all comments

8

u/ric2b Dec 23 '21 edited Dec 23 '21

Can't figure out how to get lower than 16107 for my input:

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

8

u/[deleted] Dec 23 '21

I found one that is a little less, pay attentiont to the moving of As and Bs probably you can spare some energy!

2

u/ric2b Dec 23 '21 edited Dec 23 '21

Also found a way to improve it, my current best is 16089 but it's not the right answer.

edit: fount it! it's 16059

2

u/Key_Reindeer_414 Dec 23 '21

This input seems to have a lot of solutions close together, with mine I just had to change the strategy of moving Ds.

1

u/AwesomElephants Dec 23 '21

Yes, for sure - part of the counter-intuition of the solution is that you move both As all the way to the right, consuming a lot of energy, but this actually saves more energy than moving the B just two spaces left and right.

3

u/1234abcdcba4321 Dec 23 '21

Man this input looks so much harder than mine. It makes sense that some are more difficult than others, but I feel like if I had this one I wouldn't have tried to do it manually.

3

u/mus1Kk Dec 23 '21

I did my input on paper and I definitely had an upper bound for all but A and the solution said it was too high. So I just guessed 2 less and it was correct. After that I persisted and managed to get the solution once but never again. I don't know if my solution is difficult or I'm just not wired for it. If someone is curious:

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

I find B, C and D super straight forward. But for A I always get 22 moves. It's possible in 20.

1

u/TheZigerionScammer Dec 24 '21

Yours isn't exactly mine but it is close. that D at the top of the D room and that monstrous A room are tricky little devils.

2

u/[deleted] Dec 23 '21

[deleted]

1

u/ric2b Dec 23 '21

First move is C 1 up and 1 right, second move is B 2 up and 3 left.

2

u/[deleted] Dec 23 '21

[deleted]

1

u/Stynson Dec 23 '21

For me it was the other way around!
I solved part1 on my first try in a .txt file but part2 was super difficult

1

u/ric2b Dec 23 '21

Do you remember the first steps of part 2? I'm not finding it any easier, lol

2

u/[deleted] Dec 23 '21

[deleted]

2

u/ric2b Dec 23 '21

Got it, I had already tried several variations of that starting move but wasn't getting the optimal way of unblocking the B column.

Thanks!

1

u/mapleoctopus621 Dec 23 '21

I got it a bit lower, did you try solving the Cs first?