Advent of Code 2020 - BaseA Style (Day 11)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Discussion thread for day 11 of the Advent of Code : https://adventofcode.com/2020/day/11
- Labels:
- Advent of Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Definitely needed a couple hints to get going on this one. It finally clicked when read people were using coordinate based approaches. And as I write this I am realizing I probably could have made use of spatial tools for distance calculations. Oh well... nothing wrong with brushing up on grade school math.
Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Greg_Murray This one was interesting - you can cheat and use 1 dimensional distance. I just #'ed the cells 0 to 9024 and then used abs(a-b) for distance. The absolute distance doesn't matter, only the sort order.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's my solution for the first part. Like @Balders there are a lot of tools in the macro to force it to exit when it meets the condition of no seats changing between the iterations.
Macro:
It's late and it's Friday so I'll try and workout part 2 over the weekend.
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Tried to edit my post yesterday but it disappeared..
Here's my iterative solution.
iterative to solve 1
iterative to prepare for part 2
iterative to solve part 2
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It was really interesting to see the seating iterations develop too!
 
https://public.tableau.com/profile/petergb#!/vizhome/Day11_16077110205010/AoCDay11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Watching the seats fill up is very satisfying!
 
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So while my original idea of converting to spatial and using find nearest, like many of us did last year, showed promise but was WAY too slow.
Solution to part 1 is probably very convoluted, but it works, and it only takes about 30 seconds for the iterative macro. Not stellar time, not winning at tool golf, but at least it functions.
Part 1 workflow, simple enough
Macro. Ugh. But it works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A week between parts a & b for me as my son came home and busy with work before off for 2 weeks (but not from Alteryx 😃). Could have used the second macro for both with minor changes to workflow.

- « Previous
- Next »