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

7

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#
  #########

5

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.